News for hackers. Stuff that matters.
Re:Intel CEO: 'The entire industry is motivated to eliminate... by bragr on Thursday December 14, 2023 @02:16PM (#38645866)
People don't seem particularly motivated to move away from CUDA to me. I've been poking around various models and tooling over the last couple months, and they pretty much all have something like

  device = "cuda" if torch.cuda.is_available() else "cpu"
and I've yet to see a single one implement the AMD NN middleware: https://www.amd.com/en/developer/zendnn.html
Re:Intel CEO: 'The entire industry is motivated to eliminate... by kaelinl on Thursday December 14, 2023 @03:26PM (#38646776)
I haven't used it personally, but my understanding is that AMD/ROCm-accelerated backends for PyTorch overload the "cuda" device and module so that ROCm shows up as CUDA for feature testing. They want to make a transition seamless, and lots of existing code checks for CUDA, so they do what's necessary to make that existing code run.
Re:Intel CEO: 'The entire industry is motivated to eliminate... by bragr on Thursday December 14, 2023 @03:47PM (#38647020)
Which tools actually pull down those packages though? If anything that's a counter point to the Intel CEO: industry is adopting CUDA as the defacto standard.
Re:Intel CEO: 'The entire industry is motivated to eliminate... by mappu on Friday December 15, 2023 @12:17AM (#38651245)
That seems to be the case for me out-of-the-box.

    $ python3 -m venv .
    $ ./bin/pip3 install torch --index-url https://download.pytorch.org/whl/rocm5.6
    $ ./bin/python3 -c 'import torch; print([torch.cuda.is_available(), torch.cuda.get_device_name(0)])'
    [True, 'AMD Radeon RX 6600 XT']
Re:Intel CEO: 'The entire industry is motivated to eliminate... by latchkey on Thursday December 14, 2023 @03:22PM (#38646733)
You didn't watch the announcement on the MI300x. You don't have to change that line to use AMD.
Re:Intel CEO: 'The entire industry is motivated to eliminate... by PeterisP on Thursday December 14, 2023 @02:28PM (#38646044)
This is a bit of a chicken and egg problem, because the developers of these projects probably don't even have relevant AMD devices to test that, because why would they?

The only reasonable way to break the cycle would be proactive intervention by AMD to contribute code and testing and easy "works out of the box" installation to all the major popular projects to add AMD support so they can sell more their hardware later, but I'm not seeing AMD doing that.

Re:Intel CEO: 'The entire industry is motivated to eliminate... by mschuetz on Thursday December 14, 2023 @03:23PM (#38646756)
CUDA is just way to good in terms of UX with nothing platform-independent coming close to it. I wish there was a competitor, but there simply isn't.

I wish AMD&Intel would extend compute shaders with pointers&pointer casting, arbitrary large buffers instead of just 4GB, device-wide sync, and function pointers. Those are kinda my must-have functionality. Even better, just use C++ for compute shaders.

Re:Intel CEO: 'The entire industry is motivated to eliminate... by JonChesterfield on Thursday December 14, 2023 @05:42PM (#38648402)
Freestanding C++ can be compiled to amdgpu or nvptx using clang. There are rough edges but it's usable.
Re:Intel CEO: 'The entire industry is motivated to eliminate... by lainga on Thursday December 14, 2023 @03:07PM (#38646564)
Maybe the AMD device will just have to announce it's (KHTML, like Gecko).
Re:Intel CEO: 'The entire industry is motivated to eliminate... by JonChesterfield on Thursday December 14, 2023 @05:41PM (#38648387)
Like the pytorch one? Or the onnx? Or Triton? There's loads of these machine learning things, each of which built their thing assuming Nvidia, to which AMD is stoically working to implement support for their hardware. It's a task of unbounded scope with unclear return on investment and they're doing it anyway.
Re:Intel CEO: 'The entire industry is motivated to eliminate... by muxr on Friday December 15, 2023 @07:28AM (#38653473)
zendnn is for CPUs. Pytorch ROCm version doesn't require you to change a single line of code. So all the same semantics like `device = "cuda"` work the same when using AMD GPUs.