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 version identification is incorrect #274

Open
norablackcat opened this issue Jun 20, 2023 · 4 comments
Open

OpenCL version identification is incorrect #274

norablackcat opened this issue Jun 20, 2023 · 4 comments

Comments

@norablackcat
Copy link
Contributor

norablackcat commented Jun 20, 2023

Currently the way the version seems to be tested is if every feature supported for the OpenCL version is listed, however, OpenCL has many optional features that are not required to report that version. It also gets a little weird with OpenCL 3 because OpenCL 2 is actually entirely optional for OpenCL 3.

Here is how I propose to fix the issue:

  • Remove any strings with "optional" from the version checking.

    1. check OpenCL support up to version 2
    2. skip to version 3 and check req features, if supported report version 3
    3. if not version 3 start checking 2.x as usual

It may be easier to just hardcode, but I'll look into fixing it eventually.

@norablackcat norablackcat changed the title OpenCL version identification is incorrect. OpenCL version identification is incorrect Jun 20, 2023
@MightyCreak
Copy link
Owner

Khronos needs to get their shit together regarding API versionning. It's such a mess 😕

@zboszor
Copy link
Contributor

zboszor commented Aug 5, 2023

Khronos needs to get their shit together regarding API versionning. It's such a mess confused

They did, with version 3. That doesn't fix historical mistakes. Mesamatrix should take this into account.

FYI, Nvidia didn't support OpenCL 2.x because their hardware didn't support OpenCL 2.x features which were mandatory. When 3.0 made a lot of 2.x features optional, that's when Nvidia started supporting it.

@MightyCreak
Copy link
Owner

Just to be sure, is it the same for Clover and Rusticl?


@norablackcat not sure I understand your logic here:

  1. check OpenCL support up to version 2
  2. skip to version 3 and check req features, if supported report version
  3. if not version 3 start checking 2.x as usual

Shoudn't it be:

  1. if version 3 is supported, report version 3;
  2. otherwise, check from version 1.0 to 2.x and report the latest version supported

Or is there another subtlety?

@MightyCreak
Copy link
Owner

Also, OpenCL 3 seems to also have an optional extension, which is not handled by Mesamatrix yet (i.e. an extension is done or not, but can't be optional right now). So right now, from the Mesamatrix perspective, Clover OpenCL 3.0 will never be supported as long as "Optional device capabilities queries" is not done. That being said, other mandatory extensions in Clover OpenCL 3.0 are not implemented yet, so for now the fact that the optional extension is not done is not really an issue.

As for Rusticl, we're in luck because the extension "Optional device capabilities queries" is done for all the drivers, so right now that would make iris the only driver compatible with OpenCL 3.0 (Rusticl). Did I understand well?

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

No branches or pull requests

3 participants