Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/aiu_trace_analyzer/pipeline/iteration_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import aiu_trace_analyzer.logger as aiulog
from aiu_trace_analyzer.types import TraceEvent
from aiu_trace_analyzer.pipeline import AbstractContext, AbstractHashQueueContext
from aiu_trace_analyzer.pipeline.tools import PipelineContextTool


class IterationStatus(object):
Expand Down Expand Up @@ -149,7 +150,7 @@ def drain(self) -> list[TraceEvent]:
def collect_iteration_stats(event: TraceEvent, context: AbstractContext) -> list[TraceEvent]:
assert isinstance(context, IterationDectectContext)

if event["ph"] in "X" and "args" in event and "TS1" in event["args"] and "Cmpt Exec" in event["name"]:
if event["ph"] == "X" and PipelineContextTool.is_acc_kernel(event):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lasch. Is this update not required for DMAI, DMAO and Cmpt Prep as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The iteration detection (so far) was purely based on compute kernel name sequences. Therefore, memory ops don't need to be detected/handled here.

In general, there was no need for extra helper functions for memory ops yet, because the dialect feature already supports has the general fn-call is_category. For example: PipelineContextTool.is_category("acc_datatransfer_DtoH") would be the dialect-agnostic check for DmaO ops.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ppnaik1890 does this explanation sound like it will cover your question?

context.detect_iteration(event)

return [event]