@@ -87,16 +87,21 @@ jobs:
8787 - name : Set environment params
8888 id : set-env
8989 run : |
90- echo "runner=${{ github.event.ihputs .runner || 'linux-gaudi3' }}" >> $GITHUB_OUTPUT
91- echo "device=${{ github.event.ihputs .device || '0' }}" >> $GITHUB_OUTPUT
92- echo "image=${{ github.event.ihputs .image || 'vault.habana.ai/gaudi-docker/1.20.0/ubuntu24.04/habanalabs/pytorch-installer-2.6.0:latest' }}" >> $GITHUB_OUTPUT
90+ echo "runner=${{ github.event.inputs .runner || 'linux-gaudi3' }}" >> $GITHUB_OUTPUT
91+ echo "device=${{ github.event.inputs .device || '0' }}" >> $GITHUB_OUTPUT
92+ echo "image=${{ github.event.inputs .image || 'vault.habana.ai/gaudi-docker/1.20.0/ubuntu24.04/habanalabs/pytorch-installer-2.6.0:latest' }}" >> $GITHUB_OUTPUT
9393
9494 - name : List ref to the PyTorch branch
9595 id : list-ref
96- if : ${{ github.event_name == 'repository_dispatch' }}
9796 run : |
98- echo "ref=${{ github.event.client_payload.ref }}" >> $GITHUB_OUTPUT
99- echo "sha=${{ github.event.client_payload.sha }}" >> $GITHUB_OUTPUT
97+ if ${{ github.event_name == 'repository_dispatch' }}; then
98+ echo "ref=${{ github.event.client_payload.ref }}" >> $GITHUB_OUTPUT
99+ echo "sha=${{ github.event.client_payload.sha }}" >> $GITHUB_OUTPUT
100+ else
101+ ref=refs/heads/main
102+ echo "ref=$ref" >> $GITHUB_OUTPUT
103+ echo "sha=$(git ls-remote -h https://github.com/pytorch/pytorch.git $ref | awk '{print $1}')" >> $GITHUB_OUTPUT
104+
100105
101106 build-torch :
102107 name : Build torch
@@ -107,6 +112,7 @@ jobs:
107112 with :
108113 runner : ${{ needs.prepare.outputs.runner }}
109114 image : ${{ needs.prepare.outputs.image }}
115+ ref : ${{ needs.prepare.outputs.ref }}
110116
111117
112118 build :
@@ -133,6 +139,7 @@ jobs:
133139 (success() || (needs.build-torch.result == 'skipped' && needs.build.result == 'success'))
134140 uses : ./.github/workflows/_gaudi_hpu_ut.yml
135141 with :
142+ ref : ${{ needs.prepare.outputs.ref }}
136143 runner : ${{ needs.prepare.outputs.runner }}
137144 image : ${{ needs.prepare.outputs.image }}
138145 device : ${{ needs.prepare.outputs.device }}
@@ -152,6 +159,7 @@ jobs:
152159 (success() || (needs.build-torch.result == 'skipped' && needs.build.result == 'success'))
153160 uses : ./.github/workflows/_gaudi_hpu_benchmark.yml
154161 with :
162+ ref : ${{ needs.prepare.outputs.ref }}
155163 runner : ${{ needs.prepare.outputs.runner }}
156164 image : ${{ needs.prepare.outputs.image }}
157165 device : ${{ needs.prepare.outputs.device }}
0 commit comments