static */
| 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, ¬ification]() { |
| 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) { |
nothing calls this directly
no test coverage detected