Skip to content

Llama: Custom Profiler#9

Closed
kurtis-b-1 wants to merge 56 commits intoamd:bring-in-the-llamafrom
kurtis-b-1:kurtis-b-1/try-custom-profiler
Closed

Llama: Custom Profiler#9
kurtis-b-1 wants to merge 56 commits intoamd:bring-in-the-llamafrom
kurtis-b-1:kurtis-b-1/try-custom-profiler

Conversation

@kurtis-b-1
Copy link
Copy Markdown
Contributor

@kurtis-b-1 kurtis-b-1 commented Nov 13, 2025

Custom profiler for performance measurements of Llama 3.2-1B inference. A logging function is executed at the call and return of each function. Initially tried with cProfile, but the measurements of PyXRT execution was missing (possibly cProfile excludes I/O like the NPU). This method allows for deterministic profiling of inference, though profiling overhead is higher compared to statistical profiler. But this method is apt for getting a comprehensive picture of the inference run, as one can check the time of each AIE and CPU operator relative to the inference metrics such as TTFT. The overhead of profiling shouldn't skew the relative contribution of each operator to the latency of inference.

This branch is based on the branch in this PR: #8

Added

  • Script for generating CSV based on log

Changed

  • Attach custom profiler to system during inference if a CLI argument is passed

Removed

PR Merge Checklist

  1. The PR is rebased on the latest devel commit and pointing to devel.
  2. Your PR reviewed and approved.
  3. All checks are passing.

@kurtis-b-1 kurtis-b-1 changed the title Llama Custom Profiler Llama: Custom Profiler Nov 13, 2025
@kurtis-b-1 kurtis-b-1 changed the base branch from devel to bring-in-the-llama November 13, 2025 20:38
@andrej andrej force-pushed the bring-in-the-llama branch from 9da3796 to 28058d1 Compare November 14, 2025 20:46
@andrej andrej deleted the branch amd:bring-in-the-llama November 15, 2025 00:10
@andrej andrej closed this Nov 15, 2025
@kurtis-b-1 kurtis-b-1 deleted the kurtis-b-1/try-custom-profiler branch November 17, 2025 20:58
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