diff --git a/projects/rocprofiler-sdk/source/bin/rocprofv3-avail.py b/projects/rocprofiler-sdk/source/bin/rocprofv3-avail.py index 66d6ddb98e..f0932a9fa7 100755 --- a/projects/rocprofiler-sdk/source/bin/rocprofv3-avail.py +++ b/projects/rocprofiler-sdk/source/bin/rocprofv3-avail.py @@ -217,7 +217,7 @@ def list_basic_agent(args, list_counters): agent_info_map = avail.get_agent_info_map() agent_counters = avail.get_counters() - for agent, info in agent_info_map.items(): + for agent, info in dict(sorted(agent_info_map.items())).items(): if ( info["type"] == 2 and args.device is not None @@ -238,7 +238,7 @@ def list_pc_sampling(args): sampling_agents = avail.get_pc_sample_configs() agent_info_map = avail.get_agent_info_map() print("Agents supporting PC Sampling\n") - for agent in sampling_agents.keys(): + for agent in dict(sorted(sampling_agents.items())).keys(): info = agent_info_map[agent] print( "{:8}:\t{}\n{:8}:\t{}".format( @@ -251,8 +251,9 @@ def list_pc_sampling(args): def info_pc_sampling(args): sampling_agents = avail.get_pc_sample_configs() agent_info_map = avail.get_agent_info_map() - for agent, configs in sampling_agents.items(): + for agent, configs in dict(sorted(sampling_agents.items())).items(): info = agent_info_map[agent] + print( "{:8}:\t{}\n{:8}:\t{}".format( "GPU", info["logical_node_type_id"], "Name", info["name"] @@ -280,7 +281,7 @@ def listing(args): agent_counters = avail.get_counters() agent_info_map = avail.get_agent_info_map() - for agent, info in agent_info_map.items(): + for agent, info in dict(sorted(agent_info_map.items())).items(): if ( info["type"] == 2 and args.device is not None @@ -321,7 +322,7 @@ def info_pmc(args): print(counter) print("\n") - for agent, info in agent_info_map.items(): + for agent, info in dict(sorted(agent_info_map.items())).items(): if ( info["type"] == 2 and args.device is not None diff --git a/projects/rocprofiler-sdk/source/bin/rocprofv3.py b/projects/rocprofiler-sdk/source/bin/rocprofv3.py index 6cc43190db..571be911ba 100755 --- a/projects/rocprofiler-sdk/source/bin/rocprofv3.py +++ b/projects/rocprofiler-sdk/source/bin/rocprofv3.py @@ -1198,7 +1198,7 @@ def run(app_args, args, **kwargs): if args.marker_trace and not args.suppress_marker_preload: update_env("LD_PRELOAD", ROCPROF_ROCTX_LIBRARY, append=True) - if trace_count == 0: + if trace_count == 0 and len(app_args) != 0: warning("No tracing options were enabled.") # if no tracing was enabled but the options below were enabled, raise an error @@ -1403,6 +1403,11 @@ def run(app_args, args, **kwargs): ) else: app_args = [sys.executable, path, "info", "--pmc"] + for itr in ("ROCPROF", "ROCPROFILER", "ROCTX"): + update_env( + f"{itr}_LOG_LEVEL", + "error", + ) exit_code = subprocess.check_call( [sys.executable, path, "info", "--pc-sampling"], env=app_env, diff --git a/projects/rocprofiler-sdk/source/docs/data/list-avail.txt b/projects/rocprofiler-sdk/source/docs/data/list-avail.txt new file mode 100644 index 0000000000..9fe41deac5 --- /dev/null +++ b/projects/rocprofiler-sdk/source/docs/data/list-avail.txt @@ -0,0 +1,26 @@ +GPU : 0 +Name : gfx90a +configs : + Method : host_trap + Unit : time + Min_Interval : 1 + Max_Interval : 18446744073709551615 + Flags : none + +GPU:0 +Name:gfx90a +Counter_Name : processor_id_low +Description : Constant value processor_id_low from agent properties + + +Counter_Name : ALUStalledByLDS +Description : The percentage of GPUTime ALU units are stalled by the LDS input queue being full or the output queue being not ready. If there are LDS bank conflicts, reduce them. Otherwise, try reducing the number of LDS accesses if possible. Value range: 0% (optimal) to 100% (bad). +Expression : 400*reduce(SQ_WAIT_INST_LDS,sum)/reduce(SQ_WAVES,sum)/reduce(GRBM_GUI_ACTIVE,max) +Dimensions : DIMENSION_INSTANCE[0:0] + +Counter_Name : SQ_WAVES +Description : Count number of waves sent to distributed sequencers (SQs). This value represents the number of waves that are sent to each SQ. This only counts new waves sent since the start of collection (for dispatch profiling this is the timeframe of kernel execution, for agent profiling it is the timeframe between start_context and read counter data). A sum of all SQ_WAVES values will give the total number of waves started by the application during the collection timeframe. Returns one value per-SE (aggregates of SIMD values). +Block : SQ +Dimensions : DIMENSION_INSTANCE[0:0] DIMENSION_SHADER_ENGINE[0:7] + +... diff --git a/projects/rocprofiler-sdk/source/docs/how-to/using-rocprofv3.rst b/projects/rocprofiler-sdk/source/docs/how-to/using-rocprofv3.rst index 938efac996..a2b00c46b6 100644 --- a/projects/rocprofiler-sdk/source/docs/how-to/using-rocprofv3.rst +++ b/projects/rocprofiler-sdk/source/docs/how-to/using-rocprofv3.rst @@ -780,6 +780,12 @@ To see the counters available on the GPU, use: rocprofv3 --list-avail +Sample output for the list-avail command: + +.. file:: /data/list-avail.txt + :width: 100% + :align: center + You can also customize the counters according to the requirement. Such counters are named :ref:`extra-counters`. For a comprehensive list of counters available on MI200, see `MI200 performance counters and metrics `_. diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/tool.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/tool.cpp index aaab7bf80b..c4e6aeb982 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/tool.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/tool.cpp @@ -1461,7 +1461,7 @@ initialize_logging() { auto logging_cfg = rocprofiler::common::logging_config{.install_failure_handler = true}; common::init_logging("ROCPROF", logging_cfg); - FLAGS_colorlogtostderr = true; + FLAGS_colorlogtostderr = isatty(fileno(stderr)) == 1 ? true : false; } } diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/rocprofiler-avail/rocprofv3_avail.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/rocprofiler-avail/rocprofv3_avail.cpp index 065f481469..cc2bf270d1 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/rocprofiler-avail/rocprofv3_avail.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/rocprofiler-avail/rocprofv3_avail.cpp @@ -78,7 +78,7 @@ initialize_logging() { auto logging_cfg = rocprofiler::common::logging_config{.install_failure_handler = true}; common::init_logging("ROCPROF", logging_cfg); - FLAGS_colorlogtostderr = true; + FLAGS_colorlogtostderr = isatty(fileno(stderr)) == 1 ? true : false; } tool::metadata&