File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,16 +20,10 @@ EXIT_CODE=0
2020timeout 5h python setup.py bdist_wheel --dist-dir=dist || EXIT_CODE=$?
2121
2222if [ $EXIT_CODE -eq 0 ]; then
23- MATRIX_TORCH_VERSION=$( echo " $MATRIX_TORCH_VERSION " | tr ' +' ' _' )
24- tmpname=cu${WHEEL_CUDA_VERSION} torch${MATRIX_TORCH_VERSION}
25-
26- if [ -n " $CXX11_ABI " ]; then
27- tmpname=" ${tmpname} _cxx11abi${CXX11_ABI} "
28- fi
29-
30- wheel_name=$( ls dist/* whl | xargs -n 1 basename | sed " s/-/+$tmpname -/2" )
31- ls dist/* whl | xargs -I {} mv {} dist/${wheel_name}
32- echo " wheel_name=${wheel_name} " >> $GITHUB_ENV
23+ tmpname=cu${WHEEL_CUDA_VERSION} torch${MATRIX_TORCH_VERSION} cxx11abi$CXX11_ABI
24+ wheel_name=$( ls dist/* whl | xargs -n 1 basename | sed " s/-/+$tmpname -/2" )
25+ ls dist/* whl | xargs -I {} mv {} dist/${wheel_name}
26+ echo " wheel_name=${wheel_name} " >> $GITHUB_ENV
3327fi
3428
3529echo $EXIT_CODE
Original file line number Diff line number Diff line change 7575 set -eoxu pipefail
7676
7777 echo "MATRIX_CUDA_VERSION=$(echo $CUDA_VERSION | awk -F \. {'print $1 $2'})" >> $GITHUB_ENV
78- echo "MATRIX_TORCH_VERSION=$PYTORCH_VERSION " >> $GITHUB_ENV
78+ echo "MATRIX_TORCH_VERSION=$NVIDIA_PYTORCH_VERSION " >> $GITHUB_ENV
7979 echo "WHEEL_CUDA_VERSION=$(echo $CUDA_VERSION | awk -F \. {'print $1'})" >> $GITHUB_ENV
8080 echo "MATRIX_PYTHON_VERSION=$(python -c "import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))" | awk -F \. {'print $1 $2'})" >> $GITHUB_ENV
81+ echo "CXX11_ABI=$(python -c 'import torch; print(str(torch._C._GLIBCXX_USE_CXX11_ABI).upper())')" >> $GITHUB_ENV
8182
8283 cat $GITHUB_ENV
8384 EOF
9495 - name : Build wheel
9596 id : build_wheel
9697 env :
97- CXX11_ABI : ${{ inputs.cxx11_abi }}
98+ CXX11_ABI : ${{ env.CXX11_ABI }}
9899 MATRIX_TORCH_VERSION : ${{ env.MATRIX_TORCH_VERSION}}
99100 WHEEL_CUDA_VERSION : ${{ env.WHEEL_CUDA_VERSION }}
100101 MATRIX_PYTHON_VERSION : ${{ env.MATRIX_PYTHON_VERSION }}
Original file line number Diff line number Diff line change @@ -303,17 +303,13 @@ def get_wheel_url():
303303 platform_name = get_platform ()
304304 mamba_ssm_version = get_package_version ()
305305 if os .environ .get ("NVIDIA_PRODUCT_NAME" , "" ) == "PyTorch" :
306- torch_version = os .environ .get ("PYTORCH_BUILD_VERSION" ). replace ( "+" , "_" )
306+ torch_version = str ( os .environ .get ("NVIDIA_PYTORCH_VERSION" ) )
307307 else :
308308 torch_version = f"{ torch_version_raw .major } .{ torch_version_raw .minor } "
309309 cxx11_abi = str (torch ._C ._GLIBCXX_USE_CXX11_ABI ).upper ()
310310
311311 # Determine wheel URL based on CUDA version, torch version, python version and OS
312- if os .environ .get ("NVIDIA_PRODUCT_NAME" , "" ) == "PyTorch" :
313- wheel_filename = f"{ PACKAGE_NAME } -{ mamba_ssm_version } +{ cuda_or_hip } { gpu_compute_version } torch{ torch_version } -{ python_version } -{ python_version } -{ platform_name } .whl"
314- else :
315- wheel_filename = f"{ PACKAGE_NAME } -{ mamba_ssm_version } +{ cuda_or_hip } { gpu_compute_version } torch{ torch_version } cxx11abi{ cxx11_abi } -{ python_version } -{ python_version } -{ platform_name } .whl"
316-
312+ wheel_filename = f"{ PACKAGE_NAME } -{ mamba_ssm_version } +{ cuda_or_hip } { gpu_compute_version } torch{ torch_version } cxx11abi{ cxx11_abi } -{ python_version } -{ python_version } -{ platform_name } .whl"
317313 wheel_url = BASE_WHEEL_URL .format (
318314 tag_name = f"v{ mamba_ssm_version } " , wheel_name = wheel_filename
319315 )
You can’t perform that action at this time.
0 commit comments