-
Notifications
You must be signed in to change notification settings - Fork 344
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 rocgdb how-to #3097
add rocgdb how-to #3097
Conversation
c115022
to
f35d561
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe provide a link to the ROCgdb repo?
https://rocm.docs.amd.com/projects/ROCgdb/en/latest/index.html
docs/how-to/rocgdb.rst
Outdated
:keywords: AMD, ROCm, HIP, ROCgdb, performance, debugging | ||
|
||
******************************************************************************* | ||
ROCgdb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ROCgdb | |
ROCgdb debugger for Linux targets |
docs/how-to/rocgdb.rst
Outdated
.. _rocgdb_introduction: | ||
Introduction | ||
=============================================================================== | ||
This document introduces ROCgdb, the AMD ROCm debugger for Linux targets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This document introduces ROCgdb, the AMD ROCm debugger for Linux targets. | |
ROCgdb is the AMD ROCm debugger for Linux targets. |
docs/how-to/rocgdb.rst
Outdated
This document introduces ROCgdb, the AMD ROCm debugger for Linux targets. | ||
|
||
ROCgdb is an extension to GDB, the GNU Project debugger. The tool provides developers | ||
with a mechanism for debugging CUDA applications running on actual hardware. This |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with a mechanism for debugging CUDA applications running on actual hardware. This | |
with a mechanism for debugging CUDA applications running on actual hardware. This tool |
docs/how-to/rocgdb.rst
Outdated
with a mechanism for debugging CUDA applications running on actual hardware. This | ||
enables developers to debug applications without the potential variations introduced | ||
by simulation and emulation environments. It is meant to present a seamless debugging | ||
environment that allows simultaneous debugging of both GPU and CPU code within the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
environment that allows simultaneous debugging of both GPU and CPU code within the | |
environment that allows simultaneous GPU and CPU code debugging within the |
docs/how-to/rocgdb.rst
Outdated
ROCgdb is an extension to GDB, the GNU Project debugger. The tool provides developers | ||
with a mechanism for debugging CUDA applications running on actual hardware. This | ||
enables developers to debug applications without the potential variations introduced | ||
by simulation and emulation environments. It is meant to present a seamless debugging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by simulation and emulation environments. It is meant to present a seamless debugging | |
by simulation and emulation environments. It presents a seamless debugging |
docs/how-to/rocgdb.rst
Outdated
enables developers to debug applications without the potential variations introduced | ||
by simulation and emulation environments. It is meant to present a seamless debugging | ||
environment that allows simultaneous debugging of both GPU and CPU code within the | ||
same application, just like programming in HIP is a seamless extension of C++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same application, just like programming in HIP is a seamless extension of C++ | |
same application, just like programming in HIP, which is a seamless extension of C++ |
docs/how-to/rocgdb.rst
Outdated
the host code, and additional features have been provided to support debugging ROCm | ||
device code. | ||
|
||
ROCgdb supports HIP kernel debugging. It allows the user to set breakpoints, to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this instead:
It allows you to set breakpoints, single-step ROCm applications, and inspect and modify the memory and variables of any given thread running on the hardware.
docs/how-to/rocgdb.rst
Outdated
.. _rocgdb_setup: | ||
Setup | ||
=============================================================================== | ||
Before debugging you have to compile your software with debug information. To do this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider this paragraph instead:
Before debugging, compile your software with debug information. Add the ‘-g’ flag to your compilation command to do this. This generates debug information even when optimizations are turned on. Notice that higher optimization levels make the debugging more difficult, so it might be helpful to turn off these optimizations using the ‘-O0’ compiler option.
docs/how-to/rocgdb.rst
Outdated
.. _rocgdb_debugging: | ||
Debugging | ||
=============================================================================== | ||
This section is a brief introduction on how to use ROCgdb. For a more information on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps:
This section introduces how to use ROCgdb. For more information about GDB, see the GDB documentation.
Add a link for the bold.
docs/how-to/rocgdb.rst
Outdated
console. Here you can use every gdb option for host debugging and you can use them and | ||
extra ROCgdb specific features for device debugging. | ||
|
||
Before you run your application with the debugger, you'll need to set a breakpoint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before you run your application with the debugger, you'll need to set a breakpoint. | |
You'll need to set a breakpoint before you run your application with the debugger. |
docs/how-to/rocgdb.rst
Outdated
|
||
``run`` | ||
|
||
If the breakpoint is in device code the debugger will show the device and host threads as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps:
If the breakpoint is in the device code, the debugger will also show the device and host threads. The device threads will not be individual threads; instead, they represent a wavefront on the device. You can switch between the device wavefronts as you would between host threads.
By the way, is it "wavefront" or "warp"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know they are the same thing, but warp is the word nvidia uses for cuda, and wavefront is used for opencl and by amd for its hardware
docs/how-to/rocgdb.rst
Outdated
``layout asm`` | ||
|
||
The `src` layout is the source code view, while the `asm` is the assembly view. There are | ||
further layouts you can look up on the gdb documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
further layouts you can look up on the gdb documentation. | |
further layouts you can look up in the GBD documentation. (Make this a link) |
docs/how-to/rocgdb.rst
Outdated
|
||
``i r`` | ||
|
||
For further information on the usage of gdb, you can go to the `gdb documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like it's been discussed multiple times.
Not sure needed again here. Perhaps it doesn't hurt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some text about the command above it. Just ending on a command felt weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This belongs in the rocgdb docs repo.
moved to rocgdb-docs |
The PR is merged in on rocgdb docs repository. Closing this PR. |
No description provided.