mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Enable 64kb pages when its allowed by platform
Change-Id: I10f02bd83beabeff929e16c7293324b81bfed054
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
#include "runtime/command_queue/command_queue.h"
|
||||
#include "runtime/device/device.h"
|
||||
#include "runtime/memory_manager/svm_memory_manager.h"
|
||||
|
||||
using namespace OCLRT;
|
||||
|
||||
@@ -108,8 +109,12 @@ TEST_F(clEnqueueSVMMigrateMemTests, invalidValue_NonZeroSizeIsNotContainedWithin
|
||||
void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4);
|
||||
ASSERT_NE(nullptr, ptrSvm);
|
||||
|
||||
auto svmAlloc = pContext->getSVMAllocsManager()->getSVMAlloc(ptrSvm);
|
||||
EXPECT_NE(nullptr, svmAlloc);
|
||||
size_t allocSize = svmAlloc->getUnderlyingBufferSize();
|
||||
|
||||
const void *svmPtrs[] = {ptrSvm};
|
||||
const size_t sizes[] = {256 + 1};
|
||||
const size_t sizes[] = {allocSize + 1};
|
||||
auto retVal = clEnqueueSVMMigrateMem(
|
||||
pCommandQueue, // cl_command_queue command_queue
|
||||
1, // cl_uint num_svm_pointers
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "runtime/memory_manager/svm_memory_manager.h"
|
||||
#include "cl_api_tests.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
#include "unit_tests/mocks/mock_kernel.h"
|
||||
@@ -193,8 +194,10 @@ TEST_F(clSetKernelArgSVMPointer_, SetKernelArgSVMPointerWithOffset_invalidArgVal
|
||||
const DeviceInfo &devInfo = pDevice->getDeviceInfo();
|
||||
if (devInfo.svmCapabilities != 0) {
|
||||
void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4);
|
||||
size_t offset = alignUp(512, MemoryConstants::pageSize) + 1;
|
||||
EXPECT_NE(nullptr, ptrSvm);
|
||||
auto svmAlloc = pContext->getSVMAllocsManager()->getSVMAlloc(ptrSvm);
|
||||
EXPECT_NE(nullptr, svmAlloc);
|
||||
|
||||
size_t offset = svmAlloc->getUnderlyingBufferSize() + 1;
|
||||
|
||||
auto retVal = clSetKernelArgSVMPointer(
|
||||
pMockKernel, // cl_kernel kernel
|
||||
|
||||
Reference in New Issue
Block a user