From 12ec53a432054228dfb5dc0906d3c3dbf7adc6f1 Mon Sep 17 00:00:00 2001 From: Benson Ma Date: Mon, 23 Dec 2024 11:58:47 -0800 Subject: [PATCH 1/5] [fbgemm_gpu] Fix Python 3.13 Testing - Remove unnecessary package check, which fails in Python 3.13+ --- .github/scripts/fbgemm_gpu_test.bash | 6 +++--- .github/scripts/utils_build.bash | 2 +- .github/scripts/utils_pytorch.bash | 9 ++++++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/scripts/fbgemm_gpu_test.bash b/.github/scripts/fbgemm_gpu_test.bash index fd0c25900..e06dbc6f4 100644 --- a/.github/scripts/fbgemm_gpu_test.bash +++ b/.github/scripts/fbgemm_gpu_test.bash @@ -192,9 +192,9 @@ __setup_fbgemm_gpu_test () { echo "[TEST] Checking imports ..." (test_python_import_package "${env_name}" fbgemm_gpu) || return 1 - if [ "$fbgemm_gpu_variant" != "genai" ]; then - (test_python_import_package "${env_name}" fbgemm_gpu.split_embedding_codegen_lookup_invokers) || return 1 - fi + # if [ "$fbgemm_gpu_variant" != "genai" ]; then + # (test_python_import_package "${env_name}" fbgemm_gpu.split_embedding_codegen_lookup_invokers) || return 1 + # fi # Set the feature flags to enable experimental features as needed __set_feature_flags diff --git a/.github/scripts/utils_build.bash b/.github/scripts/utils_build.bash index a2e9152ed..003799f04 100644 --- a/.github/scripts/utils_build.bash +++ b/.github/scripts/utils_build.bash @@ -120,7 +120,7 @@ __conda_install_gcc () { # https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.iso # # shellcheck disable=SC2155 - local gcc_version="${GCC_VERSION:-11.4.0}" + local gcc_version="${GCC_VERSION:-11.2.0}" echo "[INSTALL] Installing GCC (${gcc_version}, ${archname}) through Conda ..." # shellcheck disable=SC2086 diff --git a/.github/scripts/utils_pytorch.bash b/.github/scripts/utils_pytorch.bash index d66d0f2a6..b5668b6be 100644 --- a/.github/scripts/utils_pytorch.bash +++ b/.github/scripts/utils_pytorch.bash @@ -72,7 +72,14 @@ install_pytorch_conda () { (exec_with_retries 3 conda install --force-reinstall ${env_prefix} -y ${pytorch_package} -c "${pytorch_channel}") || return 1 # Check that PyTorch is importable - (test_python_import_package "${env_name}" torch.distributed) || return 1 + local subpackages=( + "torch" + "torch.distributed" + ) + + for package in "${subpackages[@]}"; do + (test_python_import_package "${env_name}" "${package}") || return 1 + done # Print out the actual installed PyTorch version # shellcheck disable=SC2086,SC2155 From fe7b992d60bccc29d5f49ac94e4081e70a223665 Mon Sep 17 00:00:00 2001 From: Andrey Talman Date: Mon, 23 Dec 2024 16:32:17 -0500 Subject: [PATCH 2/5] Update nova_dir.bash --- .github/scripts/nova_dir.bash | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/scripts/nova_dir.bash b/.github/scripts/nova_dir.bash index 262a51c63..deb534a9b 100644 --- a/.github/scripts/nova_dir.bash +++ b/.github/scripts/nova_dir.bash @@ -13,9 +13,6 @@ if [[ "$working_dir" == "$FBGEMM_REPO" ]]; then cd fbgemm_gpu || echo "Failed to ## Build clean/wheel will be done in pre-script. Set flag such that setup.py will skip these steps in Nova workflow export BUILD_FROM_NOVA=1 -## TODO (huydhn): Remove this when Nova is moving to manywheel 2.28 -export SET_GLIBCXX_PRELOAD=1 - ## Overwrite existing ENV VAR in Nova if [[ "$CONDA_ENV" != "" ]]; then export CONDA_RUN="conda run --no-capture-output -p ${CONDA_ENV}" && echo "$CONDA_RUN"; fi From b0f080e93a5c13e547a84685d5356c60086e97a3 Mon Sep 17 00:00:00 2001 From: Benson Ma Date: Mon, 23 Dec 2024 16:20:08 -0800 Subject: [PATCH 3/5] wip --- .github/scripts/utils_build.bash | 6 +++++- .github/workflows/fbgemm_gpu_docs.yml | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/scripts/utils_build.bash b/.github/scripts/utils_build.bash index 003799f04..5ab020c16 100644 --- a/.github/scripts/utils_build.bash +++ b/.github/scripts/utils_build.bash @@ -117,7 +117,11 @@ __conda_install_gcc () { # However, since https://github.com/pytorch/pytorch/pull/141035 landed, g++ # 11.1+ became a requirement, since std::bit_cast is only available with # libstdc++ 11.1+. See for details: - # https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.iso + # https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.iso + # + # For GLIBCXX ABI compatibility checks, see: + # https://stackoverflow.com/questions/56781513/understanding-the-gcc-version-and-the-glibc-glibcxx-versions-in-more-detail + # https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html # # shellcheck disable=SC2155 local gcc_version="${GCC_VERSION:-11.2.0}" diff --git a/.github/workflows/fbgemm_gpu_docs.yml b/.github/workflows/fbgemm_gpu_docs.yml index f1bb9e64f..a9eef5317 100644 --- a/.github/workflows/fbgemm_gpu_docs.yml +++ b/.github/workflows/fbgemm_gpu_docs.yml @@ -82,6 +82,9 @@ jobs: - name: Prepare FBGEMM_GPU Build run: . $PRELUDE; cd fbgemm_gpu; prepare_fbgemm_gpu_build $BUILD_ENV + - name: Prepare FBGEMM_GPU Build 2 + run: . $PRELUDE; conda list + - name: Build + Install FBGEMM_GPU (CPU version) run: . $PRELUDE; cd fbgemm_gpu; build_fbgemm_gpu_install $BUILD_ENV $BUILD_VARIANT From 6f6dc534dba5adada9acedcac5dbbf17aae5c444 Mon Sep 17 00:00:00 2001 From: Benson Ma Date: Mon, 23 Dec 2024 16:20:48 -0800 Subject: [PATCH 4/5] wip --- .github/workflows/fbgemm_gpu_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fbgemm_gpu_docs.yml b/.github/workflows/fbgemm_gpu_docs.yml index a9eef5317..9de3ef646 100644 --- a/.github/workflows/fbgemm_gpu_docs.yml +++ b/.github/workflows/fbgemm_gpu_docs.yml @@ -83,7 +83,7 @@ jobs: run: . $PRELUDE; cd fbgemm_gpu; prepare_fbgemm_gpu_build $BUILD_ENV - name: Prepare FBGEMM_GPU Build 2 - run: . $PRELUDE; conda list + run: . $PRELUDE; conda list -n $BUILD_ENV - name: Build + Install FBGEMM_GPU (CPU version) run: . $PRELUDE; cd fbgemm_gpu; build_fbgemm_gpu_install $BUILD_ENV $BUILD_VARIANT From 8ca04c72a22186887c0b4b0efdeb51129610ee66 Mon Sep 17 00:00:00 2001 From: Benson Ma Date: Mon, 23 Dec 2024 16:41:31 -0800 Subject: [PATCH 5/5] wip --- .github/scripts/fbgemm_gpu_build.bash | 2 +- .github/scripts/fbgemm_gpu_docs.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/fbgemm_gpu_build.bash b/.github/scripts/fbgemm_gpu_build.bash index a23bcd445..27620bb0f 100644 --- a/.github/scripts/fbgemm_gpu_build.bash +++ b/.github/scripts/fbgemm_gpu_build.bash @@ -45,7 +45,7 @@ prepare_fbgemm_gpu_build () { echo "[BUILD] Installing other build dependencies ..." # shellcheck disable=SC2086 - (exec_with_retries 3 conda run --no-capture-output ${env_prefix} python -m pip install -r requirements.txt) || return 1 + (exec_with_retries 3 conda install ${env_prefix} -c conda-forge -y --file requirements.txt) || return 1 (install_triton_pip "${env_name}") || return 1 diff --git a/.github/scripts/fbgemm_gpu_docs.bash b/.github/scripts/fbgemm_gpu_docs.bash index a32d3aaab..f09081e71 100644 --- a/.github/scripts/fbgemm_gpu_docs.bash +++ b/.github/scripts/fbgemm_gpu_docs.bash @@ -49,7 +49,7 @@ install_docs_tools () { echo "[BUILD] Installing docs-build dependencies ..." # shellcheck disable=SC2086 - (exec_with_retries 3 conda run ${env_prefix} python -m pip install -r requirements.txt) || return 1 + (exec_with_retries 3 conda install ${env_prefix} -c conda-forge -y --file requirements.txt) || return 1 echo "[INSTALL] Successfully installed all the docs tools" }