Skip to content

Conversation

bob80905
Copy link
Collaborator

@bob80905 bob80905 commented Aug 18, 2025

This PR adds new lit test suites, that build by downloading and unzipping 5 release packages. The release packages are a selection of historical packages that will be useful in later testing for validation back-compatibility. However, this data can also be used for other testing, and doesn't necessarily need to be restricted to older packages. For now, 5 releases have been included, including the latest 3 releases at the time of this writing.
This PR then executes these test suites with an environment variable that points to the dxil.dll that was just downloaded, so that in the future, DxcDllExtValLoader can grab the dxil.dll path and initialize appropriately.
This PR effectively sets up a test suite and an environment so that back compat work is possible.
Adds some final touches on @damyanp's work.
Fixes #7707

@damyanp
Copy link
Member

damyanp commented Aug 18, 2025

IMO it'd be good to combine this with the PR that actually lights up this testing. Then we can see that everything is working together as planned.

@bob80905 bob80905 force-pushed the download_dxc_release_zips branch from 7ada634 to de8f1a0 Compare August 20, 2025 19:17
Copy link
Contributor

github-actions bot commented Aug 20, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@bob80905 bob80905 force-pushed the download_dxc_release_zips branch from c5ce73c to 29a74c8 Compare August 21, 2025 03:17
else()
# Single-config generators (Ninja, Makefiles)
# Use pointer size to guess x86 vs x64
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
Copy link
Member

Choose a reason for hiding this comment

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

How does ARM fit into this?

Comment on lines 17 to 19
print("PARAMS seen in top level config:", lit_config.params)


Copy link
Member

Choose a reason for hiding this comment

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

Is this left-over debugging code, or do you think this should be here long term?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Left-over.

dxc::DxcDllExtValidationLoader ExtSupport;
ExtSupport.Initialize();
std::string dllPath = ExtSupport.GetDxilDllPath();
VERIFY_IS_TRUE(dllPath.empty());
Copy link
Member

Choose a reason for hiding this comment

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

What does it mean that dllPath is empty? I'm trying to understand what this test is testing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test is going to be out of scope for now. I'm going to focus on getting check-clang to work with older external validators.
But the point was, this test would be run when an older validator was set in the env var, and so we expect initialization to pull the env var's value and the loader object should have a stored dll path (it shouldn't be empty since it was read from the env var). It would only be empty if the env var was never set, thus proving that the infrastructure correctly set the environment.
This shouldn't be tested quite yet since it seems like a whole separate ordeal to add taef-based tests. We'll probably need to adjust the standard taef-test filter so that the original check-clang-taef_exec target runs on .ll / .hlsl / .test, AND .cpp files that are NOT the back-compat validation tests, otherwise they would fail since the environment wasn't set up.
It's a separate problem for now.

@@ -196,6 +196,20 @@ std::string DisassembleProgram(dxc::DxCompilerDllLoader &dllSupport,
return BlobToUtf8(pDisassembly);
}

std::string DisassembleProgram(dxc::DxcDllExtValidationLoader &dllSupport,
Copy link
Member

Choose a reason for hiding this comment

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

I'm having trouble connecting the dots here as to why the changes involving DisassembleProgram are related to the rest of these changes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this was when I had thought I could do taef tests and modify the loaders all in one PR, I do think this will be needed, but later :)

Copy link
Member

Choose a reason for hiding this comment

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

Should we keep this in this change or should it be pulled out to the later one?

@bob80905 bob80905 changed the title Add functionality to download and unzip release packages in build dir when building Add back compat lit test suite, and downlaod older dxil.dll's Aug 21, 2025
@bob80905 bob80905 changed the title Add back compat lit test suite, and downlaod older dxil.dll's Add back compat lit test suite, and download older dxil.dll's Aug 26, 2025
@@ -196,6 +196,20 @@ std::string DisassembleProgram(dxc::DxCompilerDllLoader &dllSupport,
return BlobToUtf8(pDisassembly);
}

std::string DisassembleProgram(dxc::DxcDllExtValidationLoader &dllSupport,
Copy link
Member

Choose a reason for hiding this comment

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

Should we keep this in this change or should it be pulled out to the later one?

@@ -13,7 +13,8 @@ stages:
- stage: Build
jobs:
- job: Windows
timeoutInMinutes: 120
# Including back-compat tests with 3 older validators, about 15 minutes each
Copy link
Member

Choose a reason for hiding this comment

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

TBH I find this comment a bit unnecessary. It justifies the change, but for a comment itself why doesn't it say something about how long all of the other things are taking? Mentioning the reason for the diff in the commit is worthwhile, but otherwise this starts begging questions. Like: why isn't it 45 minutes if it's doing 3 things that are 15 mins each?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that's fair, I'll remove the comment

Copy link
Member

@damyanp damyanp left a comment

Choose a reason for hiding this comment

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

LGTM, ready to do the next part!

We can keep an eye on build times and decide what to do to mitigate if they're significantly longer.

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.

[Validation] Edit CMake to set environment variable DXC_DXIL_DLL_PATH when running lit test suites.
2 participants