Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci-temp-model-test.yaml
Original file line number Diff line number Diff line change
@@ -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