| 39 | hipError_t ihipMallocManaged(void** ptr, size_t size, size_t align = 0, bool use_host_ptr = 0); |
| 40 | |
| 41 | hipError_t DynCO::loadCodeObject(const char* fname, const void* image) { |
| 42 | amd::ScopedLock lock(dclock_); |
| 43 | |
| 44 | // Number of devices = 1 in dynamic code object |
| 45 | fb_info_ = new FatBinaryInfo(fname, image); |
| 46 | std::vector<hip::Device*> devices = {g_devices[ihipGetDevice()]}; |
| 47 | IHIP_RETURN_ONFAIL(fb_info_->ExtractFatBinaryUsingCOMGR(devices)); |
| 48 | |
| 49 | // No Lazy loading for DynCO |
| 50 | IHIP_RETURN_ONFAIL(fb_info_->BuildProgram(ihipGetDevice())); |
| 51 | |
| 52 | module_ = fb_info_->Module(device_id_); |
| 53 | |
| 54 | // Define Global variables |
| 55 | IHIP_RETURN_ONFAIL(populateDynGlobalVars()); |
| 56 | |
| 57 | // Define Global functions |
| 58 | IHIP_RETURN_ONFAIL(populateDynGlobalFuncs()); |
| 59 | |
| 60 | return hipSuccess; |
| 61 | } |
| 62 | |
| 63 | // Dynamic Code Object |
| 64 | DynCO::~DynCO() { |
no test coverage detected