Comments (9)
Great, I'll add a few tests and create a PR in the next day or so.
from opencl-clhpp.
Is there a plan to update the C++ bindings for OpenCL 2.1/2.2? I find that setting CL_HPP_TARGET_OPENCL_VERSION
to 210
or 220
is not permitted. Calling clCreateProgramWithIL
returns cl_program
for example - which starts to draw one into the C API...
from opencl-clhpp.
We have an opencl21
branch with OpenCL 2.1 support, but we've been putting off merging it into master until someone has actually tested it on a real OpenCL 2.1 platform. Are you able to do this and confirm that it works (even for just creating a program from IL for example)?
OpenCL 2.2 will be the same - someone will need to have an OpenCL 2.2 platform that we can test the required changes on.
from opencl-clhpp.
Are you able to do this and confirm that it works (even for just creating a program from IL for example)?
I just confirmed that I was able to create a program from IL and build it using the headers in the openc21
branch on the Intel OpenCL 2.1 implementation. I think these changes can be safely merged.
Regarding OpenCL 2.2, can we use something like the Intercept Layer and/or the ICD loader stub to check that the C++ bindings nominally work even before an OpenCL 2.2 platform is released? The only new APIs are in OpenCL 2.2 are clSetProgramReleaseCallback
and clSetProgramSpecializationConstant
and I think we should be able to test these with relatively high confidence using this method. Let me know if this is something you would be interested in trying.
from opencl-clhpp.
It works here too: with Intel OpenCL 2.1 on 64-bit Ubuntu 18.10 using GCC. A few comments:
- Missing return value warnings are issued from
getHostTimer
andgetDeviceAndHostTimer
; - The definition of basic OpenCL types such as
cl_int
incl_platform.h
on Linux uses__attribute__
syntax, which leads to warnings whenever they're used as template arguments; CL_TARGET_OPENCL_VERSION
is defined incl2.hpp
, though it isn't in the Ubuntuopencl-clhpp-headers
package. Just a comment. (This is also the case in the master branch.)
By the way, I'm happy to contribute the example I used; though I'm not sure how you want to manage the dependency on the C++ kernel language compiler. Environment variable? CLCXX
?
from opencl-clhpp.
I think these changes are a good basis to move forward. @pkeir @bashbaug Would one of you volunteer to rebase the branch and open PRs? :)
from opencl-clhpp.
@bashbaug Would one of you volunteer to rebase the branch and open PRs? :)
@jrprice I think it's best if you create the PR, since you've made most of the OpenCL 2.1 changes?
It rebased automatically for me, but if it helps, I've uploaded a rebased opencl21 branch here:
https://github.com/bashbaug/OpenCL-CLHPP/tree/opencl21_rebase
I also added one commit for a missing CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
query. I didn't find anything else missing.
from opencl-clhpp.
I have first draft OpenCL 2.2 changes here:
https://github.com/bashbaug/OpenCL-CLHPP/tree/opencl22
These changes are baselined against the OpenCL 2.1 changes, so they will need to go in first.
I've done minimal testing via a hacked Intercept Layer and things appear to be working, but by no means have I done exhaustive testing.
from opencl-clhpp.
@bashbaug I've had a look at your draft. With a couple of unit tests added, this looks pretty much good to go to me.
from opencl-clhpp.
Related Issues (20)
- enqueueMapBuffer() missing explicit command queue argument HOT 1
- Error when using external cl headers HOT 2
- Please keep releases and tags in sync HOT 4
- Trivial example fails HOT 3
- Add support for cl_command_buffer_khr
- MacOS CI builds are broken
- A curious name collision bug HOT 9
- how to handle extension API function pointers
- Semaphore support breaks compilation with clang HOT 1
- `cl_image_desc desc = {0}` is not valid C++ zero initialization. HOT 2
- Command Buffer Extension API Corner Cases HOT 1
- Naming Inconsistency for Extension Objects HOT 3
- new warning: deleting void is undefined HOT 1
- add a preprocessor enable for provisional extensions or features
- Assessment of the difficulty in porting CPU architecture for OpenCL-CLHPP
- Default values for options BUILD_EXAMPLES and BUILD_DOCS HOT 1
- clCreateCommandQueueWithProperties does not support properties like CL_QUEUE_PRIORITY_KHR CL_QUEUE_THROTTLE_KHR
- No Device-parametrized versions of compile()? HOT 1
- Missing tests for compile overloads. HOT 1
- should we use strings or char pointers to pass string data?
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 opencl-clhpp.