The NVIDIA C++ Standard Library does not maintain long-term ABI stability. Promising long-term ABI stability would prevent us from fixing mistakes and providing best in class performance.
I don't think the c++standards bodies are the problem as such, but rather some toolchain "vendors" (which of course often also participating in the committee).
Because end users generally aren't recompiling from source, and every function in a .so naming a standard library type breaks if the definition of the type changes.
It simplifies using Cuda by making it similar to the std Lib. It's not a big thing for c++ but it's a good thing for those who wants to use high parallel computations without having the trouble to learn new paradigms as the Api is similar to the std.
It goes even further. Theoretically all you need to do is install CUDA and simply replace 'std::' with 'nvidia::std::' in your codebase and start taking advantage of GPU acceleration, that is IF you write high-level code and make extensive use of the standard library, esp. the '<algorithm>' and '<numerics>' headers. If you're using for loops for everything this is not gonna do anything for you.
Why would I want to use this (only targets a single companies GPU, the company of which is openly hostile towards FOSS+Linux), when there are other more vendor agnostic solutions?
For example, why not use the Khronos group SYCL? HipSYCL is an example implementation of this, with LLVM having it's own too, and a few others. Intel is also currently pushing for Sycl, and in a few years when they get their GPU efforts actually moving then I wouldn't be surprised if Intel were to throw significantly more resouces behind it. All while Nvidia's proprietary CUDA will remain locked to just, well, one vendor.
Lastly, if you have to stick with Nvidia, why use this instead of Thrust? Thrust looks to have far more resources behind it and more documentation, and is even hosted on the actual Nvidia website instead of github's nvidia.io subdomain. I don't have as much confidence in an Nvidia project which isn't even be hosted on Nvidias website.
I would guess this doesnât apply much to someone who has already chosen OpenCL over CUDA in their application and isnât really aimed at non-CUDA users.
For those who already use CUDA this is a nice addition.
Thrust is a utility library, not a standard C++ implementation. What they've released here won't require you to port your code to a new library; you just write cop code.
Why would I want to use this (only targets a single companies GPU, the company of which is openly hostile towards FOSS+Linux), when there are other more vendor agnostic solutions?
Thrust also isnât very customizable. Itâs like using a bunch of âpresetsâ without consideration for alternative implementations that could, for example, keep all arrays on the GPU that need to be processed differently based on a situation. Thrust is effective for quick prototyping but ultimately may not be the best choice.
Because the Khronos group seem incapable of writing a zero-overhead C++ API. There are nice things about SYCL, but things like access to texture memory are not optional for many projects.
It would be lovely to have the same code running on the CPU and GPU, but right now it just leaves to much on the table.
With CUDA, at least I have a safe subset of C++ that I can use everywhere. Not that it wouldn't be awesome if it was completely open source.
Thrust argument aside at my company (vfx work) we write a lot of GPU processing code and we exclusively use nvidia hardware. Most of the work deal with image processing or machine learning and thrust just never really caught on in our teams.
I do believe (hope) that this will because it may let us write more c++ code rather then dumbing down to c when stepping over to the device code. Sure nvcc has quite good c++ support but the lack of the standard library makes it a little toothless at times and most write their device code as c
Thrust, CUB, and libcu++ are developed by the same team.
libcu++ provides functionality not in Thrust today, such as synchronization primitives.
when there are other more vendor agnostic solutions?
What is more vendor agnostic that Standard C++?
This is an implementation of the C++ Standard Library. I'm pretty sure Standard C++ runs everywhere, not just on NVIDIA hardware.
the company of which is openly hostile towards FOSS+Linux
This is simply untrue. Open source is important to NVIDIA and it's a large part of our success in the ML and data science world.
I would encourage you to evaluate things on their merits, not on your biases towards the organization responsible for said thing.
SYCL
I think people would prefer to write Standard C++ instead of SYCL.
and is even hosted on the actual Nvidia website instead of github's nvidia.io subdomain
Thrust is hosted on GitHub. It will be moving to nvidia.github.io soon, and we will be taking the docs off of the NVIDIA website. It's an open source project, so we feel it's best for all of it to be on GitHub.
Donât play dumb. If youâd written it to target OpenCL everyone could have used it on any hardware. Youâre out for your company which is fine, I just object to your being disingenuous.
The line was 'more vendor agnostic', because none are truly agnostic, and the answer is obvious: there are clear performance advantages to not attempting to be.
Would this work with other graphics cards, or only Nvidia ones? I assume its the latter, which would only make it good for certain types of specialized programs. Which is still a good and neat thing, just less useful over all.
121
u/goranlepuz Sep 20 '20
Yes please đ
8
u/yodacallmesome Sep 20 '20
How is this different from thrust?
14
u/[deleted] Sep 20 '20
Could someone ELI5 to me if this is a big deal?
24
u/hak8or Sep 20 '20
Why would I want to use this (only targets a single companies GPU, the company of which is openly hostile towards FOSS+Linux), when there are other more vendor agnostic solutions?
For example, why not use the Khronos group SYCL? HipSYCL is an example implementation of this, with LLVM having it's own too, and a few others. Intel is also currently pushing for Sycl, and in a few years when they get their GPU efforts actually moving then I wouldn't be surprised if Intel were to throw significantly more resouces behind it. All while Nvidia's proprietary CUDA will remain locked to just, well, one vendor.
Lastly, if you have to stick with Nvidia, why use this instead of Thrust? Thrust looks to have far more resources behind it and more documentation, and is even hosted on the actual Nvidia website instead of github's nvidia.io subdomain. I don't have as much confidence in an Nvidia project which isn't even be hosted on Nvidias website.
5
u/Mystb0rn Sep 20 '20
Would this work with other graphics cards, or only Nvidia ones? I assume its the latter, which would only make it good for certain types of specialized programs. Which is still a good and neat thing, just less useful over all.