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

Method GetKernelMetadata

tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:387–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387bool GpuExecutor::GetKernelMetadata(GpuKernel* cuda_kernel,
388 KernelMetadata* kernel_metadata) {
389 int value;
390 if (!GpuDriver::FuncGetAttribute(CU_FUNC_ATTRIBUTE_NUM_REGS,
391 *cuda_kernel->gpu_function_ptr(), &value)) {
392 return false;
393 }
394 kernel_metadata->set_registers_per_thread(value);
395
396 if (!GpuDriver::FuncGetAttribute(CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES,
397 *cuda_kernel->gpu_function_ptr(), &value)) {
398 return false;
399 }
400 kernel_metadata->set_shared_memory_bytes(value);
401
402 return true;
403}
404
405port::Status GpuExecutor::Launch(Stream* stream, const ThreadDim& thread_dims,
406 const BlockDim& block_dims,

Callers

nothing calls this directly

Calls 3

gpu_function_ptrMethod · 0.80

Tested by

no test coverage detected