cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
322 stars 92 forks source link

[Testing][Utils] Conda build recipe #203

Closed hecmay closed 4 years ago

hecmay commented 4 years ago
  1. Added conda scripts for building package from scratch
  2. Updated the Makefile to install packages without enforcing dependency
hecmay commented 4 years ago

Anaconda download page: https://anaconda.org/cornell-zhang/heterocl-libs

zhangzhiru commented 4 years ago

Can you also provide the information on how we use it with conda? What does heterocl-libs mean?

hecmay commented 4 years ago

Can you also provide the information on how we use it with conda? What does heterocl-libs mean?

To install this package with conda run:

conda install -c cornell-zhang heterocl-libs

It is exactly the same way as you install other conda packages, for example numpy

conda install -c conda-forge numpy

And after you install it, you can import it with python (from conda). The library name can be changed later.

zhangzhiru commented 4 years ago

What I'm actually asking is why don't we use heterocl instead of heterocl-libs

hecmay commented 4 years ago

refer to conda in tvm repo: https://github.com/apache/incubator-tvm/tree/master/conda

heterocl-libs: install heterocl python packages with libhcl c++ so library. heterocl: python packages only (heterocl and hlib)

zhangzhiru commented 4 years ago

Ok. This is the very reason I asked you to provide the complete command-line usage. I only saw heterocl-libs; hence the question.

zhangzhiru commented 4 years ago

Can you also update the HeteroCL README as well?

seanlatias commented 4 years ago

I think we only need the one that also installs the .so library. Without that, users cannot run HeteroCL in most cases.

zhangzhiru commented 4 years ago

I think we only need the one that also installs the .so library. Without that, users cannot run HeteroCL in most cases.

Agreed.

zhangzhiru commented 4 years ago

@seanlatias @Hecmay I suggest we update & move the installation instructions from the HCL website to the README file.

hecmay commented 4 years ago

Agreed. But the conda test does not pass. The package can compile, but conda complains it cannot find CXXABI 3.2.22. I need to debug before we update the README.

hecmay commented 4 years ago

The bug has been fixed. The new version is tested on vLab. Annaconda download link: https://anaconda.org/cornell-zhang/heterocl.

Install the compiled library and python package with the following command.

conda install -c cornell-zhang heterocl

It runs much faster than to compile & install from source. Not surprising bc it uses the pre-compiled llvmdev and cmake binaries provided by conda.

zhangzhiru commented 4 years ago

Awesome!

zhangzhiru commented 4 years ago

@Hecmay Have we updated the installation guide?

hecmay commented 4 years ago

I think I need to discuss with Sean to decide where to put the installation guide. I would prefer to put it in github README.

zhangzhiru commented 4 years ago

I suggest we update & move the installation instructions from the HCL website to the README file

This is my suggestion. We need to update README regardless.