SWDEV-408586 - set device active when malloc is called
Signed-off-by: sdashmiz <shadi.dashmiz@amd.com> Change-Id: Ib930d997b7d544d8b6fb42d2fea01fa8a4418e98
This commit is contained in:
@@ -290,6 +290,7 @@ hipError_t ihipMalloc(void** ptr, size_t sizeBytes, unsigned int flags)
|
||||
}
|
||||
|
||||
const auto& dev_info = amdContext->devices()[0]->info();
|
||||
hip::getCurrentDevice()->SetActiveStatus();
|
||||
|
||||
if ((!useHostDevice && (dev_info.maxMemAllocSize_ < sizeBytes)) ||
|
||||
(useHostDevice && (dev_info.maxPhysicalMemAllocSize_ < sizeBytes))) {
|
||||
|
||||
Reference in New Issue
Block a user