Skip to content

temporary patch for truncated names #30

Description

@lasch

some torch.profiles come with truncated event names which leads to not finding corresponding kernel categories or ideal cycles (if requested and passed via log file). The problem is about to get fixed at the source. In the meantime, this patch can help:

diff --git a/src/aiu_trace_analyzer/pipeline/rcu_utilization.py b/src/aiu_trace_analyzer/pipeline/rcu_utilization.py
index 3013a85..4eb0b25 100644
--- a/src/aiu_trace_analyzer/pipeline/rcu_utilization.py
+++ b/src/aiu_trace_analyzer/pipeline/rcu_utilization.py
@@ -23,6 +23,7 @@ RCU_pt_util_counter_unit = "Percent"
 _default_fprint_len = 25
 _kernel_db_feature_implemented = False
 
+_kernel_name_trunc_limit = 63
 
 class RCUTableFingerprint():
     def __init__(self, datalimit: int = -1, initial_data: str = ''):
@@ -184,7 +185,7 @@ class RCUUtilizationContext(AbstractContext, PipelineContextTool):
                         category = "NotAvailable"
                 else:
                     category = "Total"
-                kernel = kernel_and_cat[0]+" Cmpt Exec"
+                kernel = kernel_and_cat[0][:_kernel_name_trunc_limit]+" Cmpt Exec"
                 fprint.add(kernel)
 
                 if kernel not in current_table:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationwontfixThis will not be worked on

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions