mirror of https://github.com/llvm/torch-mlir
Pin the CI to the latest working PyTorch.
I am investigating the breakage. Also, fix "externals" rename in setup.py and some cases where we weren't using `requirements.txt` consistently. Also, fix a case where the packaging script would get confused due to ".." in the path name.pull/712/head snapshot-20220329.354
parent
f2269ced80
commit
3a96078571
|
@ -29,7 +29,7 @@ jobs:
|
|||
python -m pip install -r $GITHUB_WORKSPACE/externals/llvm-project/mlir/python/requirements.txt
|
||||
- name: Install PyTorch nightly depends
|
||||
run: |
|
||||
python -m pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
|
||||
python -m pip install -r requirements.txt
|
||||
- name: Install Ninja
|
||||
uses: llvm/actions/install-ninja@55d844821959226fab4911f96f37071c1d4c3268
|
||||
- name: Get Submodule Hash
|
||||
|
|
|
@ -24,7 +24,7 @@ python -m venv "$package_test_venv"
|
|||
VENV_PYTHON="$package_test_venv/bin/python"
|
||||
|
||||
echo "---- INSTALLING torch ----"
|
||||
$VENV_PYTHON -m pip install --pre torch torchvision pybind11 -f "https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html"
|
||||
$VENV_PYTHON -m pip install -r "${repo_root}/requirements.txt"
|
||||
echo "---- INSTALLING other deps for smoke test ----"
|
||||
$VENV_PYTHON -m pip install requests pillow
|
||||
echo "---- INSTALLING torch-mlir ----"
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
--pre
|
||||
|
||||
numpy
|
||||
torch
|
||||
torchvision
|
||||
# TODO: Fix for latest PyTorch.
|
||||
torch==1.12.0.dev20220328+cpu
|
||||
torchvision==0.13.0.dev20220328+cpu
|
||||
|
||||
# Build requirements.
|
||||
pybind11
|
||||
|
|
7
setup.py
7
setup.py
|
@ -51,11 +51,12 @@ class CMakeBuild(build_py):
|
|||
target_dir = self.build_lib
|
||||
cmake_build_dir = os.getenv("TORCH_MLIR_CMAKE_BUILD_DIR")
|
||||
if not cmake_build_dir:
|
||||
cmake_build_dir = os.path.join(target_dir, "..", "cmake_build")
|
||||
cmake_build_dir = os.path.abspath(
|
||||
os.path.join(target_dir, "..", "cmake_build"))
|
||||
if not os.getenv("TORCH_MLIR_CMAKE_BUILD_DIR_ALREADY_BUILT"):
|
||||
src_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
llvm_dir = os.path.join(
|
||||
src_dir, "external", "llvm-project", "llvm")
|
||||
src_dir, "externals", "llvm-project", "llvm")
|
||||
cmake_args = [
|
||||
f"-DCMAKE_BUILD_TYPE=Release",
|
||||
f"-DPython3_EXECUTABLE={sys.executable}",
|
||||
|
@ -64,7 +65,7 @@ class CMakeBuild(build_py):
|
|||
f"-DLLVM_ENABLE_PROJECTS=mlir",
|
||||
f"-DLLVM_EXTERNAL_PROJECTS=torch-mlir;torch-mlir-dialects",
|
||||
f"-DLLVM_EXTERNAL_TORCH_MLIR_SOURCE_DIR={src_dir}",
|
||||
f"-DLLVM_EXTERNAL_TORCH_MLIR_DIALECTS_SOURCE_DIR={src_dir}/external/llvm-external-projects/torch-mlir-dialects",
|
||||
f"-DLLVM_EXTERNAL_TORCH_MLIR_DIALECTS_SOURCE_DIR={src_dir}/externals/llvm-external-projects/torch-mlir-dialects",
|
||||
# Optimization options for building wheels.
|
||||
f"-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON",
|
||||
f"-DCMAKE_C_VISIBILITY_PRESET=hidden",
|
||||
|
|
Loading…
Reference in New Issue