Skip to content

Kernels compilation profiling doc #4765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 29, 2025
Merged

Kernels compilation profiling doc #4765

merged 3 commits into from
Jul 29, 2025

Conversation

AndreyPavlenko
Copy link
Contributor

No description provided.

Copy link
Contributor

@anmyachev anmyachev left a comment

Choose a reason for hiding this comment

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

Nice!

0.0000 ( 0.0%) 0.0000 ( 0.0%) (A) DominanceInfo
0.1470 ( 0.0%) 0.1470 ( 0.0%) SymbolDCE
0.0876 ( 0.0%) 0.0876 ( 0.0%) LLVMDIScope
483.1849 ( 96.6%) 465.9228 ( 96.4%) Rest
Copy link
Contributor

Choose a reason for hiding this comment

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

In theory this should help, but I tried it and it didn't work. I have an idea that it only works with legacy pass manager, but I haven't checked it.

const bool enabledTiming = triton::tools::getBoolEnv("LLVM_ENABLE_TIMING");
if (enabledTiming) {
llvm::TimePassesIsEnabled = true;
llvm::TimePassesPerRun = true;
}
pm.run(module);
SmallString<0> timePassesStr;
raw_svector_ostream reportStream(timePassesStr);
if (enabledTiming) {
reportAndResetTimings(&reportStream);
llvm::dbgs() << reportStream.str();
timePassesStr.clear();
}

@anmyachev
Copy link
Contributor

@whitneywhtsang please take a look

Co-authored-by: Ettore Tiotto <ettore.tiotto@intel.com>
Co-authored-by: Whitney Tsang <whitney.tsang@intel.com>
@etiotto etiotto merged commit ac1b911 into main Jul 29, 2025
15 checks passed
@etiotto etiotto deleted the AndreyPavlenko-prof-doc branch July 29, 2025 19:51
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.

4 participants