|
|
|
@ -54,7 +54,7 @@ In this tutorial, we will focus on nvprof and nvvp.
|
|
|
|
|
:code:`test_GpuProfiler` from :code:`paddle/math/tests` directory will be used to evaluate
|
|
|
|
|
above profilers.
|
|
|
|
|
|
|
|
|
|
.. literalinclude:: ../../../paddle/math/tests/test_GpuProfiler.cpp
|
|
|
|
|
.. literalinclude:: ../../../../paddle/math/tests/test_GpuProfiler.cpp
|
|
|
|
|
:language: c++
|
|
|
|
|
:lines: 137-151
|
|
|
|
|
:linenos:
|
|
|
|
@ -80,7 +80,7 @@ As a simple example, consider the following:
|
|
|
|
|
|
|
|
|
|
1. Add :code:`REGISTER_TIMER_INFO` and :code:`printAllStatus` functions (see the emphasize-lines).
|
|
|
|
|
|
|
|
|
|
.. literalinclude:: ../../../paddle/math/tests/test_GpuProfiler.cpp
|
|
|
|
|
.. literalinclude:: ../../../../paddle/math/tests/test_GpuProfiler.cpp
|
|
|
|
|
:language: c++
|
|
|
|
|
:lines: 137-151
|
|
|
|
|
:emphasize-lines: 8-12,14
|
|
|
|
@ -127,7 +127,7 @@ To use this command line profiler **nvprof**, you can simply issue the following
|
|
|
|
|
|
|
|
|
|
1. Add :code:`REGISTER_GPU_PROFILER` function (see the emphasize-lines).
|
|
|
|
|
|
|
|
|
|
.. literalinclude:: ../../../paddle/math/tests/test_GpuProfiler.cpp
|
|
|
|
|
.. literalinclude:: ../../../../paddle/math/tests/test_GpuProfiler.cpp
|
|
|
|
|
:language: c++
|
|
|
|
|
:lines: 137-151
|
|
|
|
|
:emphasize-lines: 6-7
|
|
|
|
|