-
Notifications
You must be signed in to change notification settings - Fork 93
[SYCLomatic] Add migration support for cudaKernelNodeParams, cudaKernelAddKernelNode, cudaGraphKernelNodeSetParams, cudaKernelNodeGetParams #2803
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: SYCLomatic
Are you sure you want to change the base?
Conversation
Signed-off-by: Daiyaan Ahmed <[email protected]>
Signed-off-by: Daiyaan Ahmed <[email protected]>
Signed-off-by: Daiyaan Ahmed <[email protected]>
Signed-off-by: Daiyaan Ahmed <[email protected]>
Signed-off-by: Daiyaan Ahmed <[email protected]>
Signed-off-by: Daiyaan Ahmed <[email protected]>
Signed-off-by: Daiyaan Ahmed <[email protected]>
39cb23a
to
14d7608
Compare
Signed-off-by: Daiyaan Ahmed <[email protected]>
Signed-off-by: Daiyaan Ahmed <[email protected]>
Signed-off-by: Daiyaan Ahmed <[email protected]>
Signed-off-by: Ahmed, Daiyaan <[email protected]>
Signed-off-by: Ahmed, Daiyaan <[email protected]>
Signed-off-by: Ahmed, Daiyaan <[email protected]>
Signed-off-by: Ahmed, Daiyaan <[email protected]>
Signed-off-by: Ahmed, Daiyaan <[email protected]>
Signed-off-by: Ahmed, Daiyaan <[email protected]>
dpct::experimental::node_ptr *dependencies, | ||
std::size_t numberOfDependencies, | ||
dpct::experimental::kernel_node_params *params) { | ||
node_graph_params_map[*node] = std::make_pair(graph, params); |
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.
Why need to save graph
, I don't see the usage.
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.
In Launch, we need to add the nodes to the graph using the graph.add({});
API
|
||
void instantiate(dpct::experimental::command_graph_exec_ptr *execGraph, | ||
dpct::experimental::command_graph_ptr graph) { | ||
exec_graph_map[*execGraph] = graph; |
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.
execGraph
is an out param, needs to be created in the function.
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.
execGraph cannot be created as a new node until cudaGraphLaunch. Do you recommend to create a fake node to return?
// Retrieve the graph associated with execGraph | ||
auto graph = exec_graph_map[execGraph]; | ||
auto &kernel_params_vector = graph_kernel_node_params_map[graph]; | ||
for (std::size_t i = 0; i < kernel_params_vector.size(); i++) { |
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.
Why add the kernel nodes when launch, not on add_kernel_node
called?
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.
During add_kernel_node
we do not have queue information. Queue information is needed to launch a host task on graph. So This PR adds the nodes in a vector during add_kernel_node
and actually adds them to the graph during launch
.
auto next_dependency = next_node_params->get_dependencies()[i]; | ||
next_node_params->update_dependency(next_dependency, new_node); | ||
} | ||
node_kernel_params_pair.first = new_node; |
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.
Where is the usage of new_node
?
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.
The new_node
is created and then assigned to the pointer address of the node passed in add_kernel_node
Signed-off-by: Ahmed, Daiyaan <[email protected]>
Signed-off-by: Ahmed, Daiyaan <[email protected]>
Signed-off-by: Ahmed, Daiyaan <[email protected]>
No description provided.