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

Method GetModuleSymbol

tensorflow/stream_executor/cuda/cuda_driver.cc:694–711  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

692}
693
694/* static */ bool GpuDriver::GetModuleSymbol(GpuContext* context,
695 CUmodule module,
696 const char* symbol_name,
697 CUdeviceptr* dptr, size_t* bytes) {
698 ScopedActivateContext activated{context};
699 CHECK(module != nullptr && symbol_name != nullptr &&
700 (dptr != nullptr || bytes != nullptr));
701 CUresult res = cuModuleGetGlobal(dptr, bytes, module, symbol_name);
702 if (res != CUDA_SUCCESS) {
703 // symbol may not be found in the current module, but it may reside in
704 // another module.
705 VLOG(2) << "failed to get symbol \"" << symbol_name
706 << "\" from module: " << ToString(res);
707 return false;
708 }
709
710 return true;
711}
712
713/* static */ void GpuDriver::UnloadModule(GpuContext* context,
714 CUmodule module) {

Callers

nothing calls this directly

Calls 1

ToStringFunction · 0.70

Tested by

no test coverage detected