swdev-515336: removing deprecated features from documentation (#12)

[ROCm/rocprofiler commit: 1fcb951d0e]
Этот коммит содержится в:
Bhardwaj, Gopesh
2025-02-14 00:34:29 +05:30
коммит произвёл GitHub
родитель 43c073897d
Коммит 11888f953a
3 изменённых файлов: 3 добавлений и 154 удалений
+1 -119
Просмотреть файл
@@ -369,121 +369,6 @@ Usage:
rocprofv2 --plugin json --hip-trace -d output_dir <app_relative_path>
```
- ATT (Advanced thread tracer) plugin: advanced hardware traces data in binary format. Please refer ATT section.
Tool used to collect fine-grained hardware metrics. Provides ISA-level instruction hotspot analysis via hardware tracing.
- Install plugin package. See Plugin Support section for installation
- Run the following to view the trace. Att-specific options must come right after the assembly file.
- On ROCm 6.0, ATT enables automatic capture of the ISA during kernel execution, and does not require recompiling. It is recommended to leave at "auto".
```bash
rocprofv2 -i input.txt --plugin att auto --mode csv <app_relative_path>
# Or using a user-supplied ISA:
# rocprofv2 -i input.txt --plugin att <app_assembly_file> --mode csv <app_relative_path>
```
- app_relative_path
Path for the running application
- ATT plugin optional parameters
- --att_kernel "filename": Kernel filename(s) (glob) to use. A CSV file (or UI folder) will be generated for each kernel.txt file. Default: all in current folder.
- --mode [csv, file, off (default)]
- off
Runs trace collection but not analysis, so it can be analyzed at a later time. Run rocprofv2 ATT with the same parameters (+ --mode csv), removing the application binary, to analyze previously generated traces.
- csv
Dumps the analyzed assembly into a CSV format, with the hitcount and total cycles cost. Recommended mode for most users.
- file (deprecated)
Dumps the analyzed json files to disk for viewing at a later time. Run python3 httpserver.py from within the generated name_ui/ folder to view the trace. The folder can be copied to another machine, and will run without rocm.
- file,csv
Both options can be used at the same time, generating a UI folder and a .csv.
- network [removed]
Network mode was removed, since it's functionality is included in file mode with the httpserver.py script generated inside the UI folder.
- input.txt
Required. Used to select specific compute units and other trace parameters.
For first time users, using the following input file:
```bash
# vectoradd
att: TARGET_CU=1
SE_MASK=0x1
SIMD_SELECT=0x3
```
```bash
# histogram
att: TARGET_CU=0
SE_MASK=0xFF
SIMD_SELECT=0xF // 0xF for GFX9, SIMD_SELECT=0 for Navi
```
Possible contents:
- att: TARGET_CU=1 // or some other CU [0,15] - WGP for Navi [0,8]
- SE_MASK=0x1 // bitmask of shader engines. The fewer, the easier on the hardware. Default enables 1 out of 4 shader engines.
- SIMD_SELECT=0xF // GFX9: bitmask of SIMDs. Navi: SIMD Index [0-3]. Recommended 0xF for GFX9 and 0x0 for Navi.
- DISPATCH=ID // collect trace only for the given dispatch_ID. Multiple lines for can be added.
- DISPATCH=ID,RN // collect trace only for the given dispatch_ID and MPI rank RN. Multiple lines with varying combinations of RN and ID can be added.
- KERNEL=kernname // Profile only kernels containing the string kernname (c++ mangled name). Multiple lines can be added.
- PERFCOUNTERS_CTRL=0x3 // Multiplier period for counter collection [0~31]. 0=fastest. GFX9 only.
- PERFCOUNTER_MASK=0xFFF // Bitmask for perfcounter collection. GFX9 only.
- PERFCOUNTER=counter_name // Add a SQ counter to be collected with ATT; period defined by PERFCOUNTERS_CTRL. GFX9 only.
- BUFFER_SIZE=[size] // Sets size of the ATT buffer collection, per dispatch, in megabytes (shared among all shader engines).
- ISA_CAPTURE_MODE=[0,1,2] // Set codeobj capture mode during kernel dispatch.
- 0 = capture symbols only.
- 1 = capture symbols for file:// and make a copy of memory://, dump captured copy as .out file.
- 2 = Copy file:// and memory://, dump copied codeobj as .out files.
- DISPATCH_RANGE=[begin],[end] // Continuously collect ATT data starting at "begin" and stop at "end". Alternative to DISPATCH= and KERNEL=.
- By default, kernel names are truncated for ATT. To disable, please see the kernel name truncation section below.
- Example for vectoradd.
```bash
# -g adds debugging symbols to the binary. Required only for tracking disassembly back to c++.
hipcc -g vectoradd_hip.cpp -o vectoradd_hip.exe
# "auto" means to use the automatically captured ISA, e.g. vectoradd_float_v0_isa.s dumped along with .att files.
# "--mode csv" dumps the result to "att_output_vectoradd_float_v0.csv".
rocprofv2 -i input.txt --plugin att auto --mode csv ./vectoradd_hip.exe
```
```bash
# Alternatively, using --save-temps to generate the ISA
hipcc -g --save-temps vectoradd_hip.cpp -o vectoradd_hip.exe
# Replace "auto" with <generated_gpu_isa.s> for user-supplied ISA. Typically they match the wildcards *amdgcn-amd-amdhsa*.s.
# Special attention to the correct architecture for the ISA, such as "gfx1100" (navi31).
rocprofv2 -i input.txt --plugin att vectoradd_hip-hip-amdgcn-amd-amdhsa-gfx1100.s --mode csv ./vectoradd_hip.exe
```
Instruction latencies will be in att_output_vectoradd_float_v0.csv
```bash
# Use -d option to specify the generated data directory, and -o to specify dir and filename is the csv:
rocprofv2 -d mydir -o test/mycsv -i input.txt --plugin att auto --mode csv ./vectoradd_hip.exe
# Generates raw files inside mydir/ and the parsed data on test/mycsv_vectoradd_float_v0.csv
```
***
Note: For MPI or long running applications, we recommend to run collection, and later run the parser with already collected data:
Run only collection: The assembly file is not used. Use mpirun [...] rocprofv2 [...] if needed.
```bash
# Run only data collection, not the parser
rocprofv2 -i input.txt --plugin att auto --mode off ./vectoradd_hip.exe
```
Remove the binary/application from the command line.
```bash
# Only runs the parser on previously collected data.
rocprofv2 -i input.txt --plugin att auto --mode csv
```
Note 2: By default, ATT only collects a SINGLE kernel dispatch for the whole application, which is the first dispatch matching the given filters (DISPATCH=<id> or KERNEL=<name>). To collect multiple dispatches in a single application run, use:
```bash
export ROCPROFILER_MAX_ATT_PROFILES=<max_collections>
```
Or, alternatively, use the continuous ATT mode (DISPATCH_RANGE parameter).
***
### Flush Interval
Flush interval can be used to control the interval time in milliseconds between the buffers flush for the tool. However, if the buffers are full the flush will be called on its own. This can be used as in the next example:
@@ -656,9 +541,8 @@ samples can be run as independent executables once installed
- plugin
- file: File Plugin
- perfetto: Perfetto Plugin
- att: Advanced thread tracer Plugin
- ctf: CTF Plugin
- samples: Samples of how to use the API, and also input.txt input file samples for counter collection and ATT.
- samples: Samples of how to use the API, and also input.txt input file samples for counter collection.
- script: Scripts needed for tracing
- src: Source files of the project
- api: API implementation for rocprofv2
@@ -673,8 +557,6 @@ samples can be run as independent executables once installed
- filter: Type of profiling or tracing and its properties
- tracer: Tracing support of the session
- profiler: Profiling support of the session
- spm: SPM support of the session
- att: ATT support of the session
- tools: Tools needed to run profiling and tracing
- rocsys: Controlling Session from another CLI
- utils: Utilities needed by the project
+1 -3
Просмотреть файл
@@ -55,10 +55,8 @@ usage() {
echo -e "${GREEN}--kernel-trace ${RESET} For Collecting Kernel dispatch Traces"
echo -e "${GREEN}--sys-trace ${RESET} For Collecting HIP and HSA APIs and their Activities Traces along ROCTX\n"
echo -e "\t#${GREY}usage e.g: rocprofv2 --[hip-trace|hsa-trace|roctx-trace|kernel-trace|sys-trace] <executable>\n"${RESET}
echo -e "${GREEN}--plugin ${RESET} PLUGIN_NAME For enabling a plugin (cli/file/perfetto/att/ctf/speedscope)"
echo -e "${GREEN}--plugin ${RESET} PLUGIN_NAME For enabling a plugin (cli/file/perfetto/ctf/speedscope)"
echo -e "\t#${GREY} usage(file/perfetto/ctf) e.g: rocprofv2 -i pmc.txt --plugin [file/perfetto/ctf/json] -d out_dir <executable>"
echo -e "\t# usage(att): rocprofv2 <rocprofv2_params> --plugin att <ISA_file> <att_parameters> <executable>"
echo -e "\t# use \"rocprofv2 --plugin att --help\" for ATT-specific parameters help.${RESET}\n"
echo -e "\t# use \"rocprofv2 --plugin json --disable-json-data-flows ...\" for SpeedScope support as speedscope doesn't support data flows.${RESET}\n"
echo -e "${GREEN}--plugin-version ${RESET} <1|2> For selecting the version for the plugin (1/2)"
echo -e "\t#${GREY} 1 - Legacy output format, 2 - New output format (default)${RESET}\n"
+1 -32
Просмотреть файл
@@ -145,39 +145,10 @@ The user has two options for building:
rocprofv2 --help
```
- (ATT) Advanced Thread Trace: It can collect kernel running time, granular hardware metrics per kernel dispatch and provide hotspot analysis at source code level via hardware tracing.
Usage:
```bash
# ATT(Advanced Thread Trace) needs few preconditions before running.
# 1. Make sure to generate the assembly file for application by executing the following before compiling your HIP Application
export HIPCC_COMPILE_FLAGS_APPEND="--save-temps -g"
# 2. Install plugin package
see Plugin Support section for installation
# 3. Run the following to view the trace
rocprofv2 --plugin att <app_relative_path_assembly_file> --mode <network, file, off> -i input.txt <app_relative_path>
# app_assembly_file_relative_path is the assembly file with .s extension generated in 1st step
# app_relative_path is the path for the application binary
# Mode:
# - Network: opens the server with the browser UI.
# att needs 2 ports opened (8000, 18000), In case the browser is running on a different machine.
# - File: dumps the json files to disk, it can be used to quickly verify if there is anything wrong with the data.
# - Off runs collection but not analysis/parsing. So it can be later used on another system to be viewed.
# input.txt gives flexibility to to target the compute unit and provide filters.
# input.txt contents:
# TARGET_CU=1 // or some other CU [0,15]
# SE_MASK=0x1 // bitmask of shader engines. The fewer, the easier on the hardware. Default enables all 24 because SE_MASK code is recent.
# SIMD_MASK=0xF // bitmask of SIMDs, there are four in GFX9.
# samples/att.txt is having an example on how to right input file for ATT
```
- Plugin Support: We have a template for adding new plugins. New plugins can be written on top of rocprofv2 to support the desired output format using include/rocprofiler/v2/rocprofiler_plugins.h header file. These plugins are modular in nature and can easily be decoupled from the code based on need. E.g.
- file plugin: outputs the data in txt files.
- Perfetto plugin: outputs the data in protobuf format.
- Protobuf files can be viewed using ui.perfetto.dev or using trace_processor
- ATT (Advanced thread tracer) plugin: advanced hardware traces data in binary format. Please refer ATT section.
- CTF plugin: Outputs the data in ctf format(a binary trace format)
- CTF binary output can be viewed using TraceCompass or babeltrace.
@@ -267,9 +238,8 @@ samples can be run as independent executables once installed
- plugin
- file: File Plugin
- perfetto: Perfetto Plugin
- att: Advanced thread tracer Plugin
- ctf: CTF Plugin
- samples: Samples of how to use the API, and also input.txt input file samples for counter collection and ATT.
- samples: Samples of how to use the API, and also input.txt input file samples for counter collection.
- script: Scripts needed for tracing
- src: Source files of the project
- api: API implementation for rocprofv2
@@ -285,7 +255,6 @@ samples can be run as independent executables once installed
- tracer: Tracing support of the session
- profiler: Profiling support of the session
- spm: SPM support of the session
- att: ATT support of the session
- tools: Tools needed to run profiling and tracing
- rocsys: Controlling Session from another CLI
- utils: Utilities needed by the project