MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / LaunchKernel

Method LaunchKernel

tensorflow/stream_executor/rocm/rocm_driver.cc:431–451  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

429}
430
431/* static */ port::Status GpuDriver::LaunchKernel(
432 GpuContext* context, hipFunction_t function, unsigned int grid_dim_x,
433 unsigned int grid_dim_y, unsigned int grid_dim_z, unsigned int block_dim_x,
434 unsigned int block_dim_y, unsigned int block_dim_z,
435 unsigned int shared_mem_bytes, GpuStreamHandle stream, void** kernel_params,
436 void** extra) {
437 ScopedActivateContext activation{context};
438 VLOG(2) << "launching kernel: " << function << "; gdx: " << grid_dim_x
439 << " gdy: " << grid_dim_y << " gdz: " << grid_dim_z
440 << " bdx: " << block_dim_x << " bdy: " << block_dim_y
441 << " bdz: " << block_dim_z << " smem: " << shared_mem_bytes;
442 hipError_t res = tensorflow::wrap::hipModuleLaunchKernel(
443 function, grid_dim_x, grid_dim_y, grid_dim_z, block_dim_x, block_dim_y,
444 block_dim_z, shared_mem_bytes, stream, kernel_params, extra);
445 if (res != hipSuccess) {
446 return port::InternalError(
447 absl::StrCat("Failed to launch ROCM kernel: ", ToString(res)));
448 }
449 VLOG(2) << "successfully launched kernel";
450 return port::Status::OK();
451}
452
453/* static */ port::Status GpuDriver::LoadPtx(GpuContext* context,
454 const char* ptx_contents,

Callers

nothing calls this directly

Calls 3

ToStringFunction · 0.70
InternalErrorFunction · 0.50
StrCatFunction · 0.50

Tested by

no test coverage detected