3939 description : PyTorch ref to checkout. (typically "nightly", or "release/X.Y")
4040 required : true
4141 type : string
42+ pytorch_repo :
43+ description : " PyTorch repo to checkout (e.g. 'harkgill-amd/pytorch'). Defaults to 'pytorch/pytorch'."
44+ required : false
45+ type : string
46+ default : " "
4247 cache_type :
4348 description : " Compiler cache type (sccache, ccache, or none)"
4449 required : false
102107 required : true
103108 type : string
104109 default : " release/2.9"
110+ pytorch_repo :
111+ description : " PyTorch repo to checkout (e.g. 'harkgill-amd/pytorch'). Defaults to 'pytorch/pytorch'."
112+ type : string
113+ default : " "
105114 cache_type :
106115 description : " Compiler cache type"
107116 type : choice
@@ -209,12 +218,13 @@ jobs:
209218 # Checkout nightly sources from https://github.com/pytorch/pytorch
210219 # TODO: switch to 'nightly' to match our Linux workflows?
211220 - name : Checkout PyTorch source repos (nightly branch)
212- if : ${{ inputs.pytorch_git_ref == 'nightly' }}
221+ if : ${{ inputs.pytorch_git_ref == 'nightly' || inputs.pytorch_repo != '' }}
213222 run : |
214223 git config --global core.longpaths true
215224 python ./external-builds/pytorch/pytorch_torch_repo.py checkout \
216225 --checkout-dir ${{ env.CHECKOUT_ROOT }}/torch \
217- --repo-hashtag nightly
226+ ${{ inputs.pytorch_repo != '' && format('--gitrepo-origin https://github.com/{0}.git', inputs.pytorch_repo) || '' }} \
227+ --repo-hashtag ${{ inputs.pytorch_git_ref }}
218228 python ./external-builds/pytorch/pytorch_audio_repo.py checkout \
219229 --checkout-dir ${{ env.CHECKOUT_ROOT }}/audio \
220230 --repo-hashtag nightly
@@ -224,7 +234,7 @@ jobs:
224234
225235 # Checkout stable sources from https://github.com/ROCm/pytorch
226236 - name : Checkout PyTorch Source Repos from stable branch
227- if : ${{ inputs.pytorch_git_ref != 'nightly' }}
237+ if : ${{ inputs.pytorch_git_ref != 'nightly' && inputs.pytorch_repo == '' }}
228238 run : |
229239 git config --global core.longpaths true
230240 python ./external-builds/pytorch/pytorch_torch_repo.py checkout \
0 commit comments