Skip to content

Fix codeinstance mapping when using nested interpretation#755

Merged
wsmoses merged 6 commits intomasterfrom
cini
Jan 18, 2026
Merged

Fix codeinstance mapping when using nested interpretation#755
wsmoses merged 6 commits intomasterfrom
cini

Conversation

@wsmoses
Copy link
Member

@wsmoses wsmoses commented Jan 16, 2026

see #754

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

Your PR no longer requires formatting changes. Thank you for your contribution!

@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

❌ Patch coverage is 55.55556% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.54%. Comparing base (e2d8505) to head (6fb410a).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/jlgen.jl 55.55% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #755      +/-   ##
==========================================
- Coverage   74.75%   73.54%   -1.22%     
==========================================
  Files          24       24              
  Lines        3672     3791     +119     
==========================================
+ Hits         2745     2788      +43     
- Misses        927     1003      +76     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +835 to +837
if llvm_func_idx[] == -1
continue
end
Copy link
Member

Choose a reason for hiding this comment

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

Add a comment here.

@maleadt
Copy link
Member

maleadt commented Jan 18, 2026

That said, all this complexity is there to be able to populate the compilation database. If we're fine with simply passing the entry-point CI to jl_get_function_id and extracting its name so that we can identify the entry point, we should be able to use the generated IR without having to correlated every mi/ci/function. And AFAIU none of the actual GPU back-ends uses the compilation database.

Can this be simplified on the Enzyme.jl end? Why does it need exact correlation between LLVM functions and their MI/CI?

@wsmoses
Copy link
Member Author

wsmoses commented Jan 18, 2026

No we need to retain the MI for each llvm function in order to determine where to apply custom rules, what types correspond to which LLVM args/instructions, among other things.

@wsmoses wsmoses merged commit 749a3e4 into master Jan 18, 2026
38 checks passed
@wsmoses wsmoses deleted the cini branch January 18, 2026 19:04
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