99 - ' !**.md'
1010
1111jobs :
12- fetch-secret :
13- runs-on : ubuntu-latest
14- outputs :
15- encrypted_secret : ${{ steps.encrypt-secret.outputs.encrypted_secret }}
16- steps :
17- - name : Load secret
18- id : op-load-secret
19- uses : 1password/load-secrets-action@v2
20- with :
21- export-env : false
22- env :
23- OP_SERVICE_ACCOUNT_TOKEN : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
24- PAT : op://7basd2jirojjckncf6qnq3azai/bzbaco3uxoqs2rcyu42rvuccga/credential
25-
26- - name : Encrypt secret
27- id : encrypt-secret
28- env :
29- ENCRYPTION_KEY : ${{ secrets.ENCRYPTION_KEY }}
30- run : |
31- # AES-256 encrypt
32- encrypted=$(echo "${{ steps.op-load-secret.outputs.pat }}" | \
33- openssl enc -e -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 \
34- -pass pass:"$ENCRYPTION_KEY" -base64 -A)
35-
36- echo "encrypted_secret=$encrypted" >> $GITHUB_OUTPUT
3712
3813 mlc-run :
39- needs : [fetch-secret]
4014 runs-on : ${{ matrix.os }}
4115 strategy :
4216 fail-fast : false
@@ -45,13 +19,16 @@ jobs:
4519 python-version : [ "3.12" ]
4620 backend : [ "onnxruntime", "pytorch" ]
4721 implementation : [ "python", "cpp" ]
22+ compiler-string : [ "", "--adr.compiler.tags=aocc --env.MLC_AOCC_ACCEPT_EULA=yes" ]
4823 exclude :
4924 - backend : pytorch
5025 implementation : cpp
5126 - os : windows-latest
5227 implementation : cpp
5328 - os : macos-latest
5429 implementation : cpp
30+ - implementation : python
31+ compiler-string : " --adr.compiler.tags=aocc --env.MLC_AOCC_ACCEPT_EULA=yes"
5532
5633 steps :
5734 - uses : actions/checkout@v3
7855 - name : Test MLPerf Inference Retinanet using ${{ matrix.backend }} on ${{ matrix.os }}
7956 if : matrix.os != 'windows-latest'
8057 run : |
81- mlcr run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }}_x86 --model=retinanet --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --quiet -v --target_qps=1
82-
83- # Step for Linux/MacOS
84- - name : Randomly Execute Step (Linux/MacOS)
85- if : runner.os != 'Windows'
86- run : |
87- RANDOM_NUMBER=$((RANDOM % 10))
88- echo "Random number is $RANDOM_NUMBER"
89- if [ "$RANDOM_NUMBER" -eq 0 ]; then
90- echo "run_step=true" >> $GITHUB_ENV
91- else
92- echo "run_step=false" >> $GITHUB_ENV
93- fi
94-
95- # Step for Windows
96- - name : Randomly Execute Step (Windows)
97- if : runner.os == 'Windows'
98- run : |
99- $RANDOM_NUMBER = Get-Random -Maximum 10
100- Write-Host "Random number is $RANDOM_NUMBER"
101- if ($RANDOM_NUMBER -eq 0) {
102- Write-Host "run_step=true" | Out-File -FilePath $Env:GITHUB_ENV -Append
103- } else {
104- Write-Host "run_step=false" | Out-File -FilePath $Env:GITHUB_ENV -Append
105- }
106-
107- - name : Decrypt secret
108- id : decrypt-secret
109- shell : bash
110- env :
111- ENCRYPTION_KEY : ${{ secrets.ENCRYPTION_KEY }}
112- encrypted_secret : ${{ needs.fetch-secret.outputs.encrypted_secret }}
113- run : |
114- echo "Running on OS: ${{ matrix.os }}"
115-
116- # Decrypt
117- decrypted=$(echo "$encrypted_secret" | \
118- openssl enc -d -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 \
119- -pass pass:"$ENCRYPTION_KEY" -base64 -A)
120-
121- echo "::add-mask::$decrypted"
122- echo "DECRYPTED_SECRET=$decrypted" >> $GITHUB_OUTPUT
123- - name : Push Results
124- env :
125- GITHUB_TOKEN : ${{ steps.decrypt-secret.outputs.decrypted_secret }}
126- if : github.repository_owner == 'mlcommons' && env.run_step == 'true'
127- run : |
128- git config --global user.name "mlcommons-bot"
129- git config --global user.email "[email protected] " 130- git config --global credential.https://github.com.helper ""
131- git config --global credential.https://github.com.helper "!gh auth git-credential"
132- git config --global credential.https://gist.github.com.helper ""
133- git config --global credential.https://gist.github.com.helper "!gh auth git-credential"
134- mlcr push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_test_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from R50 GH action on ${{ matrix.os }}" --quiet
58+ mlcr run,mlperf,inference,generate-run-cmds,_submission,_short --submitter="MLCommons" --pull_changes=yes --pull_inference_changes=yes --hw_name=gh_${{ matrix.os }}_x86 --model=retinanet --implementation=${{ matrix.implementation }} --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --quiet -v --target_qps=1 ${{ matrix.compiler-string }}
0 commit comments