Skip to content

Commit 5c326e7

Browse files
committed
Use WARP from nuget by default (#7427)
Previously using WARP from nuget was something that had to be opted in to. This change makes it the default behvior. This allows some simplifications. The nuget package is installed at configure time. If the user wants to override the nuget installation behavior then they can pass in extra parameters, rather than having an alternative mechanism for describing which package to use. The actual DLL to load is specified through a TAEF parameter and specifies the full path to the DLL. (cherry picked from commit 33dd542) Manually moved changes from HlslExecTestUtils.h into ExecutionTest.cpp
1 parent 5332b16 commit 5c326e7

File tree

8 files changed

+179
-299
lines changed

8 files changed

+179
-299
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ stages:
4444
displayName: 'DXIL Tests'
4545
- script: |
4646
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
47-
call utils\hct\hcttest.cmd -$(configuration) exec-warp
48-
displayName: 'DXIL Execution Tests (Nuget WARP)'
47+
call utils\hct\hcttest.cmd -$(configuration) exec
48+
displayName: 'DXIL Execution Tests'
4949
5050
- job: Nix
5151
timeoutInMinutes: 120

cmake/modules/Nuget.cmake

Lines changed: 0 additions & 233 deletions
This file was deleted.

tools/clang/test/CMakeLists.txt

Lines changed: 35 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ configure_lit_site_cfg(
2626
${CMAKE_CURRENT_BINARY_DIR}/taef/lit.site.cfg
2727
)
2828

29+
# HLSL Change begin
30+
# This must be done before configuring taef_exec's lit.site.cfg.
31+
include(taef_exec/DownloadWarp.cmake)
32+
# HLSL Change end
33+
34+
2935
configure_lit_site_cfg(
3036
${CMAKE_CURRENT_SOURCE_DIR}/taef_exec/lit.site.cfg.in
3137
${CMAKE_CURRENT_BINARY_DIR}/taef_exec/lit.site.cfg
@@ -122,54 +128,40 @@ add_lit_testsuites(CLANG ${CMAKE_CURRENT_SOURCE_DIR}
122128
FOLDER "Clang tests/Suites"
123129
)
124130

125-
# Manually generate targets that we need to expose in visual studio builds.
126-
127-
# The code below here _ONLY_ executes when building with Visual Studio or Xcode.
128-
if (NOT CMAKE_CONFIGURATION_TYPES)
129-
return()
130-
endif()
131131

132-
# Add the unit test suite
133-
add_lit_target("check-clang-unit" "Running lit suite clang-unit"
134-
${CMAKE_CURRENT_SOURCE_DIR}/Unit
135-
PARAMS ${CLANG_TEST_PARAMS}
136-
DEPENDS ClangUnitTests
137-
ARGS ${CLANG_TEST_EXTRA_ARGS}
138-
)
132+
# add_lit_testsuites doesn't generate targets for Visual Studio or Xcode builds
133+
# (since these IDEs cannot handle the huge number of targets it generates).
134+
#
135+
# We must manually generate targets that we want to expose when using these
136+
# generators.
137+
if(CMAKE_CONFIGURATION_TYPES)
139138

140-
# Add TAEF targets
141-
if (WIN32)
142-
add_lit_target("check-clang-taef" "Running lit suite hlsl"
143-
${CMAKE_CURRENT_SOURCE_DIR}/taef
144-
PARAMS ${CLANG_TEST_PARAMS}
145-
DEPENDS ClangHLSLTests
146-
ARGS ${CLANG_TEST_EXTRA_ARGS}
147-
)
148-
set(TAEF_EXEC_ADAPTER "" CACHE STRING "adapter for taef exec test")
149-
150-
# Use a custom target so we can depend on it and re-run the cmake logic which downloads warp
151-
# from nuget if requested.
152-
add_custom_target(WarpFromNuget
153-
COMMAND "${CMAKE_COMMAND}"
154-
-DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}
155-
-DBUILD_TYPE=${CMAKE_BUILD_TYPE}
156-
-DBINARY_DIR=${CMAKE_BINARY_DIR}
157-
-P "${CMAKE_SOURCE_DIR}/cmake/modules/nuget.cmake")
158-
159-
add_lit_target("check-clang-taef-exec" "Running lit suite hlsl execution test"
160-
${CMAKE_CURRENT_SOURCE_DIR}/taef_exec
139+
# Add the unit test suite
140+
add_lit_target("check-clang-unit" "Running lit suite clang-unit"
141+
${CMAKE_CURRENT_SOURCE_DIR}/Unit
161142
PARAMS ${CLANG_TEST_PARAMS}
162-
adapter=${TAEF_EXEC_ADAPTER}
163-
DEPENDS ExecHLSLTests dxexp
143+
DEPENDS ClangUnitTests
164144
ARGS ${CLANG_TEST_EXTRA_ARGS}
165145
)
166146

167-
add_lit_target("check-clang-taef-exec-warp" "Running lit suite hlsl execution test with D3D WARP from nuget"
168-
${CMAKE_CURRENT_SOURCE_DIR}/taef_exec
169-
PARAMS ${CLANG_TEST_PARAMS}
170-
adapter=${TAEF_EXEC_ADAPTER}
171-
DEPENDS ExecHLSLTests dxexp WarpFromNuget
172-
ARGS ${CLANG_TEST_EXTRA_ARGS}
173-
)
147+
# Add TAEF targets
148+
if(WIN32)
149+
add_lit_target("check-clang-taef" "Running lit suite hlsl"
150+
${CMAKE_CURRENT_SOURCE_DIR}/taef
151+
PARAMS ${CLANG_TEST_PARAMS}
152+
DEPENDS ClangHLSLTests
153+
ARGS ${CLANG_TEST_EXTRA_ARGS}
154+
)
155+
set(TAEF_EXEC_ADAPTER "" CACHE STRING "adapter for taef exec test")
156+
157+
add_lit_target("check-clang-taef-exec" "Running lit suite hlsl execution test"
158+
${CMAKE_CURRENT_SOURCE_DIR}/taef_exec
159+
PARAMS ${CLANG_TEST_PARAMS}
160+
adapter=${TAEF_EXEC_ADAPTER}
161+
DEPENDS ExecHLSLTests dxexp
162+
ARGS ${CLANG_TEST_EXTRA_ARGS}
163+
)
164+
endif()
174165
endif()
166+
175167
# HLSL Change End

0 commit comments

Comments
 (0)