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

Add generic support for OpenCL #251

Closed
grahamreeds opened this issue Apr 5, 2019 · 6 comments
Closed

Add generic support for OpenCL #251

grahamreeds opened this issue Apr 5, 2019 · 6 comments

Comments

@grahamreeds
Copy link

If Apple does jump ship to Arm then AMD won't be the only OpenCL fruit.

The Raspberry Pi seems to be moving towards an implementation of OpenCL (https://github.com/doe300/VC4CL).

I have looked at porting it across: For 2.8.3 I got it compiling cleanly on a RaspPi but the AMD specifics were a drag. I have tried again with 2.14.1 but there is a large change to the number of parameters that various functions take. I fixed the number of parameters (but not the internals) but ran into linker issues a couple of nights back.

@Spudz76
Copy link

Spudz76 commented Apr 22, 2019

Put energy into Vulkan since OpenCL is defunct? Khronos says so themselves?

@grahamreeds
Copy link
Author

grahamreeds commented Apr 23, 2019 via email

@Spudz76
Copy link

Spudz76 commented Jun 27, 2019

Of course I can't find the original Khronos document (on LunarG site) regarding how Vulkan Compute was about to pwn-all-everythings. I suppose since OpenCL is also a Khronos endeavor, themselves saying Vulkan Compute Owns The World made me assume that includes (especially?) OpenCL, because both things are going to talk SPIR-V (OpenCL 2.1) so really then OpenCL is just the enqueue conveyor, and at doing that it kind of sucks. It made it seem like OpenCL 2.1 would be a wrapper around the real guts, Vulkan Compute (which was the first thing I heard of using SPIR-V). It was about a week before Apple announced they were dropping OpenCL support in upcoming OSX, and about years after nvidia stopped bothering to improve their OpenCL support (which remains slower and clunkier by far than CUDA).

This seems to sum it up more or less, but I wish I could find the original FAQ entry or press release because it definitely said OpenCL should die off and be replaced by Vulkan Compute. Perhaps LunarG tempered the "replacement" statement since then as now it seems they added on "if your application uses OpenCL for graphical output" but I don't think that means never use it for compute if you aren't using the output for graphics. It appears to have better repetitive-work queue supports like CommandBuffers and does fewer PCIe transfers when used properly. However as of now it might be missing some precision in how it does some operations as they are focused on "close enough for visual display" and not on "exact to the millionths" so it may not work for mining kernels (yet!) but should be the preferred method for shoveling work to a GPU as it is only for GPU work.

OpenCL is for nerd goober science analysis, and AI and computer vision, and tons of things, but it's not really best for mining on GPUs, and has never been better than native miners on CPUs, so then why use a generic compute-API when we really want to compute on GPUs or not at all. OpenCL was used for mining because it was available at the time, it is by far not the best method it was just the only method.

Now we have a split because OpenCL-on-nvidia sucks and is still 1.2 and even when everyone else was still 1.2 also, it was still slower, so any nvidia miners have to be CUDA or not bother. AMD went ahead with 2.0 and beyond, but also added their own nonstandard extensions, and so if you want an AMD miner it's got to be OpenCL 2.0+amd or not bother.
But Vulkan really seems to have the support of both so it sure seems like the unified place to go forward.

@Spudz76
Copy link

Spudz76 commented Jun 27, 2019

Also this, which is a year old so I figured RPi would have it too by now.

@grahamreeds
Copy link
Author

grahamreeds commented Jun 27, 2019 via email

@xmrig
Copy link
Owner

xmrig commented Sep 15, 2019

@xmrig xmrig closed this as completed Sep 15, 2019
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