Skip to content

Commit 56f8a0d

Browse files
authored
Update torch-mlir releases page in setup_venv.sh (huggingface#374)
* Update README.md * Update setup_venv.sh
1 parent 9035a2e commit 56f8a0d

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Now the SHARK will use your locally build Torch-MLIR repo.
106106
```shell
107107
python -m shark.examples.shark_inference.resnet50_script --device="cpu" # Use gpu | vulkan
108108
# Or a pytest
109-
pytest tank/tf/hf_masked_lm/albert-base-v2_test.py::AlbertBaseModuleTest::test_module_static_cpu
109+
pytest tank/test_models.py -k "MiniLM"
110110
```
111111

112112
</details>

setup_venv.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,11 @@ else
7171
echo "${Red}OS not detected. Pray and Play"
7272
fi
7373

74-
TM_HTML_URL="$(python3 -c "import urllib.request, json, sys; \
75-
u=json.loads(urllib.request.urlopen('https://api.github.com/repos/llvm/torch-mlir/releases/latest').read().decode()).get('html_url', False);\
76-
print(u) if u else sys.exit(1);")"
77-
TM_RELEASE_DIR=${TM_HTML_URL/"tag"/"expanded_assets"}
78-
echo "TM_HTML_URL=${TM_HTML_URL}"
79-
echo "TM_RELEASE_DIR=${TM_RELEASE_DIR}"
80-
8174
# Upgrade pip and install requirements.
8275
$PYTHON -m pip install --upgrade pip || die "Could not upgrade pip"
8376
$PYTHON -m pip install --upgrade -r "$TD/requirements.txt"
8477
if [ "$torch_mlir_bin" = true ]; then
85-
$PYTHON -m pip install --find-links ${TM_RELEASE_DIR} torch-mlir --extra-index-url ${TM_RELEASE_DIR}
78+
$PYTHON -m pip install --pre torch-mlir -f https://llvm.github.io/torch-mlir/package-index/
8679
if [ $? -eq 0 ];then
8780
echo "Successfully Installed torch-mlir"
8881
else
@@ -117,7 +110,7 @@ if [[ ! -z "${IMPORTER}" ]]; then
117110
fi
118111
fi
119112

120-
$PYTHON -m pip install -e . -f ${TM_RELEASE_DIR} -f https://github.com/${RUNTIME}/releases
113+
$PYTHON -m pip install -e . -f https://llvm.github.io/torch-mlir/package-index/ -f https://github.com/${RUNTIME}/releases
121114

122115
if [[ $(uname -s) = 'Linux' && ! -z "${IMPORTER}" ]]; then
123116
$PYTHON -m pip uninstall -y torch torchvision

0 commit comments

Comments
 (0)