@@ -1333,10 +1333,7 @@ HWTEST_F(UnifiedSharedMemoryHWTest, givenDeviceUsmAllocationWhenWriteBufferThenC
1333
1333
char *cpuPtr = static_cast <char *>(gpuAllocation->getUnderlyingBuffer ());
1334
1334
auto gpuAddress = gpuAllocation->getGpuAddress ();
1335
1335
void *gpuPtr = reinterpret_cast <void *>(gpuAddress);
1336
- char *shiftedPtr = cpuPtr + 0x10 ;
1337
1336
auto gmmHelper = mockContext.getDevice (0 )->getGmmHelper ();
1338
- auto canonizedGpuAddress = gmmHelper->canonize (reinterpret_cast <uint64_t >(shiftedPtr));
1339
- gpuAllocation->setCpuPtrAndGpuAddress (shiftedPtr, canonizedGpuAddress);
1340
1337
1341
1338
cl_mem_flags flags = 0 ;
1342
1339
auto status = CL_INVALID_PLATFORM;
@@ -1347,7 +1344,7 @@ HWTEST_F(UnifiedSharedMemoryHWTest, givenDeviceUsmAllocationWhenWriteBufferThenC
1347
1344
myCmdQ.enqueueWriteBuffer (buffer, false , 0u , 4096u , deviceMemory, nullptr , 0u , nullptr , nullptr );
1348
1345
EXPECT_EQ (gpuPtr, myCmdQ.srcPtr );
1349
1346
1350
- canonizedGpuAddress = gmmHelper->canonize (gpuAddress);
1347
+ auto canonizedGpuAddress = gmmHelper->canonize (gpuAddress);
1351
1348
gpuAllocation->setCpuPtrAndGpuAddress (cpuPtr, canonizedGpuAddress);
1352
1349
delete buffer;
1353
1350
clMemFreeINTEL (&mockContext, deviceMemory);
@@ -1364,10 +1361,7 @@ HWTEST_F(UnifiedSharedMemoryHWTest, givenDeviceUsmAllocationWhenReadBufferThenCp
1364
1361
char *cpuPtr = static_cast <char *>(gpuAllocation->getUnderlyingBuffer ());
1365
1362
auto gpuAddress = gpuAllocation->getGpuAddress ();
1366
1363
void *gpuPtr = reinterpret_cast <void *>(gpuAddress);
1367
- char *shiftedPtr = cpuPtr + 0x10 ;
1368
1364
auto gmmHelper = mockContext.getDevice (0 )->getGmmHelper ();
1369
- auto canonizedGpuAddress = gmmHelper->canonize (reinterpret_cast <uint64_t >(shiftedPtr));
1370
- gpuAllocation->setCpuPtrAndGpuAddress (shiftedPtr, canonizedGpuAddress);
1371
1365
1372
1366
cl_mem_flags flags = 0 ;
1373
1367
auto status = CL_INVALID_PLATFORM;
@@ -1378,7 +1372,7 @@ HWTEST_F(UnifiedSharedMemoryHWTest, givenDeviceUsmAllocationWhenReadBufferThenCp
1378
1372
myCmdQ.enqueueReadBuffer (buffer, false , 0u , 4096u , deviceMemory, nullptr , 0u , nullptr , nullptr );
1379
1373
EXPECT_EQ (gpuPtr, myCmdQ.dstPtr );
1380
1374
1381
- canonizedGpuAddress = gmmHelper->canonize (gpuAddress);
1375
+ auto canonizedGpuAddress = gmmHelper->canonize (gpuAddress);
1382
1376
gpuAllocation->setCpuPtrAndGpuAddress (cpuPtr, canonizedGpuAddress);
1383
1377
delete buffer;
1384
1378
clMemFreeINTEL (&mockContext, deviceMemory);
0 commit comments