Skip to content
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

Support for OpenCL? #265

Open
hhd-shuai opened this issue Jan 17, 2025 · 4 comments
Open

Support for OpenCL? #265

hhd-shuai opened this issue Jan 17, 2025 · 4 comments

Comments

@hhd-shuai
Copy link

Hi, does the RK3588 support running OpenCL code? If so, in what way does it run, and is the device the GPU?

@kappo96
Copy link

kappo96 commented Jan 21, 2025

Well, first of all, this is not a problem for this lib🤨. Secondly, I have tried calling the GPU(ARM mali g610) of this chip using OpenCL, which is feasible. The specific implementation can be seen in the following linkhttps://blog.csdn.net/zichuanning520/article/details/129411886

@hhd-shuai
Copy link
Author

Well, first of all, this is not a problem for this lib🤨. Secondly, I have tried calling the GPU(ARM mali g610) of this chip using OpenCL, which is feasible. The specific implementation can be seen in the following linkhttps://blog.csdn.net/zichuanning520/article/details/129411886

Thanks for your reply! I have another question. If the RKNN model needs the results processed by an OpenCL kernel, how can I avoid data copying?

@kappo96
Copy link

kappo96 commented Jan 21, 2025

It should be possible to avoid this copy operation, but it seems that only by using the OpenCL clCreateBuffer function with the CL_MEM_ALLOC_HOST_PTR flag can we allocate memory that can be used simultaneously by both OpenCL and RKNN.

@hhd-shuai
Copy link
Author

It should be possible to avoid this copy operation, but it seems that only by using the OpenCL clCreateBuffer function with the CL_MEM_ALLOC_HOST_PTR flag can we allocate memory that can be used simultaneously by both OpenCL and RKNN.

Thanks! I'll give it a shot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants