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

Fix profiler to report time spent on GPU kernels again instead of on 'wait for parallel tasks'. #8453

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

mcourteaux
Copy link
Contributor

@mcourteaux mcourteaux commented Nov 4, 2024

So instead of suspend_thread() while waiting for a GPU kernel to complete, which decrements the active thread count and sets the current func to "wait for parallel tasks", this PR now only decrements the active number of threads, such that the current function is still the Func that the kernel is actually producing. As such, you can see the time spent on that kernel, but still see that it was done by 0 threads, indicating it was the GPU that took care of it.

Also don't report the "wait for parallel tasks" if it doesn't contain any time, like for overhead.

Additional drive-by typo fix.

@steven-johnson
Copy link
Contributor

We should extract the LLVM fix and land it separately

@mcourteaux
Copy link
Contributor Author

mcourteaux commented Nov 4, 2024

I'll make separate PR. It's here: #8454. @steven-johnson

Copy link
Member

@abadams abadams left a comment

Choose a reason for hiding this comment

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

Looks good to me. Feel free to merge once the bots are all green.

@mcourteaux mcourteaux merged commit 9ba1829 into halide:main Nov 4, 2024
19 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.

3 participants