Create Descriptor for all Stage types#132
Merged
Conversation
This PR modifies the drivers, passes, transforms, stages, etc. to receive a Descriptor object instead of loose strings and dictionaries. The key main benefit of this is that it centralizes the handling of filenames, arguments, options into one place and avoids having to export internal functions to other modules. Another main benefit is that it allows Python programs to "construct" stages on the fly, using filenames, arguments and options from their Python data structures directly, without needing to serialize / deserialize strings to match. Passing the string format to the constructor of Descriptor does the decomposition automatically, so the internal representation is _always_ in Python data structures. This helps when parsing from the command line, to have the same behaviour as when constructing from Python. This is a big change, but localized in the pipeline module, so no external users should see any difference. This is required for upcoming changes to the `kernel_bench` tool, when we start decomposing the existing CPU and GPU pipelines into a dynamic pipeline. add a descriptor class to handle serialization move all parsing to descriptor basename stringify permeate Descriptor, still some left overs removing str from all arguments Descriptors on Pass and Transform cache descriptor type Co-authored-by: Copilot <copilot@github.com>
Member
Author
|
Passes XeGPU tests: |
tkarna
approved these changes
May 7, 2026
This file contains hidden or 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
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.
This PR modifies the drivers, passes, transforms, stages, etc. to receive a Descriptor object instead of loose strings and dictionaries.
The key main benefit of this is that it centralizes the handling of filenames, arguments, options into one place and avoids having to export internal functions to other modules.
Another main benefit is that it allows Python programs to "construct" stages on the fly, using filenames, arguments and options from their Python data structures directly, without needing to serialize / deserialize strings to match.
Passing the string format to the constructor of Descriptor does the decomposition automatically, so the internal representation is always in Python data structures. This helps when parsing from the command line, to have the same behaviour as when constructing from Python.
This is a big change, but localized in the pipeline module, so no external users should see any difference. This is required for upcoming changes to the
kernel_benchtool, when we start decomposing the existing CPU and GPU pipelines into a dynamic pipeline.assisted-by: GitHub Copilot