Commit a71beda3 by Lianmin Zheng Committed by Tianqi Chen

[CODEGEN] add callback post proc for opencl (#692)

parent 17e7e3d5
......@@ -16,6 +16,7 @@ namespace tvm {
namespace codegen {
runtime::Module BuildOpenCL(Array<LoweredFunc> funcs) {
using tvm::runtime::Registry;
bool output_ssa = false;
CodeGenOpenCL cg;
cg.Init(output_ssa);
......@@ -23,6 +24,10 @@ runtime::Module BuildOpenCL(Array<LoweredFunc> funcs) {
cg.AddFunction(f);
}
std::string code = cg.Finish();
if (const auto* f = Registry::Get("tvm_callback_opencl_postproc")) {
code = (*f)(code).operator std::string();
}
#if TVM_OPENCL_RUNTIME
return OpenCLModuleCreate(code, "cl", ExtractFuncInfo(funcs));
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment