Skip to content

Add xprof for autotune#40

Merged
NinaCai merged 3 commits into
mainfrom
nina-autotune-xprof
May 28, 2026
Merged

Add xprof for autotune#40
NinaCai merged 3 commits into
mainfrom
nina-autotune-xprof

Conversation

@NinaCai
Copy link
Copy Markdown
Collaborator

@NinaCai NinaCai commented May 16, 2026

  • For each combination in autotuning, provide the option to generate profiling, and extract the time from profile instead of using wall time.
  • Use jit_computation or jitted_computation in the profile, otherwise, use the longest op in the profile.
  • Constraint the number of combinations to 10-100. And carefully pick the parameters to sweep.
  • Hardcode using 10 iterations + 1 warmup in each script.

@NinaCai NinaCai requested a review from shangkunwang01 May 16, 2026 01:03
timeout: Optional[int] = 30
timeout: Optional[int] = 300
profile: bool = True
kernel_name_pattern: Optional[str] = None
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.

I don't see this is used in the autotune_tool so we can remove it and code related to it. The current implementation will always be none.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

search_space: dict[str, list]
timeout: Optional[int] = 30
timeout: Optional[int] = 300
profile: bool = True
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.

How can people turn off profile? When autotune_tool send the request, it does not specify the profile arg and as a result it is always True. Since you always want profile, let's remove this field and always do profiling.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I thought auto-agent would not use profiling? I am ok with always using profiling.

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.

Yes. In that case we can keep code clean and remove this field and related code.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment thread MaxKernel/hitl_agent/server_utils/cpu_server.py
Comment thread MaxKernel/hitl_agent/server_utils/tpu_server.py
@NinaCai NinaCai requested a review from shangkunwang01 May 27, 2026 23:57
@NinaCai NinaCai merged commit 7aa6373 into main May 28, 2026
6 checks passed
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