Recommended way to distribute Halide-generated features?

I am currently experimenting with Halide , initial tests show very promising performance improvements.

Now I wonder what is the best Halide code distribution strategy. The requirement that users install Halide seems like a heavy barrier at this point in time (since there are no automatic installation settings).

One option would be compile_to_cto add the generated C code to the repository and distribute compilation scripts for such C code. scikit-learn uses a similar strategy for the code generated by Cython. For Halide, this seems bad, because the generated C code loses all optimizations, defeating the Halide target.

My idea would be to use compile_to_bitcode to distribute the generated bitcode along with compilation scripts that invoke llc to create the desired machine code. The only requirement for the user would be to install llc(i.e. llvm).

Does anyone have any experience with this?
What are the advantages and disadvantages of my idea of ​​distributing bit code?
What would you recommend?

+4
source share
2 answers

Some details about software distribution will help. The question implies distribution of the source code, but there is a big difference between the library, where programmers may need to interact with the created Halide code at a fine-grained level, as well as an application in which the use of Halide is largely invisible to the end user and the goal is to simply create it.

, . , - PNaCl. (PNaCl LLVM.) , , . (, Halide .) LLVM , , (.ll, .bc), , , , .

Halide , .

, Halide, . . Halide SSE2 AVX2. , , . .ll , .o, , , , .

, Halide, , . , , . Halide , Halide .

Halide , . , C- C , C . ( , Halide C.) C-. ( C Halide, , , , .)

+5

compile_to_c() , ; /.

compile_to_bitcode() , , , .

(, Halide.)

+1

All Articles