-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OPENCL_MEMORY_CONFIG_FILE环境变量如何使用?按照文档中的配置conv2d在device:cpu上不生效 #10469
Comments
OPENCL_MEMORY_CONFIG_FILE 文件内容不全,格式如下: |
@lg920810 请问问题是否已经解决? |
试过了,这个模型onnx共有600多层,拿onnx推理看了下每层输出的shape,有几十层的output都超过16384,如何查找onnx和paddlelite种对应的层的名字啊?或者是否可以限制opencl使用Image2D的格式计算呢? |
hello~ 可以帮忙再看下这个问题吗? |
没办法去将 onnx 模型和 paddlelite 模型的层去一一对应。 |
不是动态shape的,那看起来也没什么好办法了,我本来是想问问有没有全局限制Image2D的方法, 我发现paddle模型中有一个layout算子,这个算子会做nchw->ImageDefault的转化,通过config也无法限制,有什么办法吗? 无法上传图片,算子执行顺序如下 |
对于 OpenCL 的内存使用有新的需求,可以在该issue下新增:#10452 |
确实是用逗号分隔的啊,你再检查一下输入输出? |
|
我在使用PaddleLite-generic-demo的时候,添加了自己的模型,使用opencl后端进行推理加速,使用paddle_lite_opt工具进行模型转换成功,cpu上的推理均正确,在进行推理是报错为:
[3 4/ 8 13:36:25.947 ...-Lite/lite/backends/opencl/cl_context.cc:42 AddKernel] --- end get program ---
[3 4/ 8 13:36:25.947 ...-Lite/lite/backends/opencl/cl_context.cc:43 AddKernel] --- to create kernel: conv2d_1x1_h1w4c1 ---
[3 4/ 8 13:36:25.947 ...-Lite/lite/backends/opencl/cl_context.cc:49 AddKernel] --- end create kernel ---
[3 4/ 8 13:36:25.947 ...-Lite/lite/backends/opencl/cl_context.cc:59 GetKernel] --- kernel count: 71 ---
dir: ../assets/configs
width: 512
height: 512
mean: 0.500000,0.500000,0.500000
std: 0.500000,0.500000,0.500000
draw_weight: 0.800000
malloc image is out of max image size(w,h):16384,16384, need image size(w,h):32768,64
[F 4/ 8 13:36:25.947 ...e/lite/backends/opencl/target_wrapper.cc:98 ImageValid] malloc image is out of max image size(w,h):16384,16384, need image size(w,h):32768,64
[F 4/ 8 13:36:25.947 ...e/lite/backends/opencl/target_wrapper.cc:98 ImageValid] malloc image is out of max image size(w,h):16384,16384, need image size(w,h):32768,64
[4 4/ 8 13:36:25. 2 ...e-Lite/lite/backends/opencl/cl_context.h:43 ~CLContext] release cl::Program, cl::Kernel finished.
[I 4/ 8 13:36:26. 13 ...-Lite/lite/backends/opencl/cl_runtime.cc:41 ~CLRuntime] is_cl_runtime_initialized_:1
An internal error occurred in PaddleLite(mobile config).
查阅文档后添加以下内容到kernel.txt中,使用环境变量export OPENCL_MEMORY_CONFIG_FILE=./kernel.txt 进行模型转化和推,但都没有work。
device:cpu
conv2d
The text was updated successfully, but these errors were encountered: