From cf558683f43aa64b3a0a0a0cafe6e0df171fc490 Mon Sep 17 00:00:00 2001 From: Ramil Bakhshyiev Date: Thu, 5 Sep 2024 23:34:13 -0700 Subject: [PATCH 1/3] Do not unnecessarily install CUDA for ROCm (#3837) Summary: ROCm does not require CUDA, this change stops installing it. This is also likely to fix #3787 which is coming in a separate change. Differential Revision: D62283602 --- .github/actions/build_cmake/action.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/actions/build_cmake/action.yml b/.github/actions/build_cmake/action.yml index 2606ce9fec..eccc001fce 100644 --- a/.github/actions/build_cmake/action.yml +++ b/.github/actions/build_cmake/action.yml @@ -51,13 +51,14 @@ runs: conda install -y -q mkl=2023 mkl-devel=2023 fi - # install CUDA packages - if [ "${{ inputs.gpu }}" = "ON" ] && [ "${{ inputs.raft }}" = "OFF" ]; then + # no CUDA needed for ROCm so skip this + if [ "${{ inputs.rocm }}" = "ON" ]; then + : + # regular CUDA for GPU builds + elif [ "${{ inputs.gpu }}" = "ON" ] && [ "${{ inputs.raft }}" = "OFF" ]; then conda install -y -q cuda-toolkit -c "nvidia/label/cuda-12.4.0" - fi - - # install RAFT packages - if [ "${{ inputs.raft }}" = "ON" ]; then + # and CUDA from RAFT channel for RAFT builds + elif [ "${{ inputs.raft }}" = "ON" ]; then conda install -y -q libraft cuda-version=12.4 cuda-toolkit -c rapidsai-nightly -c "nvidia/label/cuda-12.4.0" -c conda-forge fi From 6eaa8ae92cfbebb023a5dfeb1d4dbc3f4a8b19df Mon Sep 17 00:00:00 2001 From: Ramil Bakhshyiev Date: Thu, 5 Sep 2024 23:34:13 -0700 Subject: [PATCH 2/3] Upgrade to ROCm 6.2 (#3839) Summary: This is a prerequisite to fixing issue 3787 and an upgrade to a newer stable version. Differential Revision: D62284555 --- .github/actions/build_cmake/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build_cmake/action.yml b/.github/actions/build_cmake/action.yml index eccc001fce..408c6aa719 100644 --- a/.github/actions/build_cmake/action.yml +++ b/.github/actions/build_cmake/action.yml @@ -84,7 +84,7 @@ runs: UBUNTU_VERSION_NAME=`cat /etc/os-release | grep UBUNTU_CODENAME | awk -F= '{print $2}'` # Set ROCm version - ROCM_VERSION="6.1.1" + ROCM_VERSION="6.2" # Download, prepare, and install the package signing key mkdir --parents --mode=0755 /etc/apt/keyrings From 3f46f9fc93c8b01c45bdf7fdfd3fa473be0c0586 Mon Sep 17 00:00:00 2001 From: Ramil Bakhshyiev Date: Thu, 5 Sep 2024 23:34:13 -0700 Subject: [PATCH 3/3] Re-enable Query_L2_MMCodeDistance and Query_IP_MMCodeDistance tests for ROCm (#3838) Summary: This fixes 3787 now that we do not install CUDA for ROCm builds. Differential Revision: D62283662 --- faiss/gpu/test/TestGpuIndexIVFPQ.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/faiss/gpu/test/TestGpuIndexIVFPQ.cpp b/faiss/gpu/test/TestGpuIndexIVFPQ.cpp index 73de101946..9cc52bc788 100644 --- a/faiss/gpu/test/TestGpuIndexIVFPQ.cpp +++ b/faiss/gpu/test/TestGpuIndexIVFPQ.cpp @@ -307,8 +307,6 @@ void testMMCodeDistance(faiss::MetricType mt) { } } -// FIXME: https://github.com/facebookresearch/faiss/issues/3787 -#ifndef USE_AMD_ROCM TEST(TestGpuIndexIVFPQ, Query_L2_MMCodeDistance) { testMMCodeDistance(faiss::MetricType::METRIC_L2); } @@ -316,7 +314,6 @@ TEST(TestGpuIndexIVFPQ, Query_L2_MMCodeDistance) { TEST(TestGpuIndexIVFPQ, Query_IP_MMCodeDistance) { testMMCodeDistance(faiss::MetricType::METRIC_INNER_PRODUCT); } -#endif // USE_AMD_ROCM TEST(TestGpuIndexIVFPQ, Float16Coarse) { Options opt;