4 ms·
AMD GPU Debugger
- snarfy 11mo agoIs there not an official tool from AMD?
- c2h5oh 11mo agoGDB supports it https://sourceware.org/gdb/current/onlinedocs/gdb.html/AMD-GPU.html https://sourceware.org/gdb/current/onlinedocs/gdb.html/AMD-G... You also get UMR from AMD https://gitlab.freedesktop.org/tomstdenis/umr https://gitlab.freedesktop.org/tomstdenis/umr There is also a bunch of other tools provided: https://gpuopen.com/radeon-gpu-detective/ https://gpuopen.com/radeon-gpu-detective/ https://gpuopen.com/news/introducing-radeon-developer-tool-suite/ https://gpuopen.com/news/introducing-radeon-developer-tool-s...
- slavik81 11mo agoIt's worth noting that upstream gdb (and clang) are somewhat limited in GPU debugging support because they only use (and emit) standardized DWARF debug information. The DWARF standard will need updates before gdb and clang can reach parity with the AMD forks, rocgdb and amdclang, in terms of debugging support. It's nothing fundamental, but the AMD forks use experimental DWARF features and the upstream projects do not. It's a little out of date now, but Lance Six had a presentation about the state of AMD GPU debugging in upstream gdb at FOSDEM 2024. https://archive.fosdem.org/2024/events/attachments/fosdem-2024-2392-rocgdb-gdb-and-amdgpu-debugging/slides/22366/FOSDEM-2024-rocgdb_v3_20240126_fXVNPiy.pdf https://archive.fosdem.org/2024/events/attachments/fosdem-20...
- core-explorer 11mo agoThe extensions were voted into the upcoming DWARF 6 standard, e.g.https://dwarfstd.org/issues/211206.1.html https://dwarfstd.org/issues/211206.1.html
- thegeeko 11mo agoamd gdb is an actual debugger but it only works with applications that emit dwarf and use the amdkfd KMD aka it doesn't work with graphics .. all of the rest are not a actual debuggers .. UMR does support wave stepping but it doesn't try to be a shader debugger rather a tool for drivers developers and the AMD tools doesn't have any debugging capabilities.
- almostgotcaught 11mo ago> After searching for solutions, I came across rocgdb, a debugger for AMD’s ROCm environment. It's like the 3rd sentence in the blog post.......
- djmips 11mo agoto be fair it wasn't clear that was an official AMD debugger and besides that's only for debugging ROCm applications.
- deleted 11mo ago[deleted]
- almostgotcaught 11mo agothis sentence doesn't make any sense a) ROCm is an AMD product b) ROCm "applications" are GPU "applications".
- deleted 11mo ago[deleted]
- fc417fc802 11mo agoBut not all GPU applications are ROCm applications (I would think). I can certainly understand OP's confusion. Navigating parts of the GPU ecosystem that are new to you can be incredibly confusing.
- thegeeko 11mo agothere's 2 AMD KMD(kernel mode drivers) in linux: amdkfd and amdgpu .. the graphics applications use the amdgpu which is not supported by amdgdb .. amdgdb also has the limitation of requiring dwarf and and mesa/amd UMDs doesn't generate that ..
- dman 11mo agoDo you know which one rocm uses?
- shetaye 11mo agoThere also exists cuda-gdb[1], a first-party GDB for NVIDIA's CUDA. I've found it to be pretty good. Since CUDA uses a threading model, it works well with the GDB thread ergonomics (though you can only single-step at the warp granularity IIRC by the nature of SM execution). [1] https://docs.nvidia.com/cuda/cuda-gdb/index.html https://docs.nvidia.com/cuda/cuda-gdb/index.html
- danjl 11mo agoFor NVIDIA cards, you can use NSight. There's also RenderDoc that works on a large number of GPUs.
- _zoltan_ 11mo agonsys and nvtx are awesome. many don't know but you can use them without GPUs :)
- KeplerBoy 11mo agoThat's true. It's pretty good for all kinds profiling. I especially like the python GIL profiler of nsys.
- ahartmetz 11mo agoRenderDoc is very cool, but more of a high level debugger, I guess? It's also good to analyze performance issues, e.g. when working with QML and QSG_VISUALIZE=overdraw / batches (both very high level) don't cut it anymore, or to get a different perspective. Watching a scene getting drawn API call by API call is fun.
- justsid 11mo agoRenderDoc is mostly a frame debugger, although it does support stepping through shaders as well which can be super useful. But for real performance analysis I would use PIX if you target D3D12 or RGP and Nsight for Vulkan. I'm at a Vulkan and Metal only shop and I wish I could use PIX for my every day work, since it also has excellent support for Intel GPUs.
- whalesalad 11mo agoTangent: is anyone using a 7900 XTX for local inference/diffusion? I finally installed Linux on my gaming pc, and about 95% of the time it is just sitting off collecting dust. I would love to put this card to work in some capacity.
- qskousen 11mo agoI've done it with a 6800XT, which should be similar. It's a little trickier than with an Nvidia card (because everything is designed for CUDA) but doable.
- FuriouslyAdrift 11mo agoYou'd be much better off wiht any decent nVidia against the 7900 series. AMD doesn't have a unified architecture across GPU and compute like nVidia. AMD compute cards are sold under the Insinct line and are vastly more powerfull than their GPUs. Supposedly, they are moving back to a unified architecture in the next generation of GPU cards.
- Joona 11mo agoI tested some image and text generation models, and generally things just worked after replacing the default torch libraries with AMD's rocm variants.
- universa1 11mo agotry it with ramalama[1]. worked fine here with a 7840u and a 6900xt. [1] https://ramalama.ai/ https://ramalama.ai/
- 11mo ago
- mitchellh 11mo agoNon-AMD, but Metal actually has a [relatively] excellent debugger and general dev tooling. It's why I prefer to do all my GPU work Metal-first and then adapt/port to other systems after that: https://developer.apple.com/documentation/Xcode/Metal-debugger https://developer.apple.com/documentation/Xcode/Metal-debugg... I'm not like a AAA game developer or anything so I don't know how it holds up in intense 3D environments, but for my use cases it's been absolutely amazing. To the point where I recommend people who are dabbling in GPU work grab a Mac (Apple Silicon often required) since it's such a better learning and experimentation environment. I'm sure it's linked somewhere there but in addition to traditionally debugging, you can actually emit formatted log strings from your shaders and they show up interleaved with your app logs. Absolutely bonkers. The app I develop is GPU-powered on both Metal and OpenGL systems and I haven't been able to find anything that comes near the quality of Metal's tooling in the OpenGL world. A lot of stuff people claim is equivalent but for someone who has actively used both, I strongly feel it doesn't hold a candle to what Apple has done.
- mattbee 11mo agoMy initiation into shaders was porting some graphics code from OpenGL on Windows to PS5 and Xbox, and (for your NDA and devkit fees) they give you some very nice debuggers on both platforms. But yes, when you're stumbling around a black screen, tooling is everything. Porting bits of shader code between syntaxes is the easy bit. Can you get better tooling on Windows if you stick to DirectX rather than OpenGL?
- mitchellh 11mo ago> Can you get better tooling on Windows if you stick to DirectX rather than OpenGL? My app doesn't currently support Windows. My plane was to use the full DirectX suite when I get there and go straight to D3D and friends. I lack experience at all on Windows so I'd love if someone who knows both macOS and Windows could compare GPU debugging!
- speps 11mo agoWindows has PIX for Windows, PIX is the name of the GPU debugging since Xbox 360. The Windows version is similar but it relies on debug layers that need to be GPU specific which is usually handled automatically. Although because of that it’s not as deep as the console version but it lets you get by. Most people use RenderDoc on supported platforms though (Linux and Windows). It supports most APIs you can find on these platforms.
- omneity 11mo agoSlightly related, I made a monitor[0] for AMD gpus with a nifty chart. I had many issues with nvtop, it is a bit too strict for some situations and ends up crashing too often. 0: https://github.com/omarkamali/picomon https://github.com/omarkamali/picomon
- pjmlp 11mo agoWe surely have, Metal, CUDA, Pix, and PS/Switch also have their. This is exactly yet another reason why researchers prefer CUDA, to the alternatives. https://developer.nvidia.com/nsight-systems https://developer.nvidia.com/nsight-systems