Skip to content

Defining CL_TARGET_OPENCL_VERSION #10

@coatless

Description

@coatless

As I am preparing a PR, what shall we do about the

-PKG_CPPFLAGS = -I../inst/include
+PKG_CPPFLAGS = -I../inst/include -DCL_TARGET_OPENCL_VERSION=300

which I need to not have OpenCL nag all the time. Any other systems / OSs have that?

Originally posted by @eddelbuettel in #6

See also https://gitlab.com/bandicoot-lib/bandicoot-code/-/issues/1 , it has been an outstanding issue for a very long time and I don't have a great solution for it. The situation is this:

  1. OpenCL warns if CL_TARGET_OPENCL_VERSION is not set when it is included;
  2. OpenCL will also warn if a CL_TARGET_OPENCL_VERSION is set that is newer than whatever the OpenCL distribution on the system is;
  3. We aren't guaranteed really anything about what OpenCL version a user is using;
  4. Bandicoot does its best to support whatever OpenCL version is available, so it does not set CL_TARGET_OPENCL_VERSION (which will restrict functionality to whatever that version is);

and OpenCL appears to provide no way to disable the warning or set some macro such that whatever the OpenCL header version is is what is used.

If from the R side you are able to say "we will always have OpenCL 3.0+" then you can just define it as you suggested above and be good with it, but I can't really do that upstream.

Originally posted by @rcurtin in #6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions