wsmoses / Tapir-LLVM

Tapir extension to LLVM for optimizing Parallel Programs
Other
132 stars 24 forks source link

Halide front end #97

Open ashriram opened 5 years ago

ashriram commented 5 years ago

I am playing around with the halide front-end for Tapir. Is there an elegant way to generate the bitcode prior to lowering to a cilk runtime and ABI.

The reason is we are currently taking hijacking Tapir's target-independent bitcode (i.e., reattaches, syncs, detaches) to plug into an FPGA backend.

I see the use of CilkABI as the within https://github.com/wsmoses/Halide/blob/958cd01f3505b11bfb6e641b9c0c9dd229854d56/src/CodeGen_LLVM.cpp#L1042 Is there a NoneTarget or a target that does not lower to a specific runtime?

Thanks

neboat commented 5 years ago

Depending on which branch of Tapir you're using, you should be able to pass the flags -S -emit-llvm -ftapir=none to clang to get the LLVM IR with Tapir constructs.

Edit: Sorry, I overlooked the fact that you're using the Halide front end. With some versions of Tapir, setting tapirTarget in a PassManagerBuilder to nullptr should cause it to perform no lowering. Give that a try.