Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

Validation function for the IR #59

Closed
kvark opened this issue Jun 8, 2020 · 0 comments · Fixed by #625
Closed

Validation function for the IR #59

kvark opened this issue Jun 8, 2020 · 0 comments · Fixed by #625
Labels
area: processing Passes over IR in the middle help wanted Extra attention is needed kind: feature New feature or request

Comments

@kvark
Copy link
Member

kvark commented Jun 8, 2020

The Module struct that our front-ends produce generally has some level of type-level encoding of the constraints, however many properties can only be checked at run-time. One big area of validation is type checking:

Another area is access checking:

  • all the handles are actually valid
  • input globals can only be read
  • can't linearly sample integer textures
  • depth images can only be used with comparison samplers
  • and more!

Finally we need to enforce some of the conventions. For example, variables can either be stored as pointers (that are loaded/stored), or directly. There is currently no consistency, and whatever we choose would need to be enforced.

We have a proc module for end-point-independent processing. I think the validator sub-module could live there. The main task of it would be getting a module and making sure that it's valid. We'd be running it in CI tests to make sure that the module contents produced by the front-ends, or by different processors/transformers, are all valid.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: processing Passes over IR in the middle help wanted Extra attention is needed kind: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant