-
Notifications
You must be signed in to change notification settings - Fork 6
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 dynamic runtime (declined) #33
Conversation
Thank you @dmitry-zakablukov, you have clearly put a lot of effort into this. Unfortunately, from my perspective, you've done too much! This PR:
I do not have the time to review all of your changes. I appreciate that you want to restructure the library and ensure that all the functions are safe. However, I would prefer those issues to be handled in separate merge requests. Please can you remove all the extra changes and just provide the minimum changes necessary to fix the dynamic runtime issue. Ideally with the new functions in your |
@kenba , I understand. Unfortunately, the main problem with Consider the following code:
It can not be built on some machines (my included) because of an error:
Note, that there is no any function calls. It is just a constant imported from the crate. Nevertheless, the code will still not compile. So, if I make changes to Secondly,
These changes is a small fraction from the whole PR. What I can do is:
But I really do not like the situation when the imports can be made from several places of
I am ready to support the dynamic case in ================ Let me start with unsafe functions in a separate PR. |
|
Declining PR because of too much dirty commits, a new PR will be opened soon. |
This pr adds a feature
dynamic-runtime
to load the OpenCL library in the runtime and avoid linkage errors during compilation stage (OpenCL.lib not found
).Additional changes:
cl3
are safe nowcl3::constants
modulecl3::types
moduleConstants and types refactoring was done because there was a possibility to import
CL_SUCCESS
constant, for example, from several modules ofcl3
. It is still an issue thow for a static runtime, but with dynamic runtime there is only the one module ofcl3
from which a constantCL_SUCCESS
can be imported.I have checked that there is no compilation warnings with both runtimes and with default and full features sets.
Test are passing using the command
cargo test --all-features -- --test-threads=1
.