Skip to content

NFC: ExtractIRForPassTest.py: add tool path option and -hlsl-passes-pause#8447

Open
tex3d wants to merge 1 commit into
microsoft:mainfrom
tex3d:extractir-update
Open

NFC: ExtractIRForPassTest.py: add tool path option and -hlsl-passes-pause#8447
tex3d wants to merge 1 commit into
microsoft:mainfrom
tex3d:extractir-update

Conversation

@tex3d
Copy link
Copy Markdown
Contributor

@tex3d tex3d commented May 12, 2026

Adds a -t or --tool-path option for specifying the directory containing dxc and dxopt tools and improves error handling for missing tools.

Also adds -hlsl-passes-pause to the suggested test RUN line after the target pass, since this is needed to update the metadata in the resulting checked IR, when a pass might impact HLModule or DxilModule state.

…ause

Adds a -t or --tool-path option for specifying the directory containing dxc and dxopt tools and improves error handling for missing tools.

Also adds -hlsl-passes-pause to the suggested test RUN line after the target pass, since this is needed to update the metadata in the resulting checked IR, when a pass might impact HLModule or DxilModule state.
Copy link
Copy Markdown
Collaborator

@bob80905 bob80905 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit, otherwise looks good to us @alsepkow

dxopt_path = os.path.join(args.tool_path, dxopt_path)
if not os.path.isfile(dxc_path) or not os.path.isfile(dxopt_path):
raise FileNotFoundError(
f"dxc not found at {dxc_path}. Use -t to specify path to dxc and dxopt."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An error may be raised if dxopt isn't found, couldn't this be clarified with the below error message that you wrote?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants