This is an automated email from the ASF dual-hosted git repository.
masahi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 7fe58a181c [OpenCL] Improve diagnostic message (#14995)
7fe58a181c is described below
commit 7fe58a181ccf7856e3c62d0600207568a951f053
Author: Egor Churaev <[email protected]>
AuthorDate: Wed May 31 22:46:25 2023 +0300
[OpenCL] Improve diagnostic message (#14995)
Print error string if it is impossible to build kernel.
---
src/runtime/opencl/opencl_module.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/runtime/opencl/opencl_module.cc
b/src/runtime/opencl/opencl_module.cc
index 45154ce231..5f2bc5db49 100644
--- a/src/runtime/opencl/opencl_module.cc
+++ b/src/runtime/opencl/opencl_module.cc
@@ -252,7 +252,9 @@ cl_kernel
OpenCLModuleNode::InstallKernel(cl::OpenCLWorkspace* w, cl::OpenCLThre
log.resize(len);
clGetProgramBuildInfo(programs_[func_name][device_id], dev,
CL_PROGRAM_BUILD_LOG, len,
&log[0], nullptr);
- LOG(FATAL) << "OpenCL build error for device=" << dev << "\n" << log;
+ LOG(FATAL) << "OpenCL build error for device=" << dev
+ << "\nError: " << cl::CLGetErrorString(err) << "\n"
+ << log;
}
}
// build kernel