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

OpenCL dynamic runtime support added #35

Merged
merged 4 commits into from
Nov 26, 2024
Merged

Conversation

dmitry-zakablukov
Copy link
Contributor

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).

I have checked that there is no compilation warnings with both runtimes and with default and full features sets. I also have checked that opencl3 library can be compiled with my changes (there are only two warnings about unused Result).

Tests are passing using the command cargo test --all-features -- --test-threads=1.

@kenba
Copy link
Owner

kenba commented Nov 23, 2024

@dmitry-zakablukov please can you change this PR to use the current develop branch?

@dmitry-zakablukov
Copy link
Contributor Author

@kenba , okay, but it will take some time.

# Conflicts:
#	Cargo.toml
#	src/command_queue.rs
#	src/d3d10.rs
#	src/d3d11.rs
#	src/dx9_media_sharing.rs
#	src/egl.rs
#	src/error_codes.rs
#	src/gl.rs
#	src/lib.rs
#	src/memory.rs
#	src/platform.rs
#	src/program.rs
#	src/runtime/mod.rs
@dmitry-zakablukov
Copy link
Contributor Author

@kenba , I have updated the pr, but I cannot check compilation with the current version of opencl-sys.

Can you please apply this patch to opencl-sys?
static.patch

In this patch all extern system functions are under the static feature.

@kenba
Copy link
Owner

kenba commented Nov 25, 2024

@dmitry-zakablukov I've applied your patch to the develop branch.

@dmitry-zakablukov
Copy link
Contributor Author

@kenba , thanks. I have updated the pr, all tests and examples can be compiled without errors now.

@kenba kenba merged commit 444af7a into kenba:develop Nov 26, 2024
1 of 3 checks passed
@kenba
Copy link
Owner

kenba commented Nov 26, 2024

Thanks @dmitry-zakablukov merged in now.

@kenba kenba mentioned this pull request Dec 7, 2024
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

Successfully merging this pull request may close these issues.

2 participants