Skip to content

[LLDB][GPU] Add a GPUActions option for sync initialization #17

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

Open
wants to merge 1 commit into
base: llvm-server-plugins
Choose a base branch
from

Conversation

walter-erquinigo
Copy link
Collaborator

I'm experimenting with initializating asynchronously and I think it's a good idea to make sync initialization an option in the GPU Actions. Given that AMD was using this by default, I modified it accordingly.

I'm experimenting with initializating asynchronously and I think it's a
good idea to make sync initialization an option in the GPU Actions.
Given that AMD was using this by default, I modified it accordingly.
Copy link
Collaborator

@dmpots dmpots left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -190,6 +190,10 @@ struct GPUActions {
/// Set this to true if the native plug-in sync with the GPU process and wait
/// for it to return to a running state.
bool wait_for_gpu_process_to_resume = false;
/// Set this to true if the native plug-in should wait synchronously for the
/// GPU process to initialize. This should be true if
/// `wait_for_gpu_process_to_resume` is set to true as part of initialization.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add an assert or some error checking to validate the comment here (i.e. that if wait_for_gpu_process_to_resume == true then wait_synchronously_for_gpu_to_initialize == true).

Copy link
Owner

Choose a reason for hiding this comment

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

This should be part of the GPUPluginConnectionInfo structure and should added as:

/// Synchronously wait for the GPU to initialize when connecting.
bool synchronous;

@@ -190,6 +190,10 @@ struct GPUActions {
/// Set this to true if the native plug-in sync with the GPU process and wait
/// for it to return to a running state.
bool wait_for_gpu_process_to_resume = false;
/// Set this to true if the native plug-in should wait synchronously for the
/// GPU process to initialize. This should be true if
/// `wait_for_gpu_process_to_resume` is set to true as part of initialization.
Copy link
Owner

Choose a reason for hiding this comment

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

This should be part of the GPUPluginConnectionInfo structure and should added as:

/// Synchronously wait for the GPU to initialize when connecting.
bool synchronous;

connection_info.connect_url, GetPluginNameStatic(), debugger,
*debugger.GetAsyncOutputStream(), gpu_target_sp.get(), error);
ProcessSP process_sp =
gpu_action.wait_synchronously_for_gpu_to_initialize
Copy link
Owner

Choose a reason for hiding this comment

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

Get this bool from connection_info:

connection_info.synchronous ? ...

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