News for hackers. Stuff that matters.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by nologic01 on Tuesday October 03, 2023 @06:45PM (#37758614)
I would'nt touch nvidia "goodies" with a barge pole. Perfectly good 5-year GPU deprecated upon upgrade to ubuntu 22.04 because of cuda/drivers. The lock-in trap of the century.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by Foobar8568 on Tuesday October 03, 2023 @07:48PM (#37759096)
>Please use CUDA 11.4

Which should be compatible with any Kepler late architecture, as in 6xx models from 10years ago+?

Re:MatX: Efficient C++17 GPU numerical computing library wit... by cburdick13 on Tuesday October 03, 2023 @08:04PM (#37759232)
That's right, we've tested down to pascal, but this should work on Kepler too since CUDA and the underlying libraries support it.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by downrightmike on Tuesday October 03, 2023 @08:53PM (#37759605)
I have a spare Titan Z that could be useful if so.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by choppaface on Wednesday October 04, 2023 @01:18AM (#37761092)
Will you publish benchmarks for e.g. K80? Or provide a way for users to contribute? It's really handy to know, e.g. comparable to what is Resnet50 inference on a bunch of architectures.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by cburdick13 on Wednesday October 04, 2023 @01:25AM (#37761126)
Hi, what specifically are you looking to benchmark on the K80? Users are free to contribute and we've had many external PRs.

Contribution guide is here: https://github.com/NVIDIA/MatX/blob/main/CONTRIBUTING.md

Re:MatX: Efficient C++17 GPU numerical computing library wit... by choppaface on Wednesday October 04, 2023 @02:45AM (#37761670)
well the root README.md has some "benchmarks" at the very top. maybe there's no existing benchmarks doc with more details? or even a repo of what's in the README? it's like if numpy is 5 sec on CPU, but a K80 is only 100ms, then the K80 cost might be worth not going for the A100 at 3ms. Similar argument for jetson.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by cburdick13 on Wednesday October 04, 2023 @09:21AM (#37764728)
We have benchmarks in the benchmarks directory, but these are for things like convolution, matrix multiples, etc. It's not for running a traditional benchmark set like resnet.

Like most benchmarks it really depends on what you want to do, and since it's a general library everyone might care about different things.

Re:MatX: Efficient C++17 GPU numerical computing library wit... by choppaface on Wednesday October 04, 2023 @03:44PM (#37770576)
I saw those, yes having the code is great but I’m more interested in the actual numbers. E.g. what does this sample do on A100, P100, T4, K80, Jetson nano? The analog is things like Resnet50 get tested and reported and then you know if Resnet50 might work for your budget / hardware.

Versus the advert in the root Readme, which is impressive but gives no data on the pareto.

Re:MatX: Efficient C++17 GPU numerical computing library wit... by cburdick13 on Thursday October 05, 2023 @01:54PM (#37781739)
Hi, if you don't mind opening an issue asking for this we can run these and put in the readme.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by dheera on Tuesday October 03, 2023 @11:40PM (#37760587)
The real issue is having to keep multiple copies of CUDA on a system to satisfy all the different moving parts that each want different CUDA versions and CUDNN versions, and those different CUDA installers fight over and uninstall each others' nvidia driver versions because CUDA is shipped with the nvidia driver, bundled and listed as an apt dependency.

PyTorch did it right, it now ships with its own CUDA and doesn't take a shit about version what you have in /usr/local. Everything else should do the same.

Re:MatX: Efficient C++17 GPU numerical computing library wit... by kristjansson on Tuesday October 03, 2023 @11:56PM (#37760691)
Don’t install the drivers with CUDA? Don’t rely on distro-packaged CUDA?
Re:MatX: Efficient C++17 GPU numerical computing library wit... by dheera on Wednesday October 04, 2023 @12:34AM (#37760894)
NVIDIA's official CUDA is packaged with their damn driver.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by cburdick13 on Wednesday October 04, 2023 @12:58AM (#37761011)
Hi, you can choose not to install the driver with a CUDA install, and to download the driver separately.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by dheera on Wednesday October 04, 2023 @01:13AM (#37761070)
Only if you use the runfile, but that breaks yet other packages that specify 'cuda' as an apt dependency.

Your 'cuda' packages should use '>=' not '=='

e.g. 'cuda-12' should depend on nvidia>=525 NOT nvidia==525

Re:MatX: Efficient C++17 GPU numerical computing library wit... by cburdick13 on Wednesday October 04, 2023 @01:27AM (#37761131)
That's a fair point. I'll look into it.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by cburdick13 on Wednesday October 04, 2023 @12:20PM (#37767409)
Hi, I looked into this and it seems that it is indeed using >=

Depends: cuda-libraries-11-8 (>= 11.8.0), cuda-drivers (>= 520.61.05)

Re:MatX: Efficient C++17 GPU numerical computing library wit... by dheera on Wednesday October 04, 2023 @12:53PM (#37768026)
Hm no, what you actually have is cuda-libraries-11-8 depends on cuda-drivers and cuda-drivers depends on cuda-drivers-520 = 520.61.05-1 where you have the version number repeated in the name. That is a really bad pattern for things intended to be backward compatible, as multiple installs of cuda will overwrite "cuda-drivers" and each is pegged to a certain "cuda-drivers-X" where X is part of the name. This results in some really weird dependency hells if you try to install more than 1 CUDA version at the same time depending on the order you install them.

    $ sudo apt show cuda-drivers
    Package: cuda-drivers
    Version: 520.61.05-1
    Priority: optional
    Section: multiverse/devel
    Maintainer: cudatools <[email protected]>
    Installed-Size: 7,168 B
    Depends: cuda-drivers-520 (= 520.61.05-1)
Re:MatX: Efficient C++17 GPU numerical computing library wit... by the_svd_doctor on Wednesday October 04, 2023 @12:27AM (#37760845)
The solution is to install the latest CUDA driver (which is always 100% backward compatible) but have multiple version of the libraries in /usr/local. Granted it can get messy with various package manager doing their own things.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by dheera on Wednesday October 04, 2023 @12:38AM (#37760921)
Usually the CUDA versions end up uninstalling other CUDA versions and drivers due to package manager issues.

I wish nvidia would just release a `sudo apt install cuda-all` that just keeps you updated with ALL possible cuda versions simultaneously. I know it would be 20GB but that's fine, it's a drop in the bucket compared to the datasets I play with.

Re:MatX: Efficient C++17 GPU numerical computing library wit... by cburdick13 on Wednesday October 04, 2023 @01:03AM (#37761029)
If you use the run files rather than the package manager files it's always installed in completely separate folders inside /use/local/cuda.

What you're describing with an "all" install can somewhat be accomplished with containers right now and none of the dependency problems.

Re:MatX: Efficient C++17 GPU numerical computing library wit... by dheera on Wednesday October 04, 2023 @01:09AM (#37761053)
But containers, X forwarding, visualization, and OpenGL is a complete shitshow. I have apps that work outside of a container but freeze the UI that the mouse pointer won't even work when run from within a container.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by touisteur on Thursday October 05, 2023 @10:58AM (#37779447)
+1 for runfiles but beware of the multi-gigabyte installer + installed footprint. Not complaining per-se, just plan for it.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by dheera on Thursday October 05, 2023 @05:57PM (#37784800)
Problem with runfiles is I've run into other .deb packages that I'd like to use that are marked as dependent on 'cuda'.

Using a runfile is ditching the package manager on a package-managed system, instead of using the package manager correctly.

Re:MatX: Efficient C++17 GPU numerical computing library wit... by adev_ on Wednesday October 04, 2023 @02:57AM (#37761745)
> PyTorch did it right, it now ships with its own CUDA and doesn't take a shit about version what you have in /usr/local

Is that even legal ?

Up to my understanding Cuda is covered by an EULA license that explicitly require end user agreement.

Re:MatX: Efficient C++17 GPU numerical computing library wit... by dheera on Wednesday October 04, 2023 @04:30AM (#37762441)
"Meh" who cares. It works.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by adev_ on Wednesday October 04, 2023 @03:00AM (#37761771)
> now ships with its own CUDA and doesn't take a shit about version

Bundling system dependency in python software is always a giant shit show. I would not name that "Everything should do the same"

Any other python library (randomly cuPy) that also ship its own Cuda, with its own different version, will segfault happily because you have duplicated symbols in a single process.

Re:MatX: Efficient C++17 GPU numerical computing library wit... by dheera on Wednesday October 04, 2023 @01:25PM (#37768568)
So randomize the symbols with appeneded UUIDs
Re:MatX: Efficient C++17 GPU numerical computing library wit... by adev_ on Wednesday October 04, 2023 @08:33PM (#37773521)
What you just quote is what the GNU glibc is doing with symbol versioning which is an other example of giant shit show and an ABI nightmare.

And:

(1) It is a solution only Nvidia can provide: Cuda is a binary. And they will certainly not do that just to please the python community.

(2) That just create an other set of problems just because python packaging sucks in the first place.

Lets just solve the initial problem, shall we ?

Re:MatX: Efficient C++17 GPU numerical computing library wit... by smoldesu on Tuesday October 03, 2023 @08:09PM (#37759286)
Are you talking about for desktop/GUI use? A lot of older Nvidia hardware has been implicitly depreciated for years. Without newer patches to help Wayland support, your options are either to use nouveau or stick with unsupported software and official drivers. It's ugly, but Microsoft and Apple pretty much depreciate hardware the same way; first with 'recommended' cutoff points, then hard depreciations. On Linux it's less spelled-out, but things seem to be Wayland-or-bust now.
Re:MatX: Efficient C++17 GPU numerical computing library wit... by reaperman on Tuesday October 03, 2023 @10:21PM (#37760118)
*deprecate or “EOL” (for continuing support). Depreciate is a tax and accounting concept, though often at the end of a MACRS depreciation schedule office equipment is often immediately replaced since it’s no longer contributing to tax write-offs. (Really, just not replaced as long as it continues to contribute to tax deductions)
Re:MatX: Efficient C++17 GPU numerical computing library wit... by cburdick13 on Tuesday October 03, 2023 @10:25PM (#37760141)
It was mentioned elsewhere, but we support down to cuda 11.4, which supports down to the Maxwell architecture (nearly 10 years old now).
Re:MatX: Efficient C++17 GPU numerical computing library wit... by arthurcolle on Tuesday October 03, 2023 @09:47PM (#37759916)
can you downgrade?
Re:MatX: Efficient C++17 GPU numerical computing library wit... by choppaface on Wednesday October 04, 2023 @01:15AM (#37761082)
Surprisingly this repo is BSD licensed so it might even outgrow nvidia. Eigen is pretty strong but this new MatX syntax might catch on, especially with easy GPU integration.