mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01: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:
parent
117f11adb4
commit
cfdaaaaa26
|
|
@ -152,6 +152,12 @@ function get_pinned_commit() {
|
||||||
function install_torchaudio() {
|
function install_torchaudio() {
|
||||||
local commit
|
local commit
|
||||||
commit=$(get_pinned_commit audio)
|
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
|
pip_build_and_install "git+https://github.com/pytorch/audio.git@${commit}" dist/audio
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user