diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index b98a3c37b..829a3fcb7 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -8,6 +8,7 @@ on: env: python_version: "3.9" + HEAD_REF: ${{ github.head_ref }} jobs: format-code: @@ -41,9 +42,9 @@ jobs: run: | HAS_CHANGES=$(git diff --staged --name-only) if [ ${#HAS_CHANGES} -gt 0 ]; then - git checkout -B "${{ github.head_ref }}" + git checkout -B "$HEAD_REF" git config --global user.email "${{ github.actor }}@users.noreply.github.com" git config --global user.name "${{ github.actor }}" git commit -m '[Automated Commit] Format Codebase' - git push origin "${{ github.head_ref }}" + git push origin "$HEAD_REF" fi diff --git a/.github/workflows/test-bert.yml b/.github/workflows/test-bert.yml index 52ec1dd4d..2ce156c45 100755 --- a/.github/workflows/test-bert.yml +++ b/.github/workflows/test-bert.yml @@ -12,6 +12,9 @@ on: - .github/workflows/test-bert.yml - '!**.md' +env: + PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} + jobs: build: @@ -33,4 +36,4 @@ jobs: python3 -m pip install cm4mlops - name: Test BERT and end to end submission generation run: | - cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=bert-99 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.${{ github.event.pull_request.head.ref }} --adr.loadgen.version=custom + cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=bert-99 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.$PR_HEAD_REF --adr.loadgen.version=custom diff --git a/.github/workflows/test-loadgen.yml b/.github/workflows/test-loadgen.yml index 09436cc02..8e42f625e 100755 --- a/.github/workflows/test-loadgen.yml +++ b/.github/workflows/test-loadgen.yml @@ -11,6 +11,9 @@ on: - .github/workflows/test-loadgen.yml - '!**.md' +env: + PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} + jobs: build: @@ -31,4 +34,4 @@ jobs: python3 -m pip install cm4mlops - name: Test Loadgen run: | - cm run script --tags=get,mlperf,inference,loadgen --quiet --version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.${{ github.event.pull_request.head.ref }} --adr.loadgen.tags=_no-compilation-warnings + cm run script --tags=get,mlperf,inference,loadgen --quiet --version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.$PR_HEAD_REF --adr.loadgen.tags=_no-compilation-warnings diff --git a/.github/workflows/test-resnet50.yml b/.github/workflows/test-resnet50.yml index 64636a343..c942258b2 100755 --- a/.github/workflows/test-resnet50.yml +++ b/.github/workflows/test-resnet50.yml @@ -13,6 +13,9 @@ on: - .github/workflows/test-resnet50.yml - '!**.md' +env: + PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} + jobs: build: @@ -35,4 +38,4 @@ jobs: python3 -m pip install cm4mlops - name: Test Resnet50 and end to end submission generation run: | - cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=resnet50 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --adr.inference-src.tags=_branch.${{ github.event.pull_request.head.ref }},_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --adr.loadgen.version=custom ${{ matrix.loadgen-flag }} + cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=resnet50 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=500 --adr.compiler.tags=gcc --adr.inference-src.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --adr.loadgen.version=custom ${{ matrix.loadgen-flag }} diff --git a/.github/workflows/test-retinanet.yml b/.github/workflows/test-retinanet.yml index a2f5bf8ec..648266626 100755 --- a/.github/workflows/test-retinanet.yml +++ b/.github/workflows/test-retinanet.yml @@ -12,6 +12,9 @@ on: - .github/workflows/test-retinanet.yml - '!**.md' +env: + PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} + jobs: build: @@ -33,4 +36,4 @@ jobs: python3 -m pip install cm4mlops - name: Test Retinanet and end to end submission generation run: | - cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=retinanet --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=10 --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.${{ github.event.pull_request.head.ref }} --adr.loadgen.version=custom + cm run script --tags=run,mlperf,inference,generate-run-cmds,_submission,_short --quiet --submitter="MLCommons" --hw_name=default --model=retinanet --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=10 --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.$PR_HEAD_REF --adr.loadgen.version=custom diff --git a/.github/workflows/test-rnnt.yml b/.github/workflows/test-rnnt.yml index a76573900..a08803741 100644 --- a/.github/workflows/test-rnnt.yml +++ b/.github/workflows/test-rnnt.yml @@ -12,6 +12,9 @@ on: - .github/workflows/test-rnnt.yml - '!**.md' +env: + PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} + jobs: build: @@ -36,4 +39,4 @@ jobs: cm run script --quiet --tags=get,sys-utils-cm - name: Test RNNT and end to end submission generation run: | - cm run script --tags=run,mlperf,inference,generate-run-cmds,_performance-only --quiet --submitter="MLCommons" --hw_name=default --model=rnnt --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --precision=${{ matrix.precision }} --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.env.CM_GIT_CHECKOUT=${{ github.event.pull_request.head.ref }} --adr.inference-src.env.CM_GIT_URL=${{ github.event.pull_request.head.repo.html_url }} --adr.ml-engine-pytorch.version=1.13.0 --adr.ml-engine-torchvision.version=0.14.1 --adr.librosa.version_max=0.9.1 + cm run script --tags=run,mlperf,inference,generate-run-cmds,_performance-only --quiet --submitter="MLCommons" --hw_name=default --model=rnnt --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --precision=${{ matrix.precision }} --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.env.CM_GIT_CHECKOUT=$PR_HEAD_REF --adr.inference-src.env.CM_GIT_URL=${{ github.event.pull_request.head.repo.html_url }} --adr.ml-engine-pytorch.version=1.13.0 --adr.ml-engine-torchvision.version=0.14.1 --adr.librosa.version_max=0.9.1 diff --git a/.github/workflows/test-submission-checker.yml b/.github/workflows/test-submission-checker.yml index 29a06248e..b7ab88ddb 100644 --- a/.github/workflows/test-submission-checker.yml +++ b/.github/workflows/test-submission-checker.yml @@ -11,6 +11,9 @@ on: - .github/workflows/test-submission-checker.yml - '!**.md' +env: + PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} + jobs: build: @@ -32,4 +35,4 @@ jobs: git clone https://github.com/mlcommons/inference_results_v4.1 --depth 1 - name: Test MLPerf inference submission checker run: | - cm run script --tags=run,mlperf,inference,submission,checker --adr.inference-src.tags=_branch.${{ github.event.pull_request.head.ref }},_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --input=`pwd`/inference_results_v4.1 --src_version=v4.1 --extra_args=" --skip-extra-accuracy-files-check" --quiet + cm run script --tags=run,mlperf,inference,submission,checker --adr.inference-src.tags=_branch.$PR_HEAD_REF,_repo.${{ github.event.pull_request.head.repo.html_url }} --adr.inference-src.version=custom --input=`pwd`/inference_results_v4.1 --src_version=v4.1 --extra_args=" --skip-extra-accuracy-files-check" --quiet diff --git a/.github/workflows/test-tvm.yml b/.github/workflows/test-tvm.yml index b132fc002..6741c3610 100755 --- a/.github/workflows/test-tvm.yml +++ b/.github/workflows/test-tvm.yml @@ -12,6 +12,9 @@ on: - .github/workflows/test-tvm.yml - '!**.md' +env: + PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} + jobs: build: @@ -33,4 +36,4 @@ jobs: python3 -m pip install cm4mlops - name: Test Resnet50 TVM backend run: | - cm run script --tags=run,mlperf,inference,generate-run-cmds --quiet --submitter="MLCommons" --hw_name=default --model=resnet50 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.${{ github.event.pull_request.head.ref }} + cm run script --tags=run,mlperf,inference,generate-run-cmds --quiet --submitter="MLCommons" --hw_name=default --model=resnet50 --implementation=reference --backend=${{ matrix.backend }} --device=cpu --scenario=Offline --test_query_count=5 --adr.compiler.tags=gcc --adr.inference-src.version=custom --adr.inference-src.tags=_repo.${{ github.event.pull_request.head.repo.html_url }},_branch.$PR_HEAD_REF