diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad8c746..572f08a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,8 +103,8 @@ jobs: cibuildwheel --output-dir ./wheelhouse - name: Download cache from container ubuntu - if: (matrix.OS == 'ubuntu-20.04' && matrix.ARCH == 'x86_64') && (success() || failure()) - working-directory: ${{ steps.setup_base.outputs.WORKSPACE_ROOT }} + if: (matrix.os == 'ubuntu-20.04' && matrix.arch == 'x86_64') && (success() || failure()) + #working-directory: ${{ steps.setup_base.outputs.WORKSPACE_ROOT }} run: | ccache -s rm -rf $HOST_CCACHE_DIR diff --git a/pyproject.toml b/pyproject.toml index 0a8ff15..df05ac4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,15 +8,15 @@ requires = [ "numpy", "PyYAML", ] -build-backend = "setuptools.build_meta" +#build-backend = "setuptools.build_meta" [tool.cibuildwheel] -build-verbosity = 3 +build-verbosity = 0 # manylinux-aarch64-image = "manylinux_2_28" # manylinux-x86_64-image = "sameli/manylinux_2_28_x86_64_cuda_12.3" [tool.cibuildwheel.linux] -build = "cp310-*" +build = "cp310-* cp311-* cp312-*" skip = ["*-manylinux_i686", "*-musllinux*"] environment = { PATH = "/usr/lib/ccache:/usr/lib64/ccache:/usr/lib/ccache/bin:$PATH" } # environment = { PATH = "/usr/lib/ccache:/usr/lib64/ccache:/usr/lib/ccache/bin:$PATH", PIP_FIND_LINKS = "https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest" } diff --git a/setup.py b/setup.py index 00f22f1..08bdb1d 100644 --- a/setup.py +++ b/setup.py @@ -4,12 +4,13 @@ import subprocess from pathlib import Path +import ninja from setuptools import Extension, setup from setuptools.command.build_ext import build_ext -LLVM_SOURCE_DIR = "./llvm-project" #os.environ["LLVM_SOURCE_DIR"] -FINCH_MLIR_SOURCE_DIR = "./Finch-mlir" #os.environ["FINCH_MLIR_SOURCE_DIR"] +LLVM_SOURCE_DIR = "./llvm-project" # os.environ["LLVM_SOURCE_DIR"] +FINCH_MLIR_SOURCE_DIR = "./Finch-mlir" # os.environ["FINCH_MLIR_SOURCE_DIR"] PYTHON_EXECUTABLE = str(Path(sys.executable)) @@ -30,6 +31,7 @@ def build_extension(self, ext: CMakeExtension) -> None: ext_fullpath = Path.cwd() / self.get_ext_fullpath(ext.name) extdir = ext_fullpath.parent.resolve() install_dir = extdir + ninja_executable_path = Path(ninja.BIN_DIR) / "ninja" # BUILD LLVM llvm_cmake_args = [ @@ -43,12 +45,13 @@ def build_extension(self, ext: CMakeExtension) -> None: "-DLLVM_CCACHE_BUILD=ON", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON", + f"-DCMAKE_MAKE_PROGRAM:FILEPATH={ninja_executable_path}", ] subprocess.run( ["cmake", ext.llvm_source_dir, *llvm_cmake_args], cwd=llvm_build_dir, check=True, ) - subprocess.run(["ninja"], cwd=llvm_build_dir, check=True) + subprocess.run([ninja_executable_path], cwd=llvm_build_dir, check=True) # INSTALL LLVM subprocess.run( @@ -64,12 +67,13 @@ def build_extension(self, ext: CMakeExtension) -> None: f"-DMLIR_DIR={llvm_install_dir}/lib/cmake/mlir", f"-DLLVM_EXTERNAL_LIT={llvm_build_dir}/bin/llvm-lit", "-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON", + f"-DCMAKE_MAKE_PROGRAM:FILEPATH={ninja_executable_path}", ] subprocess.run( ["cmake", ext.finch_source_dir, *dialect_cmake_args], cwd=finch_build_dir, check=True, ) - subprocess.run(["ninja"], cwd=finch_build_dir, check=True) + subprocess.run([ninja_executable_path], cwd=finch_build_dir, check=True) # INSTALL FINCH DIALECT subprocess.run(