Commit Graph

3 Commits (93f1c3138bfbe9d270b03d248241b02f151162c0)

Author SHA1 Message Date
Ashay Rane 874fdb7e42
build: improve robustness of cmake and shell scripts (#1018)
On my local machine, `unzip` didn't exist (producing a "command not
found" error), but CMake ignored the error.  Although the build did
succeed (because it found a previously-built version of libtorch), it
seems better to abort builds on such failures, so this patch checks the
return code of all external process invocations.

Along similar lines, this patch also updates the shell scripts in
`build_tools` to extensively use double-quoting to prevent unintentional
word splitting or globbing.  Since some of the scripts execute `rm`
while using shell variables, this patch also adds the preamble `set -u`
to abort execution if an undefined variable is referenced, so that we
reduce the chances of executing `rm -rf /` if the path expression
happens to refer to an undefined variable.
2022-07-06 14:39:30 -07:00
powderluv 33bfeda4c5
Enable libtorch caching and source builds (#1004)
Add an option to cache libtorch/ releases if you don't want to
download the latest. Add an option to enable source builds.

TESTS:
macOS: verify with / without cache downloads
       verify source builds -- shared and static

Linux: Build Tests and Release builds
2022-07-05 10:25:43 -07:00
powderluv 2b52da951b
Link against libtorch (#955)
This moves torch-mlir to link against libtorch on macOS and linux

TESTS: Tests pass. Tested release builds on linux and macOS
2022-06-30 12:40:17 -07:00