@@ -205,28 +205,29 @@ int CeedRunKernelDim_Hip(Ceed ceed, hipFunction_t kernel, const int grid_size, c
205205// ------------------------------------------------------------------------------
206206// Run HIP kernel for spatial dimension with shared memory
207207// ------------------------------------------------------------------------------
208- static int CeedRunKernelDimSharedCore_Hip (Ceed ceed, hipFunction_t kernel, const int grid_size, const int block_size_x, const int block_size_y,
209- const int block_size_z, const int shared_mem_size, const bool throw_error, bool *is_good_run, void **args) {
210- hipError_t result = hipModuleLaunchKernel (kernel, grid_size, 1 , 1 , block_size_x, block_size_y, block_size_z, shared_mem_size, NULL , args, NULL );
208+ static int CeedRunKernelDimSharedCore_Hip (Ceed ceed, hipFunction_t kernel, hipStream_t stream, const int grid_size, const int block_size_x,
209+ const int block_size_y, const int block_size_z, const int shared_mem_size, const bool throw_error,
210+ bool *is_good_run, void **args) {
211+ hipError_t result = hipModuleLaunchKernel (kernel, grid_size, 1 , 1 , block_size_x, block_size_y, block_size_z, shared_mem_size, stream, args, NULL );
211212
212213 *is_good_run = result == hipSuccess;
213214 if (throw_error) CeedCallHip (ceed, result);
214215 return CEED_ERROR_SUCCESS;
215216}
216217
217- int CeedRunKernelDimShared_Hip (Ceed ceed, hipFunction_t kernel, const int grid_size , const int block_size_x , const int block_size_y ,
218- const int block_size_z, const int shared_mem_size, void **args) {
218+ int CeedRunKernelDimShared_Hip (Ceed ceed, hipFunction_t kernel, hipStream_t stream , const int grid_size , const int block_size_x ,
219+ const int block_size_y, const int block_size_z, const int shared_mem_size, void **args) {
219220 bool is_good_run = true ;
220221
221- CeedCallBackend (
222- CeedRunKernelDimSharedCore_Hip (ceed, kernel, grid_size, block_size_x, block_size_y, block_size_z, shared_mem_size, true , &is_good_run, args));
222+ CeedCallBackend (CeedRunKernelDimSharedCore_Hip (ceed, kernel, stream, grid_size, block_size_x, block_size_y, block_size_z, shared_mem_size, true ,
223+ &is_good_run, args));
223224 return CEED_ERROR_SUCCESS;
224225}
225226
226- int CeedTryRunKernelDimShared_Hip (Ceed ceed, hipFunction_t kernel, const int grid_size , const int block_size_x , const int block_size_y ,
227- const int block_size_z, const int shared_mem_size, bool *is_good_run, void **args) {
228- CeedCallBackend (
229- CeedRunKernelDimSharedCore_Hip (ceed, kernel, grid_size, block_size_x, block_size_y, block_size_z, shared_mem_size, false , is_good_run, args));
227+ int CeedTryRunKernelDimShared_Hip (Ceed ceed, hipFunction_t kernel, hipStream_t stream , const int grid_size , const int block_size_x ,
228+ const int block_size_y, const int block_size_z, const int shared_mem_size, bool *is_good_run, void **args) {
229+ CeedCallBackend (CeedRunKernelDimSharedCore_Hip (ceed, kernel, stream, grid_size, block_size_x, block_size_y, block_size_z, shared_mem_size, false ,
230+ is_good_run, args));
230231 return CEED_ERROR_SUCCESS;
231232}
232233
0 commit comments