Skip to content
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 DXIL 1.8 op code cap and move WaveMatrix intrisics to SM 6.9 #6163

Merged
merged 4 commits into from
Jan 20, 2024

Conversation

hekota
Copy link
Member

@hekota hekota commented Jan 19, 2024

Adds max opcode value for DXIL 1.8 and moves WaveMatrix intrinsics into future shader model 6.9.

Contributes to #6133
Related to #6125

@pow2clk
Copy link
Member

pow2clk commented Jan 19, 2024

Ironically, the failures reveal success. The shaders that were targeting earlier shader models are failing. It would be nice to have a simple test that verifies those failures.

@hekota hekota marked this pull request as ready for review January 19, 2024 23:32
Copy link
Member

@pow2clk pow2clk left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the quick work!

@pow2clk
Copy link
Member

pow2clk commented Jan 19, 2024

I changed the description from "fixes" to "contributes to" in order to keep the bug open since we'd still like a test for the original failure of allowing these in earlier shader models.

@pow2clk pow2clk enabled auto-merge (squash) January 20, 2024 00:13
Copy link
Contributor

@tex3d tex3d left a comment

Choose a reason for hiding this comment

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

Looks good!

@pow2clk pow2clk merged commit 6d8645f into microsoft:main Jan 20, 2024
12 checks passed
hekota added a commit that referenced this pull request Jan 22, 2024
@MarijnS95
Copy link
Contributor

MarijnS95 commented Jul 31, 2024

Hi! Is there any possible way to test the new cs_6_9 profile now? Judging from the commit Remove lit.local.config - this directory is not scanned by lit it is not intended to be reachable at all, and I get error: invalid profile cs_6_9 out of CGHLSLMS.cpp, presumably because hlsl::ShaderModel is invalid as there is no parser variant for the number '9' yet, not even on main as of today:

case '8':
if (Major == 6) {
Minor = 8;
break;
} else
return GetInvalid();
// VALRULE-TEXT:END
case 'x':
if (kind == Kind::Library && Major == 6) {
Minor = kOfflineMinor;
break;
} else
return GetInvalid();
default:
return GetInvalid();

Is this intended to be reenabled for testing at some point? It is blocking us from upgrading DXC as we have experimental shaders with WaveMatrix intrinsics.

EDIT

The bump apparently already happened in 15fe220 (and #6465 probably relies on it?) for the mesh-node preview branch.

That release indeed accepts the cs_6_9 profile!

Unfortunately it doesn't help us much because one particular reason to upgrade the compiler is to revert our workaround that was addressed with the closing of #6173 / #6087.

@hekota
Copy link
Member Author

hekota commented Aug 1, 2024

Sorry @MarijnS95, WaveMatrix support is getting removed in #6807.

@llvm-beanz
Copy link
Collaborator

Hi! Is there any possible way to test the new cs_6_9 profile now? Judging from the commit Remove lit.local.config - this directory is not scanned by lit

Just to clarify something here. The HLSLFileCheck test directory has never been scanned by LIT. Those tests have a separate runner, and are scanned by the unit test implemented here. It's an odd legacy of the way DXC's Windows-only testing strategy was done.

@MarijnS95
Copy link
Contributor

Sorry @MarijnS95, WaveMatrix support is getting removed in #6807.

@hekota thanks for the update, but is there anywhere I can read up on what this is about? Are the ops deprecated and will they be replaced by a different spec in the future, or just out of scope for DXC at the time?


Just to clarify something here. The HLSLFileCheck test directory has never been scanned by LIT. Those tests have a separate runner, and are scanned by the unit test implemented here. It's an odd legacy of the way DXC's Windows-only testing strategy was done.

@llvm-beanz thanks for poinging that out, looks like it was a red herring because the file was only temporarily introduced in this PR.

The thing making sure that the tests don't run at all with the unsupported _6_9 profile must be #6807 then.

@hekota
Copy link
Member Author

hekota commented Aug 6, 2024

@hekota thanks for the update, but is there anywhere I can read up on what this is about? Are the ops deprecated and will they be replaced by a different spec in the future, or just out of scope for DXC at the time?

AFAIK the ops are marked reserved. I am not sure if they would be reused in the future or stay reserved forever. @damyanp?

@damyanp
Copy link
Member

damyanp commented Aug 6, 2024

@hekota thanks for the update, but is there anywhere I can read up on what this is about? Are the ops deprecated and will they be replaced by a different spec in the future, or just out of scope for DXC at the time?

AFAIK the ops are marked reserved. I am not sure if they would be reused in the future or stay reserved forever. @damyanp?

It's unclear what the exact future here is at the moment. However, I would strongly advise against making any assumptions about the meaning of these opcodes being stable.

@MarijnS95
Copy link
Contributor

@damyanp thanks, I'm not specifically looking at these opcodes but more about the WaveMatrix feature in general. I haven't written this shader code and am completely out of the loop about this experimental feature, and am merely seeking for advice on what to tell my coworkers about this future of their shader and the impact on updating our shader compiler. If this is something that is expected to continue working on the driver end, we'll likely hold off DXC upgrades or include an older DXC to keep using it.

@damyanp
Copy link
Member

damyanp commented Aug 12, 2024

I can't speak for the GPU vendors and their plans for supporting this experimental feature that was never released.

We are continuing to look into possible future features that support the scenarios and hardware that WaveMatrix was intended for, but I would be very surprised if whatever we end up with allows these experimental shaders to continue working without modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants