mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Do not load ROCm cmake files if USE_ROCM is off (#14261)
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
This commit is contained in:
committed by
Facebook Github Bot
parent
fb6806f6e9
commit
cf059028f0
@ -80,7 +80,7 @@ cmake_dependent_option(
|
||||
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
|
||||
|
@ -721,7 +721,7 @@ if(USE_CUDA)
|
||||
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.")
|
||||
|
Reference in New Issue
Block a user