gussmith23 / glenside

A pure, low-level tensor program representation enabling tensor program optimization via program rewriting. See the web demo at https://gussmith23.github.io/glenside-web-demo/
71 stars 10 forks source link

Build Errors from Fresh Clone #39

Closed stdavids closed 4 years ago

stdavids commented 4 years ago

Replication Steps:

$ git clone git@github.com:gussmith23/glenside.git
$ cd glenside
$ cargo run demo \
     conv2d \
     data/conv2d/conv2d.glenside \
     data/conv2d/conv2d-shapes.json \
     conv2d.c \
     conv2d-hw-design.json \
     --iter-limit 40 \
     --time-limit 40 \
     --node-limit 500000 \
     --find-monolithic-designs '(64,64)' \
     --blocking '(64,64)' \
     --prefer-bsg-blocking

Error Message:

  1    Compiling serde v1.0.116
  2    Compiling tvm-sys v0.1.0 (https://github.com/mwillsey/incubator-tvm?rev=3b6edf9ec0b6b3ab6a91174e7e2aa321cd8ec9b2#3b6    edf9e)
  3    Compiling tvm-macros v0.1.1 (https://github.com/mwillsey/incubator-tvm?rev=3b6edf9ec0b6b3ab6a91174e7e2aa321cd8ec9b2#    3b6edf9e)
  4 error: failed to run custom build command for `tvm-sys v0.1.0 (https://github.com/mwillsey/incubator-tvm?rev=3b6edf9ec0    b6b3ab6a91174e7e2aa321cd8ec9b2#3b6edf9e)`
  5
  6 Caused by:
  7   process didn't exit successfully: `/home/stdavids/bsg_ml_atoms/extern/glenside/target/debug/build/tvm-sys-36ae5b38ceb    5a8d5/build-script-build` (exit code: 101)
  8 --- stdout
  9 cargo:rerun-if-env-changed=TVM_HOME
 10 cargo:rustc-link-lib=dylib=tvm
 11 cargo:rustc-link-search=/home/stdavids/.cargo/git/checkouts/incubator-tvm-4920fa2689ba3c60/3b6edf9/build
 12 cargo:warning=couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))
 13 cargo:warning=set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable
 14
 15 --- stderr
 16 thread 'main' panicked at 'Unable to find libclang: "the `libclang` shared library at /usr/lib64/clang-private/libclang    .so.7 could not be opened: libclangAST.so.7: cannot open shared object file: No such file or directory"', /home/stdavid    s/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.51.1/src/lib.rs:1731:13
 17 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 18
 19 warning: build failed, waiting for other jobs to finish...
 20 error: build failed
gussmith23 commented 4 years ago

Glenside now has an optional dependency on TVM, which requires some LLVM configuration to exist. Can you try:

cargo run --no-default-features ...rest of args the same...
stdavids commented 4 years ago

That worked. Should we install LLVM on the server or is this something that we are planning on shipping with Glenside in the future?

gussmith23 commented 4 years ago

Could we install it on the server? That would be great. Preferably 9 or newer, I think that's what TVM prefers. But 8 works. Not sure what's available for the server!

gussmith23 commented 4 years ago

There's a chance you'll still get errors if you don't disable the TVM feature though, unless you have TVM built and in your LD_LIBRARY_PATH. I'm not sure -- I'm hoping you won't have trouble as long as you don't activate the code paths that use TVM. But let me know