Skip to content

extend the iteration_detection filter to use dialect-based event filtering - #123

Open
lasch wants to merge 1 commit into
mainfrom
dialect_base_iteration
Open

extend the iteration_detection filter to use dialect-based event filtering#123
lasch wants to merge 1 commit into
mainfrom
dialect_base_iteration

Conversation

@lasch

@lasch lasch commented Aug 6, 2026

Copy link
Copy Markdown
Member

The existing event filtering in the iteration detection function was still using hard-coded conditions for flex traces.

This PR updates this to use dialect-based accelerator kernel detection and thus enables iteration detection for torch traces.

…ering

Signed-off-by: Lars Schneidenbach <schneidenbach@us.ibm.com>

@ppnaik1890 ppnaik1890 left a comment

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.

minor query

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants