Skip to content

Commit d38e37b

Browse files
authored
seperate importer and benchmark deps (huggingface#393)
1 parent 3618fb3 commit d38e37b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/test-models.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
if: matrix.suite == 'cpu'
8989
run: |
9090
cd $GITHUB_WORKSPACE
91-
PYTHON=python${{ matrix.python-version }} IMPORTER=1 ./setup_venv.sh
91+
PYTHON=python${{ matrix.python-version }} BENCHMARK=1 IMPORTER=1 ./setup_venv.sh
9292
source shark.venv/bin/activate
9393
pytest --benchmark --ci --ci_sha=${SHORT_SHA} --local_tank_cache="/data/anush" tank/test_models.py -k cpu
9494
gsutil cp ./bench_results.csv gs://shark-public/builder/bench_results/${DATE}/bench_results_cpu_${SHORT_SHA}.csv
@@ -98,7 +98,7 @@ jobs:
9898
if: matrix.suite == 'cuda'
9999
run: |
100100
cd $GITHUB_WORKSPACE
101-
PYTHON=python${{ matrix.python-version }} IMPORTER=1 ./setup_venv.sh
101+
PYTHON=python${{ matrix.python-version }} BENCHMARK=1 IMPORTER=1 ./setup_venv.sh
102102
source shark.venv/bin/activate
103103
pytest --benchmark --ci --ci_sha=${SHORT_SHA} --local_tank_cache="/data/anush" tank/test_models.py -k cuda
104104
gsutil cp ./bench_results.csv gs://shark-public/builder/bench_results/${DATE}/bench_results_cuda_${SHORT_SHA}.csv
@@ -108,6 +108,6 @@ jobs:
108108
if: matrix.suite == 'vulkan'
109109
run: |
110110
cd $GITHUB_WORKSPACE
111-
PYTHON=python${{ matrix.python-version }} IMPORTER=1 ./setup_venv.sh
111+
PYTHON=python${{ matrix.python-version }} BENCHMARK=1 IMPORTER=1 ./setup_venv.sh
112112
source shark.venv/bin/activate
113113
pytest --ci --ci_sha=${SHORT_SHA} --local_tank_cache="/data/anush" tank/test_models.py -k vulkan

setup_venv.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# VENV_DIR=myshark.venv #create a venv called myshark.venv
88
# USE_IREE=1 #use stock IREE instead of Nod.ai's SHARK build
99
# IMPORTER=1 #Install importer deps
10+
# BENCHMARK=1 #Install benchmark deps
1011
# NO_BACKEND=1 #Don't install iree or shark backend
1112
# if you run the script from a conda env it will install in your conda env
1213

@@ -112,7 +113,7 @@ fi
112113

113114
$PYTHON -m pip install -e . -f https://llvm.github.io/torch-mlir/package-index/ -f https://github.com/${RUNTIME}/releases
114115

115-
if [[ $(uname -s) = 'Linux' && ! -z "${IMPORTER}" ]]; then
116+
if [[ $(uname -s) = 'Linux' && ! -z "${BENCHMARK}" ]]; then
116117
$PYTHON -m pip uninstall -y torch torchvision
117118
$PYTHON -m pip install --pre torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cu116
118119
if [ $? -eq 0 ];then

0 commit comments

Comments
 (0)