Commit Graph

16 Commits (8f9690194387ec621243bd1dbbb46e61797708d3)

Author SHA1 Message Date
powderluv cecf1fbba5
Add a CI builder with latest pytorch CPU nightly. Also add AArch64 to the build (#166) 2021-02-21 13:36:06 -08:00
Stella Laurenzo 72f785c4b2 Update install_mlir.sh to take extra configure flags. 2021-01-22 16:30:23 -08:00
Sean Silva 2549d00d8c Specify Python3_EXECUTABLE explicitly.
Otherwise `MLIR_BINDINGS_PYTHON_ENABLED=ON` won't work.
2021-01-20 18:07:04 -08:00
Stella Laurenzo 52240e0569 Disable RTTI in the LLVM build.
* It was only required with the old python APIs.
2021-01-08 10:56:57 -08:00
Sean Silva d8261a06d5 Fix scripts to handle the case of nonexistent directory.
Also, touch up the docs.
2021-01-05 14:17:08 -08:00
powderluv d35724ad0d
Use portable realpath. Its unavailable in !GNU (#145)
realpath is a GNUUtils package that is not available on recent OSX

TEST=Build on OSX systems without GNUutils + zsh

Change-Id: I573855b93a08e1746e0bb214be28b4a3ea8264ca
2020-12-29 13:03:15 -08:00
Stella Laurenzo 36d750ca89 Default to -DLLVM_LINK_LLVM_DYLIB=ON.
* We're building libLLVM.so anyway. Saves a lot of time/space to link tools against it.
* MLIR tools do not yet respect this (but it doesn't seem to hurt).
2020-11-09 14:13:42 -08:00
Stella Laurenzo 59b7c559f4 Tweak build flags for efficiency and document building without a container.
* Enables -gsplit-dwarf for both LLVM and NPCOMP, reducing the occurrence of the ~GB scale binaries.
* CMake shared linking seems incompatible with this, so shared objects are still "too big" but there are few of them.
* Reduces disk thrash on clean/install of everything.
2020-11-03 13:46:46 -08:00
Sean Silva 87b6bc305a [build_tools] Fix install_mlir.sh to look for Python3
Otherwise, on my machine MLIR somehow gets configured with Python 2,
which is not supported.

The `probe_python` stuff is copied from cmake_configure.sh
2020-10-15 20:15:53 -07:00
Stella Laurenzo af4edb63ae Start reworking towards a shared library build.
* Need to have a dag of shared library deps in order to interop across python extensions (as presented in ODM).
* Introduced add_npcomp_library and friends to mirror the MLIR setup.
* Adds a libNPCOMP.so shared library.
* Redirects tools and extensions to link against libNPCOMP.so (instead of static libs).
* Moves all libraries to lib/, all binaries to bin/ and all python extensions to python/. The invariant is that the rpaths are setup to have a one level directory structure.
* Reworks the _torch_mlir extension to build like the others (still need to come up with a consolidated rule to do this instead of open coded).
* Includes an upstream version bump to pick up needed changes.

Sizes with dynamic linking (stripped, release, asserts enabled):
  libNPCOMP.so: 43M (includes much of the underlying LLVM codegen deps)
  libMLIR.so: 31M
  _npcomp.so: 1.6M (python extension)
  _torch_mlir.so: 670K (python extension)
  npcomp-capi-ir-test: 6.3K
  npcomp-opt: 351K
  npcomp-run-mlir: 461K
  mnist-playground: 530K

Still more can be done to normalize and optimize but this gets us structurally to the starting point.
2020-10-09 16:02:58 -07:00
Stella Laurenzo 51d51241b4 Add scripts/documentation for VSCode setup with a docker dev image.
* Forks a subset of my shell functions into docker_shell_funcs.sh, specifically needed to create docker images that run as yourself.
* Extends the readme with the three command bootstrap to get a dev container running.
* Step by step instructions for configuring VSCode for Intellisense in either npcomp or LLVM.
* Changes LLVM config options to enable tests. This setup is now suitable for upstream changes as well without rebuilding.
2020-10-07 21:27:20 -07:00
Stella Laurenzo 3ccc2214a7 Set PyTorch captured function return type.
* Resolves various TODOs that required an LLVM change/bump.
* Bumps LLVM to 4aa217160e5f06a96c6effc4950c3b402374de58
2020-10-07 10:14:34 -07:00
Stella Laurenzo 678989a321
Update docker, instructions and some fixes for the pytorch 1.3 build. (#45)
* Includes pybind11 directly (for some reason using the pytorch helper header for this depends on a source file not in the image).
* Installs nnpack into the image.
* Installs new-clang and LLD and configures environment to use it (otherwise, link time is terrible).
* Fixes a gcc compile error (in the off chance you build with default gcc compiler).
* Tests are failing based on some dialect registration stuff that must not have been factored correctly. Will followup with a fix.
2020-09-16 21:57:46 -07:00
Stella Laurenzo 4731cbd94b Update install_mlir.sh script for new submodule path. 2020-08-01 14:54:20 -07:00
Stella Laurenzo e1839a0d6b Bump llvm and iree versions.
* Gets us passed the upstream changes that enable type interfaces.
* Adds the ARM backend due to an implicit IREE dependency sneaking in for that (https://github.com/google/iree/issues/2401)
* Adds explicit TypeStorage to type base classes per upstream change.
2020-07-02 11:24:05 -07:00
Stella Laurenzo 12d8459d73 Rework README, add docs, and move some scripts to better locations accordingly. 2020-06-20 11:56:13 -07:00