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 auto-dxilver logic in FileCheckerTest #6368

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

tex3d
Copy link
Contributor

@tex3d tex3d commented Feb 28, 2024

In FileCheckerTest.cpp, the -T target of a %dxc part is checked for compatibility. However, if you use -Vd, it skips the version check for the validator. This isn't quite right since the validator version will be set from the attached validator, unless you explicitly set -validator-version or use -select-validator internal. Also, if -validator-version is explicitly set, we should check the validator against that version, not just the one based on shader model.

This change fixes the initial check logic to only skip validator check when using -select-validator internal or -validator-version. It also checks against an explicitly requested -validator-version when an external validator will be used.

Fixes #6367

In FileCheckerTest.cpp, the -T target of a %dxc part is checked for compatibility.
However, if you use -Vd, it skips the version check for the validator.
This isn't quite right since the validator version will be set from the attached validator, unless you explicitly set -validator-version or use -select-validator internal.
Also, if -validator-version is explicitly set, we should check the validator against that version, not just the one based on shader model.

This change fixes the initial check logic to only skip validator check when using -select-validator internal or -validator-version.
It also checks against an explicitly requested -validator-version when an external validator will be used.
@pow2clk pow2clk self-assigned this Mar 25, 2024
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.

I believe that the lack of support for loading external test validators prevents us from committing this with any testing really, but I think we have some internal testing that will allow it. Is that correct? Will there be testing there? The state of #5952 doesn't currently allow lower version validators, but it could. Do you think we should polish that off and get it in for the sake of this?

@python3kgae
Copy link
Contributor

Does lit FileCheck with things like

 REQUIRES: dxil-1-8 

have the same issue?

@damyanp
Copy link
Member

damyanp commented Mar 26, 2024

Will there be testing there?

Seems there should be some test coverage for this. If we can't test is then that presumably means that there's no observable change from this at all?

@tex3d
Copy link
Contributor Author

tex3d commented Apr 23, 2024

@pow2clk

I believe that the lack of support for loading external test validators prevents us from committing this with any testing really, but I think we have some internal testing that will allow it. Is that correct? Will there be testing there? The state of #5952 doesn't currently allow lower version validators, but it could. Do you think we should polish that off and get it in for the sake of this?

As you say, #5952 wouldn't help in its current state. I'm not sure how we would add testing for lower versions, other than perhaps building multiple validators and versioning them in this way. That seems like overkill for testing this mechanism in our FileCheckerTest. I could add a test that doesn't necessarily trip this scenario in CI testing here, but would verify that this mechanism works upon integration testing internally. Would that be acceptable instead?

@damyanp

Seems there should be some test coverage for this. If we can't test is then that presumably means that there's no observable change from this at all?

There's an observable change in our internal downlevel validator coverage upon integration. I can add a test that would trigger a failure there without the fix.

@python3kgae

Does lit FileCheck with things like

 REQUIRES: dxil-1-8 

have the same issue?

No, this does not have the same issue.


I will add a test that would fail our internal integration testing. Hopefully that is sufficient.

@tex3d tex3d requested a review from a team as a code owner April 24, 2024 22:21
@tex3d tex3d merged commit dbb9c97 into microsoft:main Apr 25, 2024
12 checks passed
@tex3d tex3d deleted the add-dxilver-for-lib68-tests branch April 25, 2024 16:51
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.

FileCheckerTest incorrectly skips validator version check when -Vd specified
5 participants