未验证 提交 93277542 编写于 作者: Y ysh329 提交者: GitHub

[cherry-pick][OPENCL] Fix opencl create cmd with prop, fix int16 model for fc...

[cherry-pick][OPENCL] Fix opencl create cmd with prop, fix int16 model for fc opencl kernel. (#3918)


* [OPENCL] Fix opencl fc int16 model bug caused by fc kernel (#3900)

* fix opencl fc kernel caused int16 model weight abnormal. test=develop
上级 08d9efbd
...@@ -104,7 +104,9 @@ void CLWrapper::InitFunctions() { ...@@ -104,7 +104,9 @@ void CLWrapper::InitFunctions() {
PADDLE_DLSYM(clEnqueueMapBuffer); PADDLE_DLSYM(clEnqueueMapBuffer);
PADDLE_DLSYM(clEnqueueMapImage); PADDLE_DLSYM(clEnqueueMapImage);
PADDLE_DLSYM(clCreateCommandQueue); PADDLE_DLSYM(clCreateCommandQueue);
PADDLE_DLSYM(clCreateCommandQueueWithProperties); // note(ysh329): consider compatibility for cl_driver_version 1.10
// using clCreateCommandQueue instead.
// PADDLE_DLSYM(clCreateCommandQueueWithProperties);
PADDLE_DLSYM(clReleaseCommandQueue); PADDLE_DLSYM(clReleaseCommandQueue);
PADDLE_DLSYM(clCreateProgramWithBinary); PADDLE_DLSYM(clCreateProgramWithBinary);
PADDLE_DLSYM(clRetainContext); PADDLE_DLSYM(clRetainContext);
...@@ -437,9 +439,14 @@ CL_API_ENTRY cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties( ...@@ -437,9 +439,14 @@ CL_API_ENTRY cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(
cl_device_id device, cl_device_id device,
const cl_queue_properties *properties, const cl_queue_properties *properties,
cl_int *errcode_ret) CL_API_SUFFIX__VERSION_2_0 { cl_int *errcode_ret) CL_API_SUFFIX__VERSION_2_0 {
return paddle::lite::CLWrapper::Global() // note(ysh329): consider compatibility for cl_driver_version 1.10
->clCreateCommandQueueWithProperties()( // using clCreateCommandQueue instead.
context, device, properties, errcode_ret); // return paddle::lite::CLWrapper::Global()
// ->clCreateCommandQueueWithProperties()(
// context, device, properties, errcode_ret);
//
return paddle::lite::CLWrapper::Global()->clCreateCommandQueue()(
context, device, 0, errcode_ret);
} }
CL_API_ENTRY cl_int CL_API_CALL clReleaseCommandQueue( CL_API_ENTRY cl_int CL_API_CALL clReleaseCommandQueue(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册