| 385 | } |
| 386 | |
| 387 | bool 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 | |
| 405 | port::Status GpuExecutor::Launch(Stream* stream, const ThreadDim& thread_dims, |
| 406 | const BlockDim& block_dims, |
nothing calls this directly
no test coverage detected