Skip to content

enable python 3.13t (freethreading) in binary validation workflow #3049

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

Closed
wants to merge 2 commits into from
Closed
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
17 changes: 7 additions & 10 deletions .github/scripts/validate_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,19 @@ export PYTORCH_CUDA_PKG=""
export CONDA_ENV="build_binary"

if [[ ${MATRIX_PYTHON_VERSION} = '3.13t' ]]; then
echo "Conda doesn't support 3.13t yet, you can just try \`conda create -n test python=3.13t\`"
exit 0
# use conda-forge to install python3.13t
conda create -y -n "${CONDA_ENV}" python="3.13" python-freethreading -c conda-forge
conda run -n "${CONDA_ENV}" python -c "import sys; print(f'python GIL enabled: {sys._is_gil_enabled()}')"
else
conda create -y -n "${CONDA_ENV}" python="${MATRIX_PYTHON_VERSION}"
fi

conda create -y -n "${CONDA_ENV}" python="${MATRIX_PYTHON_VERSION}"

conda run -n build_binary python --version
conda run -n "${CONDA_ENV}" python --version

# Install pytorch, torchrec and fbgemm as per
# installation instructions on following page
# https://github.com/pytorch/torchrec#installations

if [[ ${MATRIX_GPU_ARCH_TYPE} = 'rocm' ]]; then
echo "We don't support rocm"
exit 0
fi

# figure out CUDA VERSION
if [[ ${MATRIX_GPU_ARCH_TYPE} = 'cuda' ]]; then
Expand Down Expand Up @@ -87,7 +84,7 @@ conda run -n "${CONDA_ENV}" pip install fbgemm-gpu --index-url "$PYTORCH_URL"
conda run -n "${CONDA_ENV}" pip install torchmetrics==1.0.3

# install tensordict from pypi
conda run -n "${CONDA_ENV}" pip install tensordict==0.7.1
conda run -n "${CONDA_ENV}" pip install tensordict==0.8.1

# install torchrec
conda run -n "${CONDA_ENV}" pip install torchrec --index-url "$PYTORCH_URL"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/validate-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ jobs:
repository: "pytorch/torchrec"
smoke_test: "source ./.github/scripts/validate_binaries.sh"
with_cuda: enable
with_rocm: false
Loading