mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix torchaudio build when TORCH_CUDA_ARCH_LIST is not set (#161084)
Fixes https://github.com/pytorch/pytorch/issues/160988. The root cause can be found in the same issue. This fix ensures that when reuse old wheel is on and `torchaudio` wheel is not there, the inductor test job can still rebuild the wheel it needs Pull Request resolved: https://github.com/pytorch/pytorch/pull/161084 Approved by: https://github.com/malfet, https://github.com/zou3519
This commit is contained in:
@ -152,6 +152,12 @@ function get_pinned_commit() {
|
||||
function install_torchaudio() {
|
||||
local commit
|
||||
commit=$(get_pinned_commit audio)
|
||||
# TODO (huydhn): PyTorch CI docker image set the default TORCH_CUDA_ARCH_LIST
|
||||
# to Maxwell. This default doesn't make sense anymore and should be cleaned up
|
||||
if [[ "${BUILD_ENVIRONMENT}" == *cuda* ]]; then
|
||||
TORCH_CUDA_ARCH_LIST=$(nvidia-smi --query-gpu=compute_cap --format=csv | tail -n 1)
|
||||
export TORCH_CUDA_ARCH_LIST
|
||||
fi
|
||||
pip_build_and_install "git+https://github.com/pytorch/audio.git@${commit}" dist/audio
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user