[SYCLomatic] Add migration support for cudaKernelNodeParams, cudaKernelAddKernelNode, cudaGraphKernelNodeSetParams, cudaKernelNodeGetParams#2803
Conversation
Signed-off-by: Daiyaan Ahmed <daiyaan.ahmed@intel.com>
Signed-off-by: Daiyaan Ahmed <daiyaan.ahmed@intel.com>
39cb23a to
14d7608
Compare
Signed-off-by: Daiyaan Ahmed <daiyaan.ahmed@intel.com>
Signed-off-by: Daiyaan Ahmed <daiyaan.ahmed@intel.com>
Signed-off-by: Daiyaan Ahmed <daiyaan.ahmed@intel.com>
Signed-off-by: Ahmed, Daiyaan <daiyaan.ahmed@intel.com>
Signed-off-by: Ahmed, Daiyaan <daiyaan.ahmed@intel.com>
Signed-off-by: Ahmed, Daiyaan <daiyaan.ahmed@intel.com>
Signed-off-by: Ahmed, Daiyaan <daiyaan.ahmed@intel.com>
Signed-off-by: Ahmed, Daiyaan <daiyaan.ahmed@intel.com>
Signed-off-by: Ahmed, Daiyaan <daiyaan.ahmed@intel.com>
| 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.
Why need to save graph, I don't see the usage.
There was a problem hiding this comment.
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.
execGraph is an out param, needs to be created in the function.
There was a problem hiding this comment.
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.
Why add the kernel nodes when launch, not on add_kernel_node called?
There was a problem hiding this comment.
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.
Where is the usage of new_node?
There was a problem hiding this comment.
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 <daiyaan.ahmed@intel.com>
Signed-off-by: Ahmed, Daiyaan <daiyaan.ahmed@intel.com>
Signed-off-by: Ahmed, Daiyaan <daiyaan.ahmed@intel.com>
No description provided.