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

Fix the invalid spirv generation for matrix cast #4588

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

kaizhangNV
Copy link
Contributor

Spirv doesn't have instruction to do the float cast for the matrix type. So we have to convert the matrix row by row, and then construct them to a new matrix.

Update the unit test to make sure the cast won't miss any elements.

Also update the workflow to validate the spirv generation.

@kaizhangNV kaizhangNV requested a review from csyonghe July 10, 2024 03:36
@kaizhangNV kaizhangNV added the pr: non-breaking PRs without breaking changes label Jul 10, 2024
@jkwak-work
Copy link
Collaborator

Were you able to reproduce the validation error locally without upgrading the vulkan sdk version?

@jkwak-work
Copy link
Collaborator

This PR will close #4589.

@kaizhangNV
Copy link
Contributor Author

sdk

Yes, I can. And now the issue is gone with this change.

Comment on lines 50 to 53
$ErrorActionPreference = "SilentlyContinue"
where.exe spirv-dis
spirv-dis --version
$env:SLANG_RUN_SPIRV_VALIDATION='1'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need this change anymore.
The file "windows-selfhosted.yml" is delete at ToT.
The same functionality is implemented in ci.yml, which sets SLANG_RUN_SPIRV_VALIDATION correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I can remove this file from this change.

csyonghe
csyonghe previously approved these changes Jul 10, 2024
Copy link
Collaborator

@csyonghe csyonghe 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 to me.

Spirv doesn't have instruction to do the float cast
for the matrix type. So we have to convert the matrix
row by row, and then construct them to a new matrix.

Update the unit test to make sure the cast won't miss
any elements.
@kaizhangNV
Copy link
Contributor Author

I rebase on TOT and remove the windows-selfhosted.yml.

@csyonghe csyonghe merged commit 82f308c into shader-slang:master Jul 10, 2024
8 of 9 checks passed
@kaizhangNV kaizhangNV deleted the issue/maxtrix_float_convert branch July 23, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants