Skip to content

Commit b6e6299

Browse files
test OCL: correct test for device USM
Related-To: NEO-7737 Signed-off-by: Mateusz Jablonski <[email protected]> Source: 8cb4faf
1 parent 8e438f4 commit b6e6299

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

opencl/test/unit_test/memory_manager/unified_memory_manager_tests.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,10 +1333,7 @@ HWTEST_F(UnifiedSharedMemoryHWTest, givenDeviceUsmAllocationWhenWriteBufferThenC
13331333
char *cpuPtr = static_cast<char *>(gpuAllocation->getUnderlyingBuffer());
13341334
auto gpuAddress = gpuAllocation->getGpuAddress();
13351335
void *gpuPtr = reinterpret_cast<void *>(gpuAddress);
1336-
char *shiftedPtr = cpuPtr + 0x10;
13371336
auto gmmHelper = mockContext.getDevice(0)->getGmmHelper();
1338-
auto canonizedGpuAddress = gmmHelper->canonize(reinterpret_cast<uint64_t>(shiftedPtr));
1339-
gpuAllocation->setCpuPtrAndGpuAddress(shiftedPtr, canonizedGpuAddress);
13401337

13411338
cl_mem_flags flags = 0;
13421339
auto status = CL_INVALID_PLATFORM;
@@ -1347,7 +1344,7 @@ HWTEST_F(UnifiedSharedMemoryHWTest, givenDeviceUsmAllocationWhenWriteBufferThenC
13471344
myCmdQ.enqueueWriteBuffer(buffer, false, 0u, 4096u, deviceMemory, nullptr, 0u, nullptr, nullptr);
13481345
EXPECT_EQ(gpuPtr, myCmdQ.srcPtr);
13491346

1350-
canonizedGpuAddress = gmmHelper->canonize(gpuAddress);
1347+
auto canonizedGpuAddress = gmmHelper->canonize(gpuAddress);
13511348
gpuAllocation->setCpuPtrAndGpuAddress(cpuPtr, canonizedGpuAddress);
13521349
delete buffer;
13531350
clMemFreeINTEL(&mockContext, deviceMemory);
@@ -1364,10 +1361,7 @@ HWTEST_F(UnifiedSharedMemoryHWTest, givenDeviceUsmAllocationWhenReadBufferThenCp
13641361
char *cpuPtr = static_cast<char *>(gpuAllocation->getUnderlyingBuffer());
13651362
auto gpuAddress = gpuAllocation->getGpuAddress();
13661363
void *gpuPtr = reinterpret_cast<void *>(gpuAddress);
1367-
char *shiftedPtr = cpuPtr + 0x10;
13681364
auto gmmHelper = mockContext.getDevice(0)->getGmmHelper();
1369-
auto canonizedGpuAddress = gmmHelper->canonize(reinterpret_cast<uint64_t>(shiftedPtr));
1370-
gpuAllocation->setCpuPtrAndGpuAddress(shiftedPtr, canonizedGpuAddress);
13711365

13721366
cl_mem_flags flags = 0;
13731367
auto status = CL_INVALID_PLATFORM;
@@ -1378,7 +1372,7 @@ HWTEST_F(UnifiedSharedMemoryHWTest, givenDeviceUsmAllocationWhenReadBufferThenCp
13781372
myCmdQ.enqueueReadBuffer(buffer, false, 0u, 4096u, deviceMemory, nullptr, 0u, nullptr, nullptr);
13791373
EXPECT_EQ(gpuPtr, myCmdQ.dstPtr);
13801374

1381-
canonizedGpuAddress = gmmHelper->canonize(gpuAddress);
1375+
auto canonizedGpuAddress = gmmHelper->canonize(gpuAddress);
13821376
gpuAllocation->setCpuPtrAndGpuAddress(cpuPtr, canonizedGpuAddress);
13831377
delete buffer;
13841378
clMemFreeINTEL(&mockContext, deviceMemory);

0 commit comments

Comments
 (0)