From ad821a1fc8b39640d204ce1bc8e17a41c86fb0a0 Mon Sep 17 00:00:00 2001 From: yzhang93 Date: Thu, 2 Mar 2023 18:16:58 -0800 Subject: [PATCH] Use old torch-mlir package to avoid crash on rdna2 (#1137) --- setup_venv.ps1 | 2 +- setup_venv.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup_venv.ps1 b/setup_venv.ps1 index a5c8e650..fa319955 100644 --- a/setup_venv.ps1 +++ b/setup_venv.ps1 @@ -89,7 +89,7 @@ else {python -m venv .\shark.venv\} python -m pip install --upgrade pip pip install wheel pip install -r requirements.txt -pip install --pre torch-mlir torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu -f https://llvm.github.io/torch-mlir/package-index/ +pip install --pre torch-mlir==20230228.763 torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu -f https://llvm.github.io/torch-mlir/package-index/ pip install --upgrade -f https://nod-ai.github.io/SHARK-Runtime/pip-release-links.html iree-compiler iree-runtime Write-Host "Building SHARK..." pip install -e . -f https://llvm.github.io/torch-mlir/package-index/ -f https://nod-ai.github.io/SHARK-Runtime/pip-release-links.html diff --git a/setup_venv.sh b/setup_venv.sh index d5b6ba76..af4fcac7 100755 --- a/setup_venv.sh +++ b/setup_venv.sh @@ -78,9 +78,9 @@ $PYTHON -m pip install --upgrade -r "$TD/requirements.txt" if [ "$torch_mlir_bin" = true ]; then if [[ $(uname -s) = 'Darwin' ]]; then echo "MacOS detected. Installing torch-mlir from .whl, to avoid dependency problems with torch." - $PYTHON -m pip install --pre --no-cache-dir torch-mlir -f https://llvm.github.io/torch-mlir/package-index/ -f https://download.pytorch.org/whl/nightly/torch/ + $PYTHON -m pip install --pre --no-cache-dir torch-mlir==20230228.763 -f https://llvm.github.io/torch-mlir/package-index/ -f https://download.pytorch.org/whl/nightly/torch/ else - $PYTHON -m pip install --pre torch-mlir -f https://llvm.github.io/torch-mlir/package-index/ + $PYTHON -m pip install --pre torch-mlir==20230228.763 -f https://llvm.github.io/torch-mlir/package-index/ if [ $? -eq 0 ];then echo "Successfully Installed torch-mlir" else