Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 47 additions & 6 deletions .github/workflows/build-and-test-callable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,16 @@ jobs:
uses: llvm/actions/setup-windows@89a8cf80982d830faab019237860b344a6390c30 # main
with:
arch: arm64
# When SplitBuild is enabled, force clang into the build set even if
# the TestTarget doesn't use it. Reason: install-distribution depends
# on clang (it ships in the install prefix), so if clang isn't part
# of hlsl-test-depends, the Install step ends up doing a from-scratch
# clang compile that dwarfs Build LLVM. Including it here keeps all
# compile work inside Build LLVM and reduces Install to seconds.
- name: Detect Clang
id: Test-Clang
shell: bash
if: contains(inputs.TestTarget, 'clang')
if: contains(inputs.TestTarget, 'clang') || inputs.SplitBuild == true
run: echo TEST_CLANG=On >> $GITHUB_OUTPUT
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand All @@ -201,6 +207,14 @@ jobs:
cd build
cmake -G Ninja ${{ inputs.LLVM-ExtraCMakeArgs }} -DCMAKE_BUILD_TYPE=${{ inputs.BuildType }} -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_EXTERNAL_PROJECTS="OffloadTest" -DHLSL_ENABLE_OFFLOAD_DISTRIBUTION=${{ inputs.SplitBuild == true && 'On' || 'Off' }} -C ${{ github.workspace }}/llvm-project/clang/cmake/caches/HLSL.cmake -C ${{ github.workspace }}/OffloadTest/cmake/caches/sccache.cmake -DDXC_DIR=${{ github.workspace }}/DXC/build/bin -DLLVM_EXTERNAL_OFFLOADTEST_SOURCE_DIR=${{ github.workspace }}/OffloadTest -DLLVM_LIT_ARGS="--xunit-xml-output=testresults.xunit.xml -v" -DOFFLOADTEST_TEST_CLANG=${{steps.Test-Clang.outputs.TEST_CLANG || 'Off' }} -DGOLDENIMAGE_DIR=${{ github.workspace }}/golden-images -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install ${{ github.workspace }}/llvm-project/llvm/
ninja hlsl-test-depends
# Surface sccache cache state after the heavy compile work so we can
# track hit rate / cache size across runs and diagnose cold-cache
# blowups on new builders. Always-runs so we still get stats on
# build failure.
- name: Dump sccache Stats
if: always()
shell: bash
run: sccache --show-stats || true
- name: Dump GPU Info (build runner)
if: inputs.SplitBuild != true
run: |
Expand Down Expand Up @@ -362,11 +376,38 @@ jobs:
arch: arm64
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
# The test runner needs only lit + pyyaml; no source checkout is
# available so we can't pip install -r requirements.txt. Keep
# this list in sync with OffloadTest/test/requirements.txt.
pip-install: lit pyyaml
- name: Install lit and pyyaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

From here I can verify that the sccache step is running as expected.

But it seems like this step isn't and it still uses the user path?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Here is an example where this step runs:
https://github.com/llvm/offload-test-suite/actions/runs/26776253602/job/78937729286?pr=1225#step:8:138
I believe the linked pipeline you're looking at doesn't have the split build-feature enabled.
From what I can gather, the pipelines without my changes, triggered by PR matrix and configured as exec tests are run. And, the workflows I changed are individually run with the changes.
Execution Testing is the prefix for the unchanged runs, it looks like, and Windows is the prefix for the runs with my changes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see thanks. Okay that makes more sense.

# The test runner needs only lit + pyyaml. We install from the
# requirements.txt that the build job ships inside the install
# prefix (test/CMakeLists.txt installs it under the
# offload-test-suite component). That keeps a single source of
# truth for pinned versions and avoids drift between this step
# and OffloadTest/test/requirements.txt.
#
# We invoke pip explicitly here instead of relying on
# setup-python's `pip-install:` input, which was observed to
# silently no-op on our self-hosted Windows runners.
#
# When pip can't write to the interpreter's system site-packages
# (e.g. on self-hosted Windows runners running as NetworkService,
# which can't write under C:\Program Files\Python313; or on a
# POSIX host where the system Python is owned by root), pip
# falls back to a --user install. The console script wrappers
# (e.g. lit.exe on Windows, lit on POSIX) then land in the
# user-scheme scripts dir, which is NOT on PATH by default:
# - Windows: %APPDATA%\Python\PythonXY\Scripts
# - Linux: ~/.local/bin
# - macOS: ~/Library/Python/X.Y/bin
# We compute that dir from sysconfig (portable across all three
# platforms) and prepend it to PATH for all subsequent steps so
# `lit` resolves correctly regardless of where pip put it.
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install -r "$GITHUB_WORKSPACE/install/share/hlsl-test-suite/requirements.txt"
user_scripts=$(python -c "import sysconfig; print(sysconfig.get_path('scripts', f'{sysconfig.get_default_scheme()}_user'))")
echo "User scripts dir: $user_scripts"
echo "$user_scripts" >> "$GITHUB_PATH"
Comment thread
tex3d marked this conversation as resolved.
- name: Dump GPU Info (test runner)
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows-amd-clang-d3d12-gbv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ jobs:
SKU: windows-amd
TestTarget: check-hlsl-clang-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_ENABLE_VALIDATION=ON
1 change: 1 addition & 0 deletions .github/workflows/windows-amd-clang-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
SKU: windows-amd
TestTarget: check-hlsl-clang-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
1 change: 1 addition & 0 deletions .github/workflows/windows-amd-clang-vk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
SKU: windows-amd
TestTarget: check-hlsl-clang-vk
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
1 change: 1 addition & 0 deletions .github/workflows/windows-amd-clang-warp-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
SKU: windows-amd
TestTarget: check-hlsl-clang-warp-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ jobs:
SKU: windows-amd
TestTarget: check-hlsl-clang-warp-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On -DWARP_VERSION=1.0.19-preview
1 change: 1 addition & 0 deletions .github/workflows/windows-amd-dxc-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
BuildType: Debug
TestTarget: check-hlsl-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
1 change: 1 addition & 0 deletions .github/workflows/windows-amd-dxc-vk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
BuildType: Debug
TestTarget: check-hlsl-vk
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
1 change: 1 addition & 0 deletions .github/workflows/windows-amd-dxc-warp-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
BuildType: Debug
TestTarget: check-hlsl-warp-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
1 change: 1 addition & 0 deletions .github/workflows/windows-amd-dxc-warp-preview-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
BuildType: Debug
TestTarget: check-hlsl-warp-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DWARP_VERSION=1.0.19-preview
1 change: 1 addition & 0 deletions .github/workflows/windows-intel-clang-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
SKU: windows-intel
TestTarget: check-hlsl-clang-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
1 change: 1 addition & 0 deletions .github/workflows/windows-intel-clang-vk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
SKU: windows-intel
TestTarget: check-hlsl-clang-vk
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
1 change: 1 addition & 0 deletions .github/workflows/windows-intel-dxc-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
BuildType: Debug
TestTarget: check-hlsl-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
1 change: 1 addition & 0 deletions .github/workflows/windows-intel-dxc-vk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
BuildType: Debug
TestTarget: check-hlsl-vk
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
1 change: 1 addition & 0 deletions .github/workflows/windows-nvidia-clang-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
SKU: windows-nvidia
TestTarget: check-hlsl-clang-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
1 change: 1 addition & 0 deletions .github/workflows/windows-nvidia-clang-vk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
SKU: windows-nvidia
TestTarget: check-hlsl-clang-vk
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
1 change: 1 addition & 0 deletions .github/workflows/windows-nvidia-dxc-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
BuildType: Debug
TestTarget: check-hlsl-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
1 change: 1 addition & 0 deletions .github/workflows/windows-nvidia-dxc-vk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
BuildType: Debug
TestTarget: check-hlsl-vk
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
1 change: 1 addition & 0 deletions .github/workflows/windows-qc-clang-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
SKU: windows-qc
TestTarget: check-hlsl-clang-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
1 change: 1 addition & 0 deletions .github/workflows/windows-qc-clang-vk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
SKU: windows-qc
TestTarget: check-hlsl-clang-vk
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
1 change: 1 addition & 0 deletions .github/workflows/windows-qc-clang-warp-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
SKU: windows-qc
TestTarget: check-hlsl-clang-warp-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On
1 change: 1 addition & 0 deletions .github/workflows/windows-qc-dxc-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
BuildType: Debug
TestTarget: check-hlsl-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
1 change: 1 addition & 0 deletions .github/workflows/windows-qc-dxc-vk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
BuildType: Debug
TestTarget: check-hlsl-vk
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
1 change: 1 addition & 0 deletions .github/workflows/windows-qc-dxc-warp-d3d12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
BuildType: Debug
TestTarget: check-hlsl-warp-d3d12
OffloadTest-branch: ${{ github.ref }}
SplitBuild: true
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
7 changes: 7 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,13 @@ install(PROGRAMS ${OFFLOADTEST_SOURCE_DIR}/utils/configure-test-suite.py
DESTINATION ${OFFLOADTEST_INSTALL_TESTDIR}
COMPONENT offload-test-suite)

# Install requirements.txt so the standalone test runner can pip install
# its dependencies (lit, pyyaml) without needing a source checkout. This
# keeps a single source of truth for pinned versions.
install(FILES ${OFFLOADTEST_SOURCE_DIR}/test/requirements.txt
DESTINATION ${OFFLOADTEST_INSTALL_TESTDIR}
COMPONENT offload-test-suite)

# If golden images were available at configure time, ship them inside the
# distribution so the test runner doesn't need to re-checkout the repo.
if (GOLDENIMAGE_DIR AND EXISTS "${GOLDENIMAGE_DIR}")
Expand Down
3 changes: 2 additions & 1 deletion test/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pyyaml>=6.0.0
pyyaml==6.0.2
lit==18.1.8
Loading