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

Method LoadHsaco

tensorflow/stream_executor/rocm/rocm_driver.cc:467–492  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

465}
466
467/* static */ bool GpuDriver::LoadHsaco(GpuContext* context,
468 const char* hsaco_contents,
469 hipModule_t* module) {
470 absl::Notification notification;
471 bool ret = true;
472 GetDriverExecutor()->Schedule(
473 [context, hsaco_contents, module, &ret, &notification]() {
474 ScopedActivateContext activation{context};
475 void* hsaco_data = const_cast<char*>(hsaco_contents);
476
477 hipError_t res =
478 tensorflow::wrap::hipModuleLoadData(module, hsaco_data);
479
480 if (res != hipSuccess) {
481 LOG(ERROR) << "failed to load HSACO: " << ToString(res);
482 ret = false;
483 notification.Notify();
484 }
485
486 CHECK(module != nullptr);
487 notification.Notify();
488 });
489 notification.WaitForNotification();
490
491 return ret;
492}
493
494/* static */ port::Status GpuDriver::SynchronousMemsetUint8(
495 GpuContext* context, hipDeviceptr_t location, uint8 value, size_t size) {

Callers

nothing calls this directly

Calls 5

GetDriverExecutorFunction · 0.70
ToStringFunction · 0.70
ScheduleMethod · 0.45
NotifyMethod · 0.45
WaitForNotificationMethod · 0.45

Tested by

no test coverage detected