File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1212        type : string 
1313        description : ' The docker image which will be used to build' 
1414      torch-artifact :
15-         required : true 
15+         required : false 
1616        type : string 
1717        description : ' The distribution artifact name of torch' 
1818    outputs :
4343    outputs :
4444      dist-name : ${{ steps.list-dist.outputs.dist-name }} 
4545    steps :
46+       - run : | 
47+           echo ${{ inputs.torch-artifact }} 
48+           exit 1 
49+ 
4650       - name : Config mirrors 
4751        run : | 
4852          sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list 
Original file line number Diff line number Diff line change @@ -96,14 +96,15 @@ jobs:
9696       #  TODO(shink): List ghstack PR's ref
9797      - name : List ref to the PyTorch branch 
9898        id : list-ref 
99+         if : ${{ github.event_name == 'repository_dispatch' }} 
99100        run : | 
100-           # echo "ref=refs/pull/${{ github.event.client_payload.pull_request.number }}/merge" >> $GITHUB_OUTPUT 
101-           echo "ref=refs/heads/main" >> $GITHUB_OUTPUT 
101+           echo "ref=refs/pull/${{ github.event.client_payload.pull_request.number }}/merge" >> $GITHUB_OUTPUT 
102102
103103   build-torch :
104104    name : Build torch 
105105    needs :
106106      - prepare 
107+     if : ${{ needs.prepare.outputs.ref }} 
107108    uses : ./.github/workflows/_ascend_npu_build_torch.yml 
108109    with :
109110      runner : ${{ needs.prepare.outputs.runner }} 
@@ -119,7 +120,7 @@ jobs:
119120    with :
120121      runner : ${{ needs.prepare.outputs.runner }} 
121122      image : ${{ needs.prepare.outputs.image }} 
122-       torch-artifact : ${{ needs.build-torch.outputs.torch-artifact }} 
123+       torch-artifact : ${{ needs.build-torch.outputs.torch-artifact || null  }} 
123124
124125  test :
125126    name : Test torch_npu 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments