[rocprofv3-avail] - Add sample data (#514)
* Add sample data for avail and remove color code for non terminal output
* review comments
* review comments
* add documentation
* test fix
[ROCm/rocprofiler-sdk commit: 2447a85215]
This commit is contained in:
کامیت شده توسط
GitHub
والد
f38f6cc82e
کامیت
28d2a8f5bb
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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]
|
||||
|
||||
...
|
||||
@@ -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 <https://rocm.docs.amd.com/en/latest/conceptual/gpu-arch/mi300-mi200-performance-counters.html>`_.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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&
|
||||
|
||||
مرجع در شماره جدید
Block a user