Summary:
Previously if it unconditionally tries to load rocm cmake files, so there was no way to disable rocm build. After this change, USE_ROCM=0 will disable rocm build.
Should fix #14025
soumith
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14261
Differential Revision:
D13242090
Pulled By: bddppq
fbshipit-source-id:
652ec7d49dce9b357778bfa53a8e04b7079787ab
option(USE_ACL "Use ARM Compute Library" OFF)
option(USE_ASAN "Use Address Sanitizer" OFF)
option(USE_CUDA "Use CUDA" ON)
-option(USE_ROCM "Use ROCm" OFF)
+option(USE_ROCM "Use ROCm" ON)
option(CAFFE2_STATIC_LINK_CUDA "Statically link CUDA libraries" OFF)
cmake_dependent_option(
USE_CUDNN "Use cuDNN" ON
endif()
# ---[ HIP
-if(NOT BUILD_ATEN_MOBILE)
+if(USE_ROCM)
include(${CMAKE_CURRENT_LIST_DIR}/public/LoadHIP.cmake)
if(PYTORCH_FOUND_HIP)
message(INFO "Compiling with HIP for AMD.")