Skip to content

Create Descriptor for all Stage types#132

Merged
rengolin merged 2 commits intollvm:mainfrom
rengolin:extend_descriptor
May 7, 2026
Merged

Create Descriptor for all Stage types#132
rengolin merged 2 commits intollvm:mainfrom
rengolin:extend_descriptor

Conversation

@rengolin
Copy link
Copy Markdown
Member

@rengolin rengolin commented May 7, 2026

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.

assisted-by: GitHub Copilot

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>
@rengolin rengolin requested review from adam-smnk and tkarna May 7, 2026 11:43
@rengolin
Copy link
Copy Markdown
Member Author

rengolin commented May 7, 2026

Comment thread lighthouse/pipeline/descriptor.py Outdated
@rengolin rengolin merged commit 3c4631a into llvm:main May 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants