static */
| 676 | } |
| 677 | |
| 678 | /* static */ bool GpuDriver::GetModuleFunction(GpuContext* context, |
| 679 | CUmodule module, |
| 680 | const char* kernel_name, |
| 681 | CUfunction* function) { |
| 682 | ScopedActivateContext activated{context}; |
| 683 | CHECK(module != nullptr && kernel_name != nullptr); |
| 684 | CUresult res = cuModuleGetFunction(function, module, kernel_name); |
| 685 | if (res != CUDA_SUCCESS) { |
| 686 | LOG(ERROR) << "failed to get PTX kernel \"" << kernel_name |
| 687 | << "\" from module: " << ToString(res); |
| 688 | return false; |
| 689 | } |
| 690 | |
| 691 | return true; |
| 692 | } |
| 693 | |
| 694 | /* static */ bool GpuDriver::GetModuleSymbol(GpuContext* context, |
| 695 | CUmodule module, |
nothing calls this directly
no test coverage detected