Limit ROCM option to Linux only (#87833)

As it's not available on neither Windows nor MacOS

cc @jeffdaily @sunway513 @jithunnair-amd @ROCmSupport
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87833
Approved by: https://github.com/kit1980
This commit is contained in:
Nikita Shulga 2022-10-27 01:24:01 +00:00 committed by PyTorch MergeBot
parent 0e3b5ea026
commit 30ea8f5c20

View File

@ -190,7 +190,7 @@ option(USE_CUDA "Use CUDA" ON)
cmake_dependent_option( cmake_dependent_option(
BUILD_LAZY_CUDA_LINALG "Build cuda linalg ops as separate library" ON "USE_CUDA AND LINUX AND BUILD_PYTHON" OFF) BUILD_LAZY_CUDA_LINALG "Build cuda linalg ops as separate library" ON "USE_CUDA AND LINUX AND BUILD_PYTHON" OFF)
option(USE_FAST_NVCC "Use parallel NVCC build" OFF) option(USE_FAST_NVCC "Use parallel NVCC build" OFF)
option(USE_ROCM "Use ROCm" ON) cmake_dependent_option(USE_ROCM "Use ROCm" ON "LINUX" OFF)
option(CAFFE2_STATIC_LINK_CUDA "Statically link CUDA libraries" OFF) option(CAFFE2_STATIC_LINK_CUDA "Statically link CUDA libraries" OFF)
cmake_dependent_option( cmake_dependent_option(
USE_CUDNN "Use cuDNN" ON USE_CUDNN "Use cuDNN" ON