Fix torch-mlir install on linux. (#2071)

This commit is contained in:
Ean Garvey
2024-01-18 15:13:47 -06:00
committed by GitHub
parent 06bfcbc7ad
commit 18666dffc0
2 changed files with 9 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>
<html>
<body>
<a href="https://github.com/llvm/torch-mlir/releases/download/snapshot-20231210.1048/torch-2.2.0.dev20231204%2Bcpu-cp311-cp311-linux_x86_64.whl">torch-2.2.0.dev20231204+cpu-cp311-cp311-linux_x86_64.whl</a><br>
<a href="https://github.com/llvm/torch-mlir/releases/download/snapshot-20231210.1048/torch-2.2.0.dev20231204%2Bcpu-cp311-cp311-win_amd64.whl">torch-2.2.0.dev20231204+cpu-cp311-cp311-win_amd64.whl</a><br>
<a href="https://github.com/llvm/torch-mlir/releases/download/snapshot-20231213.1048/torch-2.2.0.dev20231204%2Bcpu-cp38-cp38-linux_x86_64.whl">torch-2.2.0.dev20231204+cpu-cp38-cp38-linux_x86_64.whl</a><br>
@@ -11,4 +11,5 @@
<a href="https://github.com/llvm/torch-mlir/releases/download/snapshot-20231210.1048/torch_mlir-20231210.1048-cp311-cp311-macosx_11_0_universal2.whl">torch_mlir-20231210.1048-cp311-cp311-macosx_11_0_universal2.whl</a><br>
<a href="https://github.com/llvm/torch-mlir/releases/download/snapshot-20231210.1048/torch_mlir-20231210.1048-cp311-cp311-win_amd64.whl">torch_mlir-20231210.1048-cp311-cp311-win_amd64.whl</a><br>
<a href="https://github.com/llvm/torch-mlir/releases/download/snapshot-20231210.1048/torch_mlir-20231210.1048-cp38-cp38-linux_x86_64.whl">torch_mlir-20231210.1048-cp38-cp38-linux_x86_64.whl</a><br>
</body></html>
</body>
</html>

View File

@@ -87,9 +87,9 @@ 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 uninstall -y timm #TEMP FIX FOR MAC
$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 -f package-index-torch-mlir.html
else
$PYTHON -m pip install --pre torch-mlir -f https://llvm.github.io/torch-mlir/package-index/
$PYTHON -m pip install --pre torch-mlir -f package-index-torch-mlir.html
if [ $? -eq 0 ];then
echo "Successfully Installed torch-mlir"
else
@@ -135,7 +135,9 @@ else
PYTORCH_URL=https://download.pytorch.org/whl/nightly/cpu/
fi
$PYTHON -m pip install --no-warn-conflicts -e . -f .\package-index-torch-mlir.html -f ${RUNTIME} -f ${PYTORCH_URL}
$PYTHON -m pip install --no-warn-conflicts -e . -f package-index-torch-mlir.html -f ${RUNTIME}
if [[ $(uname -s) = 'Linux' && ! -z "${IMPORTER}" ]]; then
T_VER=$($PYTHON -m pip show torch | grep Version)