-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add compiler customization schema #156
Open
Pennycook
wants to merge
6
commits into
intel:main
Choose a base branch
from
Pennycook:compiler-customization-schema
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The new schema adds ways to define: - Compiler aliases - Custom argument parsers - Custom compiler modes - Custom compiler passes Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
7 tasks
This is required to emulate the behavior of more complex flags, where: - There is a default value; - The default value must be overridden if the flag is provided; and - The flag can be supplied more than once, and extends a list. Signed-off-by: John Pennycook <[email protected]>
It is common for a compiler pass to imply one or more modes. For example, enabling any SYCL device pass implies SYCL mode. Signed-off-by: John Pennycook <[email protected]>
While working on fixing a bug in a later stage of this, I realized that some of the compiler definition files I'd written were failing validation. I've added the missing keys to the schema. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issues
Proposed changes
alias_of
: Defines that a compiler is an alias of another (e.g.,icpx
is an alias oficx
)[[compiler."compiler name".parser]]
: A table of arguments forargparse
.[[compiler."compiler name".modes]]
: A table of "modes", each of which is a collection of compiler behaviors that can later be enabled by a flag (e.g.,-fopenmp
enables the "openmp" mode, which in turn defines_OPENMP
, etc).[[compiler."compiler name".passes]]
: A table of "passes", each of which is a collection of compiler behaviors associated with a separate pass over a source file (e.g.,-fsycl-targets=spir64,nvidia-ptx-cuda
will compile the source file to SPIR-V and PTX, with different macros defined).I appreciate that JSON schema can be really difficult to read, so I've tried extra hard to improve the readability of the tests here. Each call to
_test_toml_string
without anassertRaises
demonstrates the syntax of a valid use-case. Each call with anassertRaises
is intended to test either aoneOf
,additionalProperties
orrequired
clause in the schema.