Skip to content

[WARP] Make default WARP version "Last Known Good" #343

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions .github/workflows/windows-amd-clang-warp-preview-d3d12.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Windows D3D12 Warp Preview Clang

permissions:
contents: read
checks: write

on:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *' # run every 2 hours

jobs:
Windows-D3D12-Warp-Clang:
uses: ./.github/workflows/build-and-test-callable.yaml
with:
OS: windows
SKU: windows-amd
TestTarget: check-hlsl-clang-warp-d3d12
OffloadTest-branch: ${{ github.ref }}
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DOFFLOADTEST_USE_CLANG_TIDY=On -DWARP_VERSION=1.0.15-preview
21 changes: 21 additions & 0 deletions .github/workflows/windows-amd-dxc-warp-preview-d3d12.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Windows D3D12 Warp Preview DXC

permissions:
contents: read
checks: write

on:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *' # run every 2 hours

jobs:
Windows-D3D12-Warp-DXC:
uses: ./.github/workflows/build-and-test-callable.yaml
with:
OS: windows
SKU: windows-amd
BuildType: Debug
TestTarget: check-hlsl-warp-d3d12
OffloadTest-branch: ${{ github.ref }}
LLVM-ExtraCMakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DWARP_VERSION=1.0.15-preview
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Experimental Runtime test suite for HLSL
| Windows DirectX12 AMD GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-dxc-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-clang-d3d12.yaml/badge.svg) |
| Windows DirectX12 Intel GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-intel-dxc-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-intel-clang-d3d12.yaml/badge.svg) |
| Windows DirectX12 NVIDIA GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-nvidia-dxc-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-nvidia-clang-d3d12.yaml/badge.svg) |
| Windows DirectX12 Warp | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-dxc-warp-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-clang-warp-d3d12.yaml/badge.svg) |
| Windows DirectX12 Warp (LKG) | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-dxc-warp-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-clang-warp-d3d12.yaml/badge.svg) |
| Windows DirectX12 Warp (1.0.15-preview) | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-dxc-warp-preview-d3d12.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-clang-warp-preview-d3d12.yaml/badge.svg) |
| Windows Vulkan AMD GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-dxc-vk.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-amd-clang-vk.yaml/badge.svg) |
| Windows Vulkan Intel GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-intel-dxc-vk.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-intel-clang-vk.yaml/badge.svg) |
| Windows Vulkan NVIDIA GPU | ![DXC](https://github.com/llvm/offload-test-suite/actions/workflows/windows-nvidia-dxc-vk.yaml/badge.svg) | ![Clang](https://github.com/llvm/offload-test-suite/actions/workflows/windows-nvidia-clang-vk.yaml/badge.svg) |
Expand Down
19 changes: 16 additions & 3 deletions cmake/modules/Warp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,30 @@ function(setup_warp version)
return()
endif()

message(STATUS "Fetching WARP ${version}...")
if (version STREQUAL "LKG")
set(version "1.0.14.2")
set(version_description "Latest Known Good (${version})")
else ()
set(version_description "Custom (${version})")
endif()

message(STATUS "Fetching WARP ${version_description}...")

set(WARP_ARCHIVE "${CMAKE_CURRENT_BINARY_DIR}/Microsoft.Direct3D.WARP.${version}.zip")
file(DOWNLOAD "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/${version}/" ${WARP_ARCHIVE})
if (version STREQUAL "Latest")
file(DOWNLOAD "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/" ${WARP_ARCHIVE})
else()
file(DOWNLOAD "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.WARP/${version}/" ${WARP_ARCHIVE})
endif()


guess_nuget_arch(NUGET_ARCH)

file(ARCHIVE_EXTRACT INPUT ${WARP_ARCHIVE} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/warp" PATTERNS *${NUGET_ARCH}*dll *${NUGET_ARCH}*pdb)

file(GLOB_RECURSE LIBS "${CMAKE_CURRENT_BINARY_DIR}/warp/*.dll" $<IF:$<CONFIG:DEBUG>,"${CMAKE_CURRENT_BINARY_DIR}/warp/*.pdb">)

file(MAKE_DIRECTORY "${LLVM_RUNTIME_OUTPUT_INTDIR}")
foreach(FILE ${LIBS})
get_filename_component(FILENAME ${FILE} NAME)
file(COPY_FILE ${FILE} "${LLVM_RUNTIME_OUTPUT_INTDIR}/${FILENAME}")
Expand All @@ -40,5 +53,5 @@ function(setup_warp version)
file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/warp")
endfunction()

set(WARP_VERSION "System" CACHE STRING "")
set(WARP_VERSION "LKG" CACHE STRING "")
setup_warp(${WARP_VERSION})
12 changes: 7 additions & 5 deletions docs/WARP.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ WARP:
non-WARP configurations. This is useful if you're running Windows in a VM and
do not have a physical GPU.

* **WARP_VERSION** - Defaults to `System` which uses the system version of WARP.
This option may also be set to an explicit WARP version, and the configuration
step will pull WARP from NuGet. See the [NuGet package
listing](https://www.nuget.org/packages/Microsoft.Direct3D.WARP) to identify
valid versions.
* **WARP_VERSION** - Defaults to `LKG` which uses a Known-Good version of WARP.
This is the default version tested in the GitHub actions. Alternatively this
option may be set to the special values `System` to use the system version or
`Latest` to use the latest non-preview version, or it may be set to an
explicit WARP version, and the configuration step will pull WARP from NuGet.
See the [NuGet package listing](https://www.nuget.org/packages/Microsoft.Direct3D.WARP)
to identify valid versions.
Loading