SWDEV-409195: Added instructions for ATT help.

Change-Id: Ie76518dd54c3de82abfbd64b5e8c44a43edc8a09


[ROCm/rocprofiler commit: 019ddfe68e]
This commit is contained in:
Giovanni LB
2023-07-11 22:26:59 -03:00
committed by Giovanni Baraldi
parent 3eaf848d49
commit e599708211
2 changed files with 7 additions and 3 deletions
+3 -2
View File
@@ -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 <rocprofv2_params> --plugin att <ISA_file> <att_parameters> <executable>"
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 <DELAY_TIME>:<TIME_BETWEEN_START_AND_STOP>\"."
echo -e "-tp | --trace-period Specifies a trace period in milliseconds, with format \"-tp <DELAY>:<ACTIVE_TIME>:<LOOP_INTERVAL_TIME>\"."
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
+4 -1
View File
@@ -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",