cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

nibal
Challenger

Re: Issues when switching to OpenCL 2.0

Jump to solution

Hi,

"One of our users..." You mean yourself?

BTW yours is not the first issue in our mailing list. I have been longer and have hundreds. Ocl has been around for at least 5 years now

I have good news. I messaged a moderator with subject "OpenCL abandoned?" and she just responded me that she forwarded it to AMD ocl team. I expect to hear an official AMD response shortly;-) I will update this list.

BR,

Nikos

0 Kudos
Reply
pszilard
Adept I

Re: Issues when switching to OpenCL 2.0

Jump to solution

> You mean yourself?

No. As I hinted before (perhaps next time I should be more loud and shouting about it?), I'm dev of the GROMACS molecular simulation package. I was referring to this report: [gmx-users] OpenCL compile error

> I have good news.

Great. Trying to cheer up, but the number of and especially kind of issues I'm running into is borderline disheartening.

Anyway, thanks for the update (offer).

0 Kudos
Reply
nibal
Challenger

Re: Issues when switching to OpenCL 2.0

Jump to solution

> One of our users has just reported the first issue on our mailing list

And there I thought, that "our mailing list" was this list, and you just had your first issue:)

>Great. Trying to cheer up, but the number of and especially kind of issues I'm running into is borderline disheartening.

I can only repeat what Veevee told me. "Just keep posting!"

BR,

Nikos

0 Kudos
Reply
pszilard
Adept I

Re: Issues when switching to OpenCL 2.0

Jump to solution

> I can only repeat what Veevee told me. "Just keep posting!"

Honestly, I'd much more appreciate a proper bugtracker where I know that a report will be looked at by those who can fix it. It feels like a waste of time to mess around on a forum - there aren't even bug report templates.

0 Kudos
Reply
nibal
Challenger

Re: Issues when switching to OpenCL 2.0

Jump to solution

pszilard wrote:

> I can only repeat what Veevee told me. "Just keep posting!"

Honestly, I'd much more appreciate a proper bugtracker where I know that a report will be looked at by those who can fix it. It feels like a waste of time to mess around on a forum - there aren't even bug report templates.

Yeap, me too. But the way it works here, is that an AMD guru has to screen all theses issues, and send only the real bugs to the back office. The rest are solved here in the forum:)

It usually is much faster for the majority of them:)

Nikos

0 Kudos
Reply
pszilard
Adept I

Re: Issues when switching to OpenCL 2.0

Jump to solution

> The preprocessing stage fails and the compiler complains about includes missing; the same code compiled just fine with CL1.2 did.

Having asked/looked around, apparently this is a relatively common and recurring error in several compilers. Not sure what's so hard to get right in handling the "-I" directive, but in any case, I'd very much like to have this fixed, I'm generating code using the preprocessor and I don't see any option to work around the issue.

I know that I could pass multiple files to the compilation to have them "merged", but as I include the same file multiple times, this won't work for sure.

0 Kudos
Reply
rampitec
Staff
Staff

Re: Issues when switching to OpenCL 2.0

Jump to solution

Although OpenCL 1.2 and 2.0 syntax is very similar, there is a big internal difference for the compiler. The differences are both in language semantics and compiler internals. There are at least two big factors, which might affect kernel performance if 2.0 syntax is forced on an 1.2 source:

  1. Unqualified pointer passed to a function treated as generic vs private. That is a good idea to complete declarations of functions so that private pointer arguments are properly marked with __private attribute. That will make source compatible with both 1.2 and 2.0 syntax.
  2. OpenCL 2.0 supports non-uniform workgroups, so expansion of get_local_size() becomes substantially bigger than with 1.2. You can mitigate the impact by setting OpenCL 2.0 specific option -cl-uniform-work-group-size, although it will not remove all issues in the current release and will be improved in the future. Meanwhile you can achieve better results by using kernel attribute reqd_work_group_size if it is known.

Other than that compiler is really different internally for 1.2 and 2.0 now, so there can be differences if performance and behavior in both directions given a specific source.

View solution in original post

pszilard
Adept I

Re: Issues when switching to OpenCL 2.0

Jump to solution

Thanks for the explanation. Not sure what does it mean that this answer is "correct" - is that some sort of peer review? Or is it a way to mark a forum thread something done/closed?

> Unqualified pointer passed to a function treated as generic vs private.

Not the case.

> OpenCL 2.0 supports non-uniform workgroups, so expansion of get_local_size() becomes substantially bigger than with 1.2. You can mitigate the impact by setting OpenCL 2.0 specific option -cl-uniform-work-group-size, although it will not remove all issues in the current release and will be improved in the future.

It does not help.

> Meanwhile you can achieve better results by using kernel attribute reqd_work_group_size if it is known.

It's always set.

I'm honestly *very* concerned about the state of the AMD OpenCL stack. Believe me, I get that it's hard to develop compilers and tools for GPUs and this isn't made easier by having a standard to rely on. However, people have gotten used to continous and reliable improvements brought by software (and hardware up until recently). Your competitors do OK with delivering on that promise and if users can't get at least an assurance that their performance does not fall off of a cliff with a new version of the GPU compiler, they may just have one more good reason to not bother with AMD GPUs and OpenCL.

0 Kudos
Reply
rampitec
Staff
Staff

Re: Issues when switching to OpenCL 2.0

Jump to solution

This is the generic answer to a generic question. I'm sorry it did not help you. If you wish and do not mind sharing compilation dumps I could try to understand what was the reason for performance difference in your case.

0 Kudos
Reply
pszilard
Adept I

Re: Issues when switching to OpenCL 2.0

Jump to solution

Thanks for getting back and sorry for the delayed reply. I would be interested, but I'm rather busy ATM. What exactly would it mean "sharing compilation dumps"?

Note that the code I work on is an OSS large scientific code, available here: Downloads - Gromacs

0 Kudos
Reply