Skip to content
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

Add compile-time coverage for compiled code #9508

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sklam
Copy link
Member

@sklam sklam commented Mar 20, 2024

Let Lower gather coverage during compilation and write to active Coverage object.

It will use "numba_compiled" context to mark the lines visited by the compiler:

Screenshot 2024-03-20 at 3 33 02 PM

@tasansal
Copy link

tasansal commented Mar 23, 2024

Looking forward to this! Thanks for working on it! Will this make our numba code coverage on downstream libraries as well?

@sklam sklam changed the title Add coverage for compiled code Add compile-time coverage for compiled code Mar 25, 2024
@sklam
Copy link
Member Author

sklam commented Mar 25, 2024

Note that this is code coverage reported during compile-time, and not runtime code coverage, which I still cannot find a efficient way to do.

Will this make our numba code coverage on downstream libraries as well?

Yes, it works as long as the Numba can see an active coverage.Coverage object during compilation.

Lowering will report visited line to active Coverage object.
@sklam sklam mentioned this pull request Apr 4, 2024
@sklam sklam marked this pull request as ready for review April 10, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants