From f85b8cfef01f4f13ad91b572b64b7b44d0fde65d Mon Sep 17 00:00:00 2001 From: Li Li Date: Tue, 12 Dec 2023 23:45:56 +0000 Subject: [PATCH] revert x_DIR --- .github/scripts/fbgemm_gpu_build.bash | 22 +++---- fbgemm_gpu/cmake/Hip.cmake | 90 --------------------------- 2 files changed, 11 insertions(+), 101 deletions(-) diff --git a/.github/scripts/fbgemm_gpu_build.bash b/.github/scripts/fbgemm_gpu_build.bash index 71a4a28620..5b9ea061f5 100644 --- a/.github/scripts/fbgemm_gpu_build.bash +++ b/.github/scripts/fbgemm_gpu_build.bash @@ -43,17 +43,17 @@ prepare_fbgemm_gpu_build () { # shellcheck disable=SC2155 local env_prefix=$(env_name_or_prefix "${env_name}") -# echo "==============old path" -# echo $PATH -# new_path="$PATH:/opt/rocm/llvm/bin:\ -# /opt/rocm/opencl/bin:\ -# /opt/rocm/hip/bin:\ -# /opt/rocm/hcc/bin:\ -# /opt/rocm/bin -# " -# echo "==============new path" -# echo $new_path - # print_exec conda env config vars set ${env_prefix} PATH="$new_path" + echo "==============old path" + echo $PATH + new_path="$PATH:/opt/rocm/llvm/bin:\ +/opt/rocm/opencl/bin:\ +/opt/rocm/hip/bin:\ +/opt/rocm/hcc/bin:\ +/opt/rocm/bin +" + echo "==============new path" + echo $new_path + print_exec conda env config vars set ${env_prefix} PATH="$new_path" echo "[BUILD] Installing other build dependencies ..." # shellcheck disable=SC2086 diff --git a/fbgemm_gpu/cmake/Hip.cmake b/fbgemm_gpu/cmake/Hip.cmake index e1a96770f9..369a704753 100644 --- a/fbgemm_gpu/cmake/Hip.cmake +++ b/fbgemm_gpu/cmake/Hip.cmake @@ -18,96 +18,6 @@ else() set(HIP_ROOT_DIR $ENV{ROCM_PATH}) endif() -if(NOT DEFINED ENV{hip_DIR}) - set(hip_DIR ${ROCM_PATH}/lib/cmake/hip) -else() - set(hip_DIR $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{AMDDeviceLibs_DIR}) - set(AMDDeviceLibs_DIR ${ROCM_PATH}/lib/cmake/AMDDeviceLibs) -else() - set(AMDDeviceLibs_DIR $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{amd_comgr_DIR}) - set(amd_comgr_DIR ${ROCM_PATH}/lib/cmake/amd_comgr) -else() - set(amd_comgr_DIR $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{hsa-runtime64_DIR}) - set(hsa-runtime64_DIR ${ROCM_PATH}/lib/cmake/hsa-runtime64) -else() - set(hsa-runtime64_DIR $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{rocrand_DIR}) - set(rocrand_DIR ${ROCM_PATH}/lib/cmake/rocrand) -else() - set(rocrand_DIR $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{miopen_DIR}) - set(miopen ${ROCM_PATH}/lib/cmake/miopen) -else() - set(miopen $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{hipfft_DIR}) - set(miopen ${ROCM_PATH}/lib/cmake/hipfft) -else() - set(miopen $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{rocfft_DIR}) - set(miopen ${ROCM_PATH}/lib/cmake/rocfft) -else() - set(miopen $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{rocblas_DIR}) - set(miopen ${ROCM_PATH}/lib/cmake/rocblas) -else() - set(miopen $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{rocsparse_DIR}) - set(miopen ${ROCM_PATH}/lib/cmake/rocsparse) -else() - set(miopen $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{hipcub_DIR}) - set(miopen ${ROCM_PATH}/lib/cmake/hipcub) -else() - set(miopen $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{hipblas_DIR}) - set(miopen ${ROCM_PATH}/lib/cmake/hipblas) -else() - set(miopen $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{hiprand_DIR}) - set(miopen ${ROCM_PATH}/lib/cmake/hiprand) -else() - set(miopen $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{rocm_smi_DIR}) - set(miopen ${ROCM_PATH}/lib/cmake/rocm_smi) -else() - set(miopen $ENV{ROCM_PATH}) -endif() - -if(NOT DEFINED ENV{rocthrust_DIR}) - set(miopen ${ROCM_PATH}/lib/cmake/rocthrust) -else() - set(miopen $ENV{ROCM_PATH}) -endif() - macro(torch_hip_get_arch_list store_var) if(DEFINED ENV{PYTORCH_ROCM_ARCH}) set(_TMP $ENV{PYTORCH_ROCM_ARCH})