SWDEV-413997 - Fixing MGPU cases on PAL side by passing Global Context to virtual alloc.

Change-Id: I6614058d1456d199d710b12acd95160a79aa48c8
This commit is contained in:
kjayapra-amd
2023-10-23 11:31:33 -04:00
committed by Karthik Jayaprakash
parent 68d442f29a
commit ec010e4d2d
2 changed files with 10 additions and 21 deletions
+1 -1
View File
@@ -2395,7 +2395,7 @@ void Device::svmFree(void* ptr) const {
// ================================================================================================
void* Device::virtualAlloc(void* addr, size_t size, size_t alignment) {
// create a hidden buffer, which will allocated on the device later
auto mem = new (context()) amd::Buffer(context(), CL_MEM_VA_RANGE_AMD, size, addr);
auto mem = new (GlbCtx()) amd::Buffer(GlbCtx(), CL_MEM_VA_RANGE_AMD, size, addr);
if (mem == nullptr) {
LogError("failed to new a va range mem object!");
return nullptr;