Resolve Mac torch-mlir torch setup dependency. Enable MacOS CI

This commit is contained in:
PhaneeshB
2022-11-07 13:16:24 +05:30
committed by Prashant Kumar
parent 1e95e4b502
commit 64d6da75c7
2 changed files with 3 additions and 4 deletions

View File

@@ -77,7 +77,8 @@ $PYTHON -m pip install --upgrade pip || die "Could not upgrade pip"
$PYTHON -m pip install --upgrade -r "$TD/requirements.txt"
if [ "$torch_mlir_bin" = true ]; then
if [[ $(uname -s) = 'Darwin' ]]; then
echo "MacOS detected. Please install torch-mlir from source or .whl, as dependency problems may occur otherwise."
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/
else
$PYTHON -m pip install --pre torch-mlir -f https://llvm.github.io/torch-mlir/package-index/
if [ $? -eq 0 ];then
@@ -104,7 +105,7 @@ else
echo "Not installing a backend, please make sure to add your backend to PYTHONPATH"
fi
$PYTHON -m pip install -e . -f https://llvm.github.io/torch-mlir/package-index/ -f ${RUNTIME}
$PYTHON -m pip install -e . -f https://llvm.github.io/torch-mlir/package-index/ -f ${RUNTIME} -f https://download.pytorch.org/whl/nightly/torch/
if [[ ! -z "${IMPORTER}" ]]; then
echo "${Yellow}Installing importer tools.."