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

MIEngine: Disable individual info threads call for each thread created #1460

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

Conversation

intel-rganesh
Copy link
Contributor

Changes to disable info thread for each created thread to expedite GPU
debugging. GPUs are likely to have 1000s of threads and calling thread
info for each thread created is very time consuming.
We call SetThreadInfoFromResultValue from CollectThreadInfo when we
get thread context.

Signed-off-by: intel-rganesh [email protected]

IGDB-3452: Changes to disable info thread for each created thread
to get L0 working fast.

Signed-off-by: intel-rganesh [email protected]
@gregg-miskelly
Copy link
Member

gregg-miskelly commented Aug 8, 2024

There are at least parts of this change that we don't want for CPU debugging -- with this change we will no longer raise up thread create events to the rest of the debugger when GDB raises a thread create, which would be a user-visible change at the least, and I am not sure if it would break other things that expect to get thread create events live.

For GPU debugging, I am also a bit worried this change isn't enough -- we will still wind up creating thread objects in the UI for all the GPU threads. Is that actually usable in either VS or VS Code? For example in the VS Code call stack window, or in VS in the parallel stacks, or threads window? I would have thought you would just want to show a small number (maybe just 1 virtual thread?) with some custom UI to select the thread.

@intel-rganesh
Copy link
Contributor Author

For GPU debugging, the changes are to ensure we do not call thread-info for each thread. The thread created event is still called.
Any NewThread should be added during GetThreadContext.
I do see the Thread window and Parallel Stacks working fine (although it is slow).

image

Our use case is to show all the stopped GPU threads (similar to Threads in VS), lanes, be able to switch to different GPU threads/lanes and inspect variables.

The views function when we exit the kernel code and step in the CPU as well.

image

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