From 387ab87058c8b32098762067fe4aa8fb1e882505 Mon Sep 17 00:00:00 2001 From: yangfei Date: Tue, 6 Nov 2018 21:51:20 +0800 Subject: [PATCH] repair bug of memory free and build cl path --- src/framework/cl/cl_engine.h | 6 ++++-- src/framework/executor.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/framework/cl/cl_engine.h b/src/framework/cl/cl_engine.h index 76d08513aa..d7b1c912da 100644 --- a/src/framework/cl/cl_engine.h +++ b/src/framework/cl/cl_engine.h @@ -90,8 +90,10 @@ class CLEngine { bool BuildProgram(cl_program program) { cl_int status; - status = clBuildProgram(program, 0, 0, "-cl-fast-relaxed-math -I cl_kernel", - 0, 0); + std::string path = "-cl-fast-relaxed-math -I " + + CLEngine::Instance()->GetCLPath() + "/cl_kernel"; + + status = clBuildProgram(program, 0, 0, path.c_str(), 0, 0); CL_CHECK_ERRORS(status); diff --git a/src/framework/executor.cpp b/src/framework/executor.cpp index 81bfaf3a4d..0ed3a5d323 100644 --- a/src/framework/executor.cpp +++ b/src/framework/executor.cpp @@ -704,7 +704,7 @@ void Executor::InitCombineMemory() { } } if (self_alloc) { - delete origin_data; + delete data; } LOG(kLOG_INFO) << " end init combine memory "; } -- GitLab