Rename HIP_ATP_MARKER and profiling vars
HIP_PROFILE_API HIP_DB_START_API HIP_DB_STOP_API Change-Id: I6c4da67212ff8217e6356a2622d4c6278a188c34
Этот коммит содержится в:
@@ -229,43 +229,7 @@ If platform portability is important, use #ifdef __HIP_PLATFORM_HIPCC__ to guard
|
||||
|
||||
|
||||
### How do I trace HIP application flow?
|
||||
#### Using CodeXL markers for HIP Functions
|
||||
HIP can generate markers at function being/end which are displayed on the CodeXL timeline view.
|
||||
To do this, you need to install ROCm-Profiler and enable HIP to generate the markers:
|
||||
|
||||
1. Install ROCm-Profiler
|
||||
Installing HIP from the [rocm](http://gpuopen.com/getting-started-with-boltzmann-components-platforms-installation/) pre-built packages, installs the ROCm-Profiler as well.
|
||||
Alternatively, you can build ROCm-Profiler using the instructions [here](https://github.com/RadeonOpenCompute/ROCm-Profiler#building-the-rocm-profiler).
|
||||
|
||||
2. Build HIP with ATP markers enabled
|
||||
HIP pre-built packages are enabled with ATP marker support by default.
|
||||
To enable ATP marker support when building HIP from source, use the option ```-DCOMPILE_HIP_ATP_MARKER=1``` during the cmake configure step.
|
||||
|
||||
3. Set HIP_ATP_MARKER
|
||||
```shell
|
||||
export HIP_ATP_MARKER=1
|
||||
```
|
||||
|
||||
4. Recompile the target application
|
||||
|
||||
5. Run with profiler enabled to generate ATP file.
|
||||
```shell
|
||||
# Use profile to generate timeline view:
|
||||
/opt/rocm/bin/rocm-profiler -o <outputATPFileName> -A <applicationName> <applicationArguments>
|
||||
|
||||
Or
|
||||
/opt/rocm/bin/rocm-profiler -e HIP_ATP_MARKER=1 -o <outputATPFileName> -A <applicationName> <applicationArguments>
|
||||
```
|
||||
|
||||
#### Using HIP_TRACE_API
|
||||
You can also print the HIP function strings to stderr using HIP_TRACE_API environment variable. This can also be combined with the more detailed debug information provided
|
||||
by the HIP_DB switch. For example:
|
||||
```shell
|
||||
# Trace to stderr showing being/end of each function (with arguments) + intermediate debug trace during the execution of each function.
|
||||
HIP_TRACE_API=1 HIP_DB=0x2 ./myHipApp
|
||||
```
|
||||
|
||||
Note this trace mode uses colors. "less -r" can handle raw control characters and will display the debug output in proper colors.
|
||||
See the [HIP Profiling Guide](hip_porting_guide.md) for more information.
|
||||
|
||||
### What if HIP generates error of "symbol multiply defined!" only on AMD machine?
|
||||
Unlike CUDA, in HCC, for functions defined in the header files, the keyword of "__forceinline__" does not imply "static".
|
||||
|
||||
@@ -564,7 +564,7 @@ HIP_LAUNCH_BLOCKING = 0 : Make HIP APIs 'host-synchronous', so they
|
||||
HIP_DB = 0 : Print various debug info. Bitmask, see hip_hcc.cpp for more information.
|
||||
HIP_TRACE_API = 0 : Trace each HIP API call. Print function name and return code to stderr as program executes.
|
||||
HIP_TRACE_API_COLOR = green : Color to use for HIP_API. None/Red/Green/Yellow/Blue/Magenta/Cyan/White
|
||||
HIP_ATP_MARKER = 0 : Add HIP function begin/end to ATP file generated with CodeXL
|
||||
HIP_PROFILE_API = 0 : Add HIP function begin/end to ATP file generated with CodeXL
|
||||
HIP_VISIBLE_DEVICES = 0 : Only devices whose index is present in the secquence are visible to HIP applications and they are enumerated in the order of secquence
|
||||
HIP_NUM_KERNELS_INFLIGHT = 128 : Number of kernels per stream
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user