Skip to content

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
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