-
Notifications
You must be signed in to change notification settings - Fork 1
[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
base: llvm-server-plugins
Are you sure you want to change the base?
Conversation
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.
There was a problem hiding this 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. |
There was a problem hiding this comment.
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
).
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ? ...
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.