Skip to content

Commit 74b2177

Browse files
committed
[MLC] CI Tweaks
- Revert "[CMake][MSVC] Disable permissive mode for MSVC builds (apache#16343)" - Skip MSC tests - Disable NNPack and TFLite - Tweak CMAKE_CUDA_ARCHITECTURES
1 parent 39429cc commit 74b2177

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,6 @@ if(MSVC)
166166
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
167167
add_compile_options(/bigobj)
168168

169-
# Use standard-conforming two-phase name resolution for templates.
170-
# This minimizes the differences between g++/clang builds on Linux,
171-
# and MSVC builds on Windows.
172-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive-")
173-
174169
# MSVC already errors on undefined symbols, no additional flag needed.
175170
set(TVM_NO_UNDEFINED_SYMBOLS "")
176171

cmake/modules/CUDA.cmake

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,30 @@ if(USE_CUDA)
139139
# Add CUDA builtins to RelaxVM
140140
tvm_file_glob(GLOB RELAX_VM_CUDA_BUILTIN_SRC_CC src/runtime/relax_vm/cuda/*.cc)
141141
list(APPEND RUNTIME_SRCS ${RELAX_VM_CUDA_BUILTIN_SRC_CC})
142+
143+
if(USE_CUTLASS)
144+
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
145+
set(CMAKE_CUDA_COMPILER ${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc)
146+
execute_process(
147+
COMMAND ${CMAKE_CUDA_COMPILER} --version
148+
OUTPUT_VARIABLE NVCC_VERSION_OUTPUT
149+
)
150+
if(NVCC_VERSION_OUTPUT MATCHES "release ([^,]+),")
151+
set(CUDA_VERSION "${CMAKE_MATCH_1}")
152+
endif(NVCC_VERSION_OUTPUT MATCHES "release ([^,]+),")
153+
message(STATUS "CUDA_VERSION=${CUDA_VERSION}")
154+
155+
if(CUDA_VERSION VERSION_GREATER_EQUAL 11.8)
156+
set(CMAKE_CUDA_ARCHITECTURES "75;80;86;89;90")
157+
else(CUDA_VERSION VERSION_GREATER_EQUAL 11.8)
158+
set(CMAKE_CUDA_ARCHITECTURES "75;80;86")
159+
endif(CUDA_VERSION VERSION_GREATER_EQUAL 11.8)
160+
message(STATUS "Set CMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES}")
161+
else(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
162+
message(STATUS "Found CMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES}")
163+
endif(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
164+
endif(USE_CUTLASS)
165+
142166
else(USE_CUDA)
143167
list(APPEND COMPILER_SRCS src/target/opt/build_cuda_off.cc)
144168
endif(USE_CUDA)

tests/scripts/task_config_build_cpu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ echo set\(HIDE_PRIVATE_SYMBOLS ON\) >> config.cmake
3434
# with the change in the way TFLite is built. It can be
3535
# removed once we migrate to TensorFlow and TFLite > 2.9.1
3636
if [ -d "/opt/tflite" ]; then
37-
echo set\(USE_TFLITE \"/opt/tflite\"\) >> config.cmake
37+
echo set\(USE_TFLITE OFF\) >> config.cmake
3838
else
39-
echo set\(USE_TFLITE ON\) >> config.cmake
39+
echo set\(USE_TFLITE OFF\) >> config.cmake
4040
fi
4141

4242
echo set\(USE_TENSORFLOW_PATH \"/tensorflow\"\) >> config.cmake

tests/scripts/unity/task_python_relax.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ TVM_TEST_TARGETS="${TVM_RELAY_TEST_TARGETS:-llvm}" pytest tests/python/dlight
4141
pytest tests/python/contrib/test_msc
4242

4343
# Test for OpenCLML
44-
pytest tests/python/relax/backend/clml/
44+
# pytest tests/python/relax/backend/clml/

0 commit comments

Comments
 (0)