Skip to content

Commit cfdaaaa

Browse files
huydhnpytorchmergebot
authored andcommitted
Fix torchaudio build when TORCH_CUDA_ARCH_LIST is not set (pytorch#161084)
Fixes pytorch#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: pytorch#161084 Approved by: https://github.com/malfet, https://github.com/zou3519
1 parent 117f11a commit cfdaaaa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.ci/pytorch/common_utils.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ function get_pinned_commit() {
152152
function install_torchaudio() {
153153
local commit
154154
commit=$(get_pinned_commit audio)
155+
# TODO (huydhn): PyTorch CI docker image set the default TORCH_CUDA_ARCH_LIST
156+
# to Maxwell. This default doesn't make sense anymore and should be cleaned up
157+
if [[ "${BUILD_ENVIRONMENT}" == *cuda* ]]; then
158+
TORCH_CUDA_ARCH_LIST=$(nvidia-smi --query-gpu=compute_cap --format=csv | tail -n 1)
159+
export TORCH_CUDA_ARCH_LIST
160+
fi
155161
pip_build_and_install "git+https://github.com/pytorch/audio.git@${commit}" dist/audio
156162
}
157163

0 commit comments

Comments
 (0)