Skip to content

Commit

Permalink
[MLC] CI Tweaks
Browse files Browse the repository at this point in the history
- Revert "[CMake][MSVC] Disable permissive mode for MSVC builds (#16343)"
- Skip MSC tests
- Disable NNPack and TFLite
- Tweak CMAKE_CUDA_ARCHITECTURES
  • Loading branch information
MasterJH5574 committed Sep 28, 2024
1 parent 0df3c60 commit 2c9fa6e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,6 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
add_compile_options(/bigobj)

# Use standard-conforming two-phase name resolution for templates.
# This minimizes the differences between g++/clang builds on Linux,
# and MSVC builds on Windows.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive-")

# MSVC already errors on undefined symbols, no additional flag needed.
set(TVM_NO_UNDEFINED_SYMBOLS "")

Expand Down
24 changes: 24 additions & 0 deletions cmake/modules/CUDA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,30 @@ if(USE_CUDA)
# Add CUDA builtins to RelaxVM
tvm_file_glob(GLOB RELAX_VM_CUDA_BUILTIN_SRC_CC src/runtime/relax_vm/cuda/*.cc)
list(APPEND RUNTIME_SRCS ${RELAX_VM_CUDA_BUILTIN_SRC_CC})

if(USE_CUTLASS)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_COMPILER ${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc)
execute_process(
COMMAND ${CMAKE_CUDA_COMPILER} --version
OUTPUT_VARIABLE NVCC_VERSION_OUTPUT
)
if(NVCC_VERSION_OUTPUT MATCHES "release ([^,]+),")
set(CUDA_VERSION "${CMAKE_MATCH_1}")
endif(NVCC_VERSION_OUTPUT MATCHES "release ([^,]+),")
message(STATUS "CUDA_VERSION=${CUDA_VERSION}")

if(CUDA_VERSION VERSION_GREATER_EQUAL 11.8)
set(CMAKE_CUDA_ARCHITECTURES "75;80;86;89;90")
else(CUDA_VERSION VERSION_GREATER_EQUAL 11.8)
set(CMAKE_CUDA_ARCHITECTURES "75;80;86")
endif(CUDA_VERSION VERSION_GREATER_EQUAL 11.8)
message(STATUS "Set CMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES}")
else(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
message(STATUS "Found CMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES}")
endif(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
endif(USE_CUTLASS)

else(USE_CUDA)
list(APPEND COMPILER_SRCS src/target/opt/build_cuda_off.cc)
endif(USE_CUDA)
4 changes: 2 additions & 2 deletions tests/scripts/task_config_build_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ echo set\(HIDE_PRIVATE_SYMBOLS ON\) >> config.cmake
# with the change in the way TFLite is built. It can be
# removed once we migrate to TensorFlow and TFLite > 2.9.1
if [ -d "/opt/tflite" ]; then
echo set\(USE_TFLITE \"/opt/tflite\"\) >> config.cmake
echo set\(USE_TFLITE OFF\) >> config.cmake
else
echo set\(USE_TFLITE ON\) >> config.cmake
echo set\(USE_TFLITE OFF\) >> config.cmake
fi

echo set\(USE_TENSORFLOW_PATH \"/tensorflow\"\) >> config.cmake
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/unity/task_python_relax.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ TVM_TEST_TARGETS="${TVM_RELAY_TEST_TARGETS:-llvm}" pytest tests/python/dlight
# python3 ./apps/relax_examples/resnet.py

# Test for MSC
pytest tests/python/contrib/test_msc
# pytest tests/python/contrib/test_msc

0 comments on commit 2c9fa6e

Please sign in to comment.