Comments (4)
@vmx this is a strange one.
clSetMemObjectDestructorAPPLE
is called by set_mem_object_destructor_apple
which is defined in ext.rs
where it is preceded by #[inline]
. I had similar link issues during development which was fixed for me by preceding set_mem_object_destructor_apple
with #[inline]
.
Please can you check your build options? Is there a way that #[inline]
is being ignored.
I could add a feature like cl_khr_icd
to guard set_mem_object_destructor_apple
. clSetMemObjectDestructorAPPLE
is not guarded in the OpenCL header file, however, it is obviously an Apple specific feature, so it would make sense.
from cl3.
That was an interesting one. I would say the CI instance did the right thing, the other systems didn't.
The difference is that on CI the link-dead-code
option was set. This leads to no dead code elimination. By default the current code links to the clSetMemObjectDestructorAPPLE
synbol, which isn't part of my OpenCL.so
. Neither on the CI instance one, nor on my local one. The reason why it did compile though is, that I never called this function, hence it was removed during compilation.
I can reproduce it reliably locally when running RUSTFLAGS='-C link-dead-code' cargo test
.
My suggested fix would be to put it behind a feature flag, so that it isn't compiled by default. I also think that testing a library with RUSTFLAGS=-C link-dead-code
set makes a lot of sense to catch those problems, which lead to hard to track down bug reports like this one.
from cl3.
Thank you for your investigations Volker. It's good to know that link-dead-code
was responsible.
However, I've followed your advice and added a new build feature: cl_apple_setmemobjectdestructor
to protect it.
This corresponds to the cl_APPLE_SetMemObjectDestructor
macro in cl_ext.h
.
from cl3.
I've tested the latest released version of opencl3
with the default features, this is no longer an issue. Thanks for the quick fix!
from cl3.
Related Issues (20)
- Update for latest OpenCL-Headers HOT 1
- InfoType::to_string shadows the implementation of `Display` HOT 1
- Use From trait for `conversions HOT 1
- Remove `Info` enums to support new OpenCL versions and extensions. HOT 1
- Add UUID and LUID types to InfoType HOT 1
- Don't panic if UUIDs or LUIDs are wrong size HOT 2
- Add external memory, external semaphore, and semaphore provisional extensions HOT 1
- Add provisional command-buffer extension HOT 1
- update headers for cl_intel_unified_shared_memory HOT 1
- Add definitions for cl_arm_protected_memory_allocation HOT 1
- Add cl_intel_mem_alloc_buffer_location property HOT 1
- Empty slice is not null HOT 6
- Base `cl3` on a fork of `cl-sys` as it is no longer actively maintained. HOT 3
- Put deprecation notices behind conditional attributes HOT 1
- Add cl_ext_image_requirements_info extension definition HOT 1
- Declare OpenCL release_* and retain_* functions unsafe HOT 1
- Declare OpenCL functions that can lead to undefined behaviour as unsafe HOT 7
- Add definitions for cl_khr_command_buffer_mutable_dispatch HOT 1
- Update with new functions in OpenCL-Headers repo HOT 1
- Define function types for prototype declaration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cl3.