@@ -94,7 +94,7 @@ locals {
9494 for b in local . nightly_builds :
9595 format (" %s_%s%s%s" ,
9696 b. python_version ,
97- " tpuvm" ,
97+ b . accelerator == " tpu " ? " tpuvm" : format ( " cuda_%s " , b . cuda_version ) ,
9898 try (b. cxx11_abi == " 0" , false ) ? " _precxx11" : " " ,
9999 try (b. bundle_libtpu == " 1" , false ) ? " _libtpu" : " "
100100 ) => b
@@ -106,7 +106,7 @@ locals {
106106 format (" r%s_%s_%s%s%s" ,
107107 replace (b. package_version , " +" , " _" ),
108108 b. python_version ,
109- " tpuvm" ,
109+ b . accelerator == " tpu " ? " tpuvm" : format ( " cuda_%s " , b . cuda_version ) ,
110110 try (b. cxx11_abi == " 0" , false ) ? " _precxx11" : " " ,
111111 try (b. bundle_libtpu == " 1" , false ) ? " _libtpu" : " "
112112 ) => b
@@ -136,13 +136,20 @@ module "nightly_builds" {
136136 ]
137137
138138 description = join (" " , [
139- " Builds nightly xla:nightly_${ each . key } ' TPU docker image and " ,
140- " corresponding wheels for PyTorch/XLA." ,
139+ " Builds nightly xla:nightly_${ each . key } ' ${
140+ each . value . accelerator == " tpu"
141+ ? " TPU"
142+ : format (" CUDA %s" , each. value . cuda_version )
143+ } docker image and corresponding wheels for PyTorch/XLA." ,
141144 " Trigger managed by Terraform setup in" ,
142145 " infra/tpu-pytorch-releases/artifacts_builds.tf."
143146 ])
144147
145- wheels_dest = " ${ module . releases_storage_bucket . url } /wheels/tpuvm"
148+ wheels_dest = " ${ module . releases_storage_bucket . url } /wheels/${
149+ each . value . accelerator == " tpu"
150+ ? " tpuvm"
151+ : " cuda/${ each . value . cuda_version } "
152+ } "
146153 wheels_srcs = [" /dist/*.whl" ]
147154 build_args = {
148155 python_version = each.value.python_version
@@ -176,13 +183,20 @@ module "versioned_builds" {
176183 image_tags = [each . key ]
177184
178185 description = join (" " , [
179- " Builds official xla:${ each . key } ' TPU docker image and " ,
180- " corresponding wheels for PyTorch/XLA." ,
186+ " Builds official xla:${ each . key } ' ${
187+ each . value . accelerator == " tpu"
188+ ? " TPU"
189+ : format (" CUDA %s" , each. value . cuda_version )
190+ } docker image and corresponding wheels for PyTorch/XLA." ,
181191 " Trigger managed by Terraform setup in" ,
182192 " infra/tpu-pytorch-releases/artifacts_builds.tf."
183193 ])
184194
185- wheels_dest = " ${ module . releases_storage_bucket . url } /wheels/tpuvm"
195+ wheels_dest = " ${ module . releases_storage_bucket . url } /wheels/${
196+ each . value . accelerator == " tpu"
197+ ? " tpuvm"
198+ : " cuda/${ each . value . cuda_version } "
199+ } "
186200 wheels_srcs = [" /dist/*.whl" ]
187201 # Pass docker build args to infra/ansible/Dockerfile, other than `ansible_vars`.
188202 build_args = {
0 commit comments