Open
Conversation
|
@llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang Author: Joshua Batista (bob80905) ChangesThis PR adds a new distribution to the HLSL cmake file. Full diff: https://github.com/llvm/llvm-project/pull/196640.diff 1 Files Affected:
diff --git a/clang/cmake/caches/HLSL.cmake b/clang/cmake/caches/HLSL.cmake
index 24afcbbda2a40..2826a2ebd2296 100644
--- a/clang/cmake/caches/HLSL.cmake
+++ b/clang/cmake/caches/HLSL.cmake
@@ -14,3 +14,30 @@ if (HLSL_ENABLE_DISTRIBUTION)
"clang;hlsl-resource-headers;clangd"
CACHE STRING "")
endif()
+
+# Enable the offload test suite distribution. This produces a portable
+# install prefix containing all binaries and test files needed to run the
+# HLSL offload test suite on another machine.
+#
+# Install with:
+# cmake --build build --target install-distribution
+# cmake --build build --target install-offload-tools
+# cmake --build build --target install-offload-test-suite
+#
+# Prerequisites on the target machine:
+# - Python 3.6+
+# - pip install lit pyyaml
+# - GPU drivers (D3D12, Vulkan, or Metal depending on test suite)
+# - For non-clang test suites: a DXC executable (clang-dxc is included)
+#
+# After installing, configure and run tests:
+# cd <prefix>/share/hlsl-test-suite
+# ./configure-test-suite.py --suite clang-d3d12
+# lit run/test/clang-d3d12
+if (HLSL_ENABLE_OFFLOAD_DISTRIBUTION)
+ # Lit utilities (FileCheck, split-file, etc.) require LLVM_INSTALL_UTILS.
+ set(LLVM_INSTALL_UTILS ON CACHE BOOL "")
+ set(LLVM_DISTRIBUTION_COMPONENTS
+ "clang;hlsl-resource-headers;FileCheck;split-file;obj2yaml;not"
+ CACHE STRING "")
+endif()
|
Icohedron
reviewed
May 8, 2026
…d check, addressing Deric
Icohedron
reviewed
May 8, 2026
| endif() | ||
|
|
||
| # Enable the offload test suite distribution. Produces a portable install | ||
| # prefix containing the binaries and test data needed to run the HLSL |
Contributor
There was a problem hiding this comment.
The HLSL offload test suite distribution itself doesn't contain the tests. The install-offload-test-suite install target from the offload test suite installs the tests.
Suggested change
| # prefix containing the binaries and test data needed to run the HLSL | |
| # prefix containing the binaries, headers, and libs needed to run the HLSL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new distribution to the HLSL cmake file.
The purpose is so that we can portably distribute binaries to other machines so that offload testing can be optimized.
Assisted by: Github Copilot
This PR was inspired by @Icohedron 's comment here: llvm/offload-test-suite#1149 (comment)
This addresses llvm/offload-test-suite#1150