Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fbgemm_gpu] Fix Python 3.13 Testing #3529

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/fbgemm_gpu_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/fbgemm_gpu_docs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/fbgemm_gpu_test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions .github/scripts/nova_dir.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 6 additions & 2 deletions .github/scripts/utils_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,14 @@ __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.4.0}"
local gcc_version="${GCC_VERSION:-11.2.0}"

echo "[INSTALL] Installing GCC (${gcc_version}, ${archname}) through Conda ..."
# shellcheck disable=SC2086
Expand Down
9 changes: 8 additions & 1 deletion .github/scripts/utils_pytorch.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/fbgemm_gpu_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -n $BUILD_ENV

- name: Build + Install FBGEMM_GPU (CPU version)
run: . $PRELUDE; cd fbgemm_gpu; build_fbgemm_gpu_install $BUILD_ENV $BUILD_VARIANT

Expand Down
Loading