From dada81a519ce2bf37e40fdb53c5b844daf8406f7 Mon Sep 17 00:00:00 2001 From: Quan junkun Date: Wed, 15 Oct 2025 10:15:30 +0800 Subject: [PATCH] ci-test --- .github/workflows/ci-temp-model-test.yaml | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ci-temp-model-test.yaml diff --git a/.github/workflows/ci-temp-model-test.yaml b/.github/workflows/ci-temp-model-test.yaml new file mode 100644 index 0000000..bb20b1d --- /dev/null +++ b/.github/workflows/ci-temp-model-test.yaml @@ -0,0 +1,42 @@ +name: ci-temp-test-model + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + CUDA_VISIBLE_DEVICES: 7 + +jobs: + ci-temp-test-model: + runs-on: ci-temp-test-model + concurrency: + group: ci-temp-test-model-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + steps: + - name: Checkout flaggems + uses: actions/checkout@v4 + + - name: Checkout benchmark + uses: actions/checkout@v4 + with: + repository: pytorch/benchmark + path: benchmark + + - name: Install and run benchmark + shell: bash + run: | + source tools/run_command.sh + run_command source "/root/anaconda3/etc/profile.d/conda.sh" + run_command conda init bash + run_command conda activate wz-torch-bench + run_command pip install -e . + run_command sed -i '/self\.worker\.run("import torch")/a\ self.worker.run(\ + """\ + import flag_gems\ + flag_gems.enable(record=False, once=True, path='"'"'benchmark/oplist.log'"'"')""")' benchmark/torchbenchmark/__init__.py + run_command python benchmark/install.py models resnet50 + run_command python benchmark/run_benchmark.py test_bench --accuracy --device cuda --test eval --output output.json --models resnet50 + run_command sed -i '/self\.worker\.run($/,/^[[:space:]]*flag_gems\.enable.*oplist\.log.*""")/d' benchmark/torchbenchmark/__init__.py \ No newline at end of file