Giter VIP home page Giter VIP logo

Comments (9)

bashbaug avatar bashbaug commented on August 22, 2024 1

Great, I'll add a few tests and create a PR in the next day or so.

from opencl-clhpp.

pkeir avatar pkeir commented on August 22, 2024

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.

jrprice avatar jrprice commented on August 22, 2024

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.

bashbaug avatar bashbaug commented on August 22, 2024

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.

pkeir avatar pkeir commented on August 22, 2024

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 and getDeviceAndHostTimer;
  • The definition of basic OpenCL types such as cl_int in cl_platform.h on Linux uses __attribute__ syntax, which leads to warnings whenever they're used as template arguments;
  • CL_TARGET_OPENCL_VERSION is defined in cl2.hpp, though it isn't in the Ubuntu opencl-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.

kpet avatar kpet commented on August 22, 2024

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 avatar bashbaug commented on August 22, 2024

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

bashbaug avatar bashbaug commented on August 22, 2024

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.

kpet avatar kpet commented on August 22, 2024

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.