From e599708211d0806074c81dad1ed42a73a629a7fa Mon Sep 17 00:00:00 2001 From: Giovanni LB Date: Tue, 11 Jul 2023 22:26:59 -0300 Subject: [PATCH] SWDEV-409195: Added instructions for ATT help. Change-Id: Ie76518dd54c3de82abfbd64b5e8c44a43edc8a09 [ROCm/rocprofiler commit: 019ddfe68edd2d9d62de307b120a5c7588c617b5] --- projects/rocprofiler/bin/rocprofv2 | 5 +++-- projects/rocprofiler/plugin/att/att.py | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/projects/rocprofiler/bin/rocprofv2 b/projects/rocprofiler/bin/rocprofv2 index 4ac2e4bcb7..f97ebffbcb 100755 --- a/projects/rocprofiler/bin/rocprofv2 +++ b/projects/rocprofiler/bin/rocprofv2 @@ -28,11 +28,13 @@ usage() { echo -e "--kernel-trace For Collecting Kernel dispatch Traces" echo -e "--sys-trace For Collecting HIP and HSA APIs and their Activities Traces along ROCTX and Kernel Dispatch traces" echo -e "--plugin PLUGIN_NAME For enabling a plugin (file/perfetto/att/ctf)" + echo -e "\t# ATT plugin usage: rocprofv2 --plugin att " + echo -e "\t# Use \"rocprofv2 --plugin att --help\" for ATT-specific parameters help." echo -e "-i | --input For adding counters file path (every line in the text file represents a counter)" echo -e "-o | --output-file For the output file name" echo -e "-d | --output-directory For adding output path where the output files will be saved" echo -e "-fi | --flush-interval For adding a flush interval in milliseconds, every \"flush interval\" the buffers will be flushed" - echo -e "-tp | --trace-period For adding a trace period in milliseconds, in the following format \"-tp :\"." + echo -e "-tp | --trace-period Specifies a trace period in milliseconds, with format \"-tp ::\"." exit 1 } @@ -169,7 +171,6 @@ while [ 1 ] ; do if [ "$2" = "att" ] ; then if [ $RUN_FROM_BUILD == 1 ]; then ATT_PATH=$ROCM_DIR/plugin/att/att/att.py - export ROCPROFV2_ATT_LIB_PATH=$ROCM_DIR/lib/hsa-amd-aqlprofile/librocprofv2_att.so else ATT_PATH=$ROCM_DIR/libexec/rocprofiler/att/att.py export ROCPROFV2_ATT_LIB_PATH=$ROCM_DIR/lib/hsa-amd-aqlprofile/librocprofv2_att.so diff --git a/projects/rocprofiler/plugin/att/att.py b/projects/rocprofiler/plugin/att/att.py index 70f8c4f4c0..ff67b613d9 100755 --- a/projects/rocprofiler/plugin/att/att.py +++ b/projects/rocprofiler/plugin/att/att.py @@ -121,6 +121,9 @@ class ReturnInfo(ctypes.Structure): ('flags', ctypes.c_uint64)] rocprofv2_att_lib = os.getenv('ROCPROFV2_ATT_LIB_PATH') +if rocprofv2_att_lib is None: + print("ATT Lib path not set. Use export ROCPROFV2_ATT_LIB_PATH=/path/to/librocprofv2_att.so") + quit() path_to_parser = os.path.abspath(rocprofv2_att_lib) SO = CDLL(path_to_parser) @@ -346,7 +349,7 @@ if __name__ == "__main__": if pathenv is None: pathenv = "." parser = argparse.ArgumentParser() - parser.add_argument("assembly_code", help="Path of the assembly code") + parser.add_argument("assembly_code", help="Path to the assembly code. Must be the first parameter.") parser.add_argument("--depth", help="Maximum number of parsed waves per slot", default=100, type=int) parser.add_argument("--trace_file", help="Filter for trace files", default=None, type=str) parser.add_argument("--att_kernel", help="Kernel file",