Skip to content

Halide OpenCL questions #5445

Answered by abadams
harishch4 asked this question in Q&A
Nov 13, 2020 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Yes, the Halide compiler converts the halide code to a mix of host and kernel code, depending on the schedule. The kernel code is OpenCL C, and there's no good way to dump it except for the one you already discovered. The host code compiles from Halide, to LLVM IR, to machine code. It never exists as C source code. You can see it in Halide IR and LLVM IR form with HL_DEBUG_CODEGEN=2.

To choose the platform and device see the functions in HalideRuntimeOpenCL.h (halide_opencl_set_platform_name and halide_opencl_set_device_type)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@abadams
Comment options

@harishch4
Comment options

Answer selected by harishch4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants