About OpenCl solver

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: About OpenCl solver

Postby JoeJ » Sun Jul 11, 2021 2:55 am

https://stackoverflow.com/questions/63449408/understanding-oneapi-and-sycl-in-amd-gpu
Interesting answer here with links. Maybe not up to date.
First impression: SYCL implementations tend to build upon HIP on AMD, so Linux only. Others build upon OpenCL2.2, so no Nvidia.
Does not look that good, but surely requires some more research / trial and error, to finally confirm expected disappointment as usual... :roll:
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: About OpenCl solver

Postby Julio Jerez » Sun Jul 11, 2021 7:27 am

Yes amp is out of the question.
I started working on it in vs 2012, 2013 and 2015. Until not longer even compiles with later version of vs.

What I see is that this SYCL as general concept, is what I have been waiting for a very long time, and for what I can see is like a standardization of AMP.
Not sure why they did not just adopted AMP, but here we are with another blooded standard in name only.

What interested me was that it seems that starting with visual studio 2019, Microsoft supports it under the name computeCPP.
I have not tried yet, but saw some videos, and seems a very complex and convoluted series of steps to get it set.

The point I make is that for this to work on cpp, it requires compiler support. So it is not as simple as integrating an sdk, so I think vs2019 supported it because they support other compiler back end like clang and intel, not gcc so far.

Anyway, I will keep reading more, see if is possible, but you are right, I am not keeping my hopes high.

It is such a shame that high performance computing is in such a shambles for more than a decade with not clear solution in the foreseeable future.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: About OpenCl solver

Postby JoeJ » Sun Jul 11, 2021 11:17 am

Well, there's also parallel computing coming to C++ itself. Maybe the C++24 standard, did not follow.
Feels distant, but maybe closer then anything else.

So far it seems all our options are practicable only for enterprise.
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: About OpenCl solver

Postby Julio Jerez » Mon Jul 12, 2021 11:15 am

Hey Joe, it seems this computeCPP SYCL is a done deal for few years now.
https://developer.codeplay.com/products ... ng-started.

I was wrong in thinking it was a Microsoft thing, it seems it is by a company named Codeplay.
What is new for VS 2019 is that it is part of the install process from the installer, basically better integration and support.

But they say it should work even with vs 2015.
The minimum requirement is C++ 11.

That's the requirement fro newton 4.
I was hesitant to go and try and them get burned one more time, but this seem to have some support.

I am going to experiment and see how viable it is.

The open cl stuff, is possible but after going trough all the problems with setup, and vendor support, we still has the problem of the verbosity.
I am at a point where I do not want to spend any time wrestled with sdk and molding code to satisfy specifications.
After I just got few open cl kernel going, and not seeing it for a few weeks, it is absolutely horrifying.
I look at it and I do not understand it, and it is my own code.
If this computeCPP is viable, I will ditch opencl.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: About OpenCl solver

Postby JoeJ » Tue Jul 13, 2021 4:51 pm

Julio Jerez wrote:After I just got few open cl kernel going, and not seeing it for a few weeks, it is absolutely horrifying.
I look at it and I do not understand it, and it is my own code.

Sounds familiar.
Often i have to look at my C++ implementation, which helps with understanding the compute shaders which i have ported from that.
I need to maintain both versions to keep these references, or can do some debugging, etc.
If i add or change things, i do so on the C++ side first, then port to CS.

I could not develop something of serious complexity just by using CS. Too low level, too cumbersome.
This, although i'm at heart still mostly a C programmer. Did adopt some modern C++ practices only in recent years.
I would hope things like SYCL or CUDA do better here. Compute Shader is ok if performance really has priority over anything, but for every day work? No thanks.

Still, it might be the only practical option. After accepting the discomfort and getting used to it, the performance we get is rewarding and compensates the losses.
It's just that increasing core count on CPU makes the burden harder to justify.

With ComputeCpp i'm worried AMD GPUs might not work with it:
Platform Requirements
Windows 7 or Windows 10 (with elevated privileges)

OpenCL Drivers
OpenCL driver that supports SPIR
There is experimental support for SPIR-V OpenCL drivers (your hardware vendor may be able to provide support information)

AFAIK, AMD GPU OpenCL dirvers dropped SPIR support and SPIR-V was never added.
Vulkan of course supports SPIR-V, but this my not help.

But not sure. Maybe there is luck.
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: About OpenCl solver

Postby JoeJ » Wed Jul 14, 2021 2:21 am

Maybe i got this wrong, meaning nay OpenCL driver works, but if available, Spir-V could be used on top of that.
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: About OpenCl solver

Postby Julio Jerez » Sun Oct 03, 2021 2:00 pm

hey guys it seem some is new now.
https://developer.codeplay.com/products ... e/download

this is SYCL they claim it integrate with visual studio.

this is what I have been asking for almost 15 years, because high performance computing but using C++ and the compile manage all the monbo jumbo.

they claim vs2015 is available seems 2017, but I I do not beleive them, each time I check it was all linux and quite hard to set it up.
now I see there is a sdk to download, I have to try yet but I will see if it usable.

I do no put my hope high since I have been burn so many time with pie on the sky claims that never really work for the common user.

this is what Microsoft did in 2010 with AMP but but more improved,
not sure why Microsoft refused to support it native with their compiler. afte all they supports
open mp but not open mp for GPU.
anyway, whatever reason they have, more power to them, I will try this SYCL and see if it can use it.

edit:
these is are the thing that infuriate me, they say VS 2015,
the install say minimum VS2019, but I still play alone
It's only supported for VS2019
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: About OpenCl solver

Postby Julio Jerez » Sun Oct 03, 2021 4:29 pm

Oh wow,
I just updated vs2019 and installed computeCpp
As I expected not as eassy as they claimed and I do not see any easy tutorial, so I another spending time on that.

But the good knew and a huge surprise is that there is native support for intel DCP++
This could be really awesome.
So I am going to experiment a little.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: About OpenCl solver

Postby KKlouzal » Thu Dec 09, 2021 9:19 pm

Glad to see NVIDIA supporting OpenCL 3.0:
https://developer.nvidia.com/opencl

AMD...Not so much sadly.. Looks like 2.1 is the best you get with that vendor.
My Radeon 7 GPU supports 2.1 and its fairly recent

Hopefully AMD gets on board and goes with the latest OpenCL specification.

Not sure what Intel supports. Would be nice to run the physics engine on the IGPU and have my graphics engine running on the DGPU.
User avatar
KKlouzal
 
Posts: 16
Joined: Tue Jan 23, 2018 11:59 am

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 38 guests