-
Notifications
You must be signed in to change notification settings - Fork 0
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
Dlopen option #2
Comments
I'm sorry but I don't understand precisely what your issue is? Please submit a pull request with your proposed solution following the CONTRIBUTING guidelines. |
so, maybe I m silly programer, this is more question than sugestion (but of course, if tell me i will try make PR to contribute), so my question is: is this library suitable to have option dlopen ? why: |
You are not a silly programmer, I simply didn't understand what you wanted. I think that what you want is to add a new OpenCL SDK path to search for the ICD. |
well, if I understand code, program at build will find opencl ".dll" and it will be embeded into binary ..., but in android it does not work for example if I build binary for android_xyz_samsung it would not work on android_abc_lenovo, because it has diferent path and name to "opencl.so"..., of course sometime in other OS it can be similar problem, but here is linking ... I would need to build not "static" (concreate) path, but I would need build "dynamic" (at begin in runtime search in list of paths and make dlopen of available), I was parcipiate in similar situation in Vlang and can I in summer sugest PR? of course this way has small performance penalty, but it would make library more flexible ... |
Not quite. The program searches for |
@kenba , I think the proposal is to add the ability to link dynamically with OpenCL library in the runtime, and not during the compilation stage. I have a similar requirement: I need to code a program that can be launched on any machine, even on those that do not have OpenCL library in the search path. And after startup the program should try to dlopen OpenCL library. If no success, than the message should appear: "No OpenCL detected". If I decide to link with So the question is: can the dlopen feature be added to |
Thank you @dmitry-zakablukov , I think I get it now. Line 53 in fd619e9
I've tested it on |
@kenba , well, this is still the linkage on the compilation stage, but now with the help of I am currently working on dynamic load of OpenCl library and its integration in |
@kenba , please have a look at kenba/cl3#33 |
@dmitry-zakablukov I have changed this library based on the guidance from here: Making a *-sys crate. Static linking now requires the [features]
static = ["opencl-sys/static"]
dynamic = ["opencl-sys/dynamic"]
...
# Default features:
default = ["static", "CL_VERSION_1_1", "CL_VERSION_1_2"] Please see the advice for "sys" packages from the Cargo book: sys-packages for accompanying changes to the |
@kenba , how should Side note: |
The From sys-packages:
So The The dependency on If the |
I'm not quite understand how Yes, I understand now that I'm really looking forward for the future version of |
@dmitry-zakablukov I was wrong about I've copied the I've updated the Please let me know if you think these changes will work in |
@kenba , yes, this should work. |
Hi, I know that it look like sily isue, but sometime is not able know direct path to opencl, (mainly in android are 12 path to library), I sugest add to option with dlopen similar https://github.com/krrishnarraj/libopencl-stub and https://github.com/vlang/vsl/tree/master/vcl
The text was updated successfully, but these errors were encountered: