Fix typos:

preffered -> preferred
deffered -> deferred

Change-Id: I1b87861590c273d7fcda5bf0c5a772bf36e1bc74
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-06-25 10:49:29 +02:00
committed by sys_ocldev
parent c43759cc48
commit c6239968a5
10 changed files with 28 additions and 28 deletions

View File

@@ -11,6 +11,6 @@
using namespace NEO;
TEST(DeferredDeleterHelper, GivenDefferedDeleterHelperWhenCheckIFDeferrDeleterIsEnabledThenFalseIsReturned) {
TEST(DeferredDeleterHelper, GivenDeferredDeleterHelperWhenCheckIFDeferrDeleterIsEnabledThenFalseIsReturned) {
EXPECT_FALSE(isDeferredDeleterEnabled());
}

View File

@@ -31,7 +31,7 @@ struct MetricGroupDomains {
bool isActivated(const zet_metric_group_handle_t hMetricGroup);
protected:
bool activateMetricGroupDeffered(const zet_metric_group_handle_t hMetricGroup);
bool activateMetricGroupDeferred(const zet_metric_group_handle_t hMetricGroup);
bool activateEventMetricGroup(const zet_metric_group_handle_t hMetricGroup);
protected:
@@ -229,7 +229,7 @@ ze_result_t MetricGroupDomains::activateDeferred(const uint32_t count,
DEBUG_BREAK_IF(!phMetricGroups[i]);
// Try to associate it with a domain (oa, ...).
if (!activateMetricGroupDeffered(phMetricGroups[i])) {
if (!activateMetricGroupDeferred(phMetricGroups[i])) {
return ZE_RESULT_ERROR_UNKNOWN;
}
}
@@ -237,7 +237,7 @@ ze_result_t MetricGroupDomains::activateDeferred(const uint32_t count,
return ZE_RESULT_SUCCESS;
}
bool MetricGroupDomains::activateMetricGroupDeffered(const zet_metric_group_handle_t hMetricGroup) {
bool MetricGroupDomains::activateMetricGroupDeferred(const zet_metric_group_handle_t hMetricGroup) {
const auto properites = MetricGroup::getProperties(hMetricGroup);
const auto domain = properites.domain;

View File

@@ -603,7 +603,7 @@ bool CommandQueue::bufferCpuCopyAllowed(Buffer *buffer, cl_command_type commandT
}
//check if it is beneficial to do transfer on CPU
if (!buffer->isReadWriteOnCpuPreffered(ptr, size, getDevice())) {
if (!buffer->isReadWriteOnCpuPreferred(ptr, size, getDevice())) {
return false;
}

View File

@@ -564,7 +564,7 @@ bool Buffer::isReadWriteOnCpuAllowed(uint32_t rootDeviceIndex) {
return true;
}
bool Buffer::isReadWriteOnCpuPreffered(void *ptr, size_t size, const Device &device) {
bool Buffer::isReadWriteOnCpuPreferred(void *ptr, size_t size, const Device &device) {
auto graphicsAllocation = multiGraphicsAllocation.getGraphicsAllocation(device.getRootDeviceIndex());
if (MemoryPool::isSystemMemoryPool(graphicsAllocation->getMemoryPool())) {
//if buffer is not zero copy and pointer is aligned it will be more beneficial to do the transfer on GPU

View File

@@ -149,7 +149,7 @@ class Buffer : public MemObj {
void transferDataFromHostPtr(MemObjSizeArray &copySize, MemObjOffsetArray &copyOffset) override;
bool isReadWriteOnCpuAllowed(uint32_t rootDeviceIndex);
bool isReadWriteOnCpuPreffered(void *ptr, size_t size, const Device &device);
bool isReadWriteOnCpuPreferred(void *ptr, size_t size, const Device &device);
uint32_t getMocsValue(bool disableL3Cache, bool isReadOnlyArgument) const;
uint32_t getSurfaceSize(bool alignSizeForAuxTranslation) const;

View File

@@ -30,11 +30,11 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, givenRenderCompressedGmmWhenAskingForCpuOpe
auto unalignedPtr = ptrOffset(alignedPtr, 1);
EXPECT_EQ(1u, allocation->storageInfo.getNumBanks());
EXPECT_TRUE(buffer->isReadWriteOnCpuAllowed(rootDeviceIndex));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreffered(unalignedPtr, 1, *pDevice));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreferred(unalignedPtr, 1, *pDevice));
gmm->isRenderCompressed = true;
EXPECT_FALSE(buffer->isReadWriteOnCpuAllowed(rootDeviceIndex));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreffered(unalignedPtr, 1, *pDevice));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreferred(unalignedPtr, 1, *pDevice));
alignedFree(alignedPtr);
}
@@ -58,7 +58,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, GivenUnalignedReadPtrWhenReadingBufferThenM
bool aligned = (reinterpret_cast<uintptr_t>(unalignedReadPtr) & (MemoryConstants::cacheLineSize - 1)) == 0;
EXPECT_TRUE(!aligned || buffer->isMemObjZeroCopy());
ASSERT_TRUE(buffer->isReadWriteOnCpuAllowed(pCmdQ->getDevice().getRootDeviceIndex()));
ASSERT_TRUE(buffer->isReadWriteOnCpuPreffered(unalignedReadPtr, size, context->getDevice(0)->getDevice()));
ASSERT_TRUE(buffer->isReadWriteOnCpuPreferred(unalignedReadPtr, size, context->getDevice(0)->getDevice()));
retVal = EnqueueReadBufferHelper<>::enqueueReadBuffer(pCmdQ,
buffer.get(),
@@ -99,7 +99,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, GivenUnalignedSrcPtrWhenWritingBufferThenMe
bool aligned = (reinterpret_cast<uintptr_t>(unalignedWritePtr) & (MemoryConstants::cacheLineSize - 1)) == 0;
EXPECT_TRUE(!aligned || buffer->isMemObjZeroCopy());
ASSERT_TRUE(buffer->isReadWriteOnCpuAllowed(pCmdQ->getDevice().getRootDeviceIndex()));
ASSERT_TRUE(buffer->isReadWriteOnCpuPreffered(unalignedWritePtr, size, context->getDevice(0)->getDevice()));
ASSERT_TRUE(buffer->isReadWriteOnCpuPreferred(unalignedWritePtr, size, context->getDevice(0)->getDevice()));
retVal = EnqueueWriteBufferHelper<>::enqueueWriteBuffer(pCmdQ,
buffer.get(),
@@ -144,31 +144,31 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, GivenSpecificMemoryStructuresWhenReadingWri
EXPECT_TRUE(buffer->isMemObjZeroCopy());
// zeroCopy == true && aligned/unaligned hostPtr
EXPECT_TRUE(buffer->isReadWriteOnCpuPreffered(alignedHostPtr, MemoryConstants::cacheLineSize + 1, mockDevice->getDevice()));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreffered(unalignedHostPtr, MemoryConstants::cacheLineSize, mockDevice->getDevice()));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreferred(alignedHostPtr, MemoryConstants::cacheLineSize + 1, mockDevice->getDevice()));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreferred(unalignedHostPtr, MemoryConstants::cacheLineSize, mockDevice->getDevice()));
buffer.reset(Buffer::create(context, CL_MEM_USE_HOST_PTR, size, unalignedBufferPtr, retVal));
EXPECT_EQ(retVal, CL_SUCCESS);
// zeroCopy == false && unaligned hostPtr
EXPECT_TRUE(buffer->isReadWriteOnCpuPreffered(unalignedHostPtr, MemoryConstants::cacheLineSize, mockDevice->getDevice()));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreferred(unalignedHostPtr, MemoryConstants::cacheLineSize, mockDevice->getDevice()));
buffer.reset(Buffer::create(mockContext.get(), CL_MEM_USE_HOST_PTR, 1 * MB, smallBufferPtr, retVal));
// platform LP == true && size <= 10 MB
mockDevice->deviceInfo.platformLP = true;
EXPECT_TRUE(buffer->isReadWriteOnCpuPreffered(smallBufferPtr, 1 * MB, mockDevice->getDevice()));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreferred(smallBufferPtr, 1 * MB, mockDevice->getDevice()));
// platform LP == false && size <= 10 MB
mockDevice->deviceInfo.platformLP = false;
EXPECT_TRUE(buffer->isReadWriteOnCpuPreffered(smallBufferPtr, 1 * MB, mockDevice->getDevice()));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreferred(smallBufferPtr, 1 * MB, mockDevice->getDevice()));
buffer.reset(Buffer::create(mockContext.get(), CL_MEM_ALLOC_HOST_PTR, largeBufferSize, nullptr, retVal));
// platform LP == false && size > 10 MB
mockDevice->deviceInfo.platformLP = false;
EXPECT_TRUE(buffer->isReadWriteOnCpuPreffered(buffer->getCpuAddress(), largeBufferSize, mockDevice->getDevice()));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreferred(buffer->getCpuAddress(), largeBufferSize, mockDevice->getDevice()));
alignedFree(smallBufferPtr);
alignedFree(alignedHostPtr);
@@ -203,13 +203,13 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, GivenSpecificMemoryStructuresWhenReadingWri
EXPECT_EQ(retVal, CL_SUCCESS);
// zeroCopy == false && aligned hostPtr
EXPECT_FALSE(buffer->isReadWriteOnCpuPreffered(alignedHostPtr, MemoryConstants::cacheLineSize + 1, mockDevice->getDevice()));
EXPECT_FALSE(buffer->isReadWriteOnCpuPreferred(alignedHostPtr, MemoryConstants::cacheLineSize + 1, mockDevice->getDevice()));
buffer.reset(Buffer::create(mockContext.get(), CL_MEM_ALLOC_HOST_PTR, largeBufferSize, nullptr, retVal));
// platform LP == true && size > 10 MB
mockDevice->deviceInfo.platformLP = true;
EXPECT_FALSE(buffer->isReadWriteOnCpuPreffered(buffer->getCpuAddress(), largeBufferSize, mockDevice->getDevice()));
EXPECT_FALSE(buffer->isReadWriteOnCpuPreferred(buffer->getCpuAddress(), largeBufferSize, mockDevice->getDevice()));
alignedFree(alignedHostPtr);
alignedFree(alignedBufferPtr);
@@ -255,11 +255,11 @@ TEST(ReadWriteBufferOnCpu, givenNoHostPtrAndAlignedSizeWhenMemoryAllocationIsInN
ASSERT_NE(nullptr, buffer.get());
EXPECT_TRUE(buffer->isReadWriteOnCpuAllowed(device->getRootDeviceIndex()));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreffered(reinterpret_cast<void *>(0x1000), MemoryConstants::pageSize, device->getDevice()));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreferred(reinterpret_cast<void *>(0x1000), MemoryConstants::pageSize, device->getDevice()));
reinterpret_cast<MemoryAllocation *>(buffer->getGraphicsAllocation(device->getRootDeviceIndex()))->overrideMemoryPool(MemoryPool::SystemCpuInaccessible);
//read write on CPU is allowed, but not preffered. We can access this memory via Lock.
//read write on CPU is allowed, but not preferred. We can access this memory via Lock.
EXPECT_TRUE(buffer->isReadWriteOnCpuAllowed(device->getRootDeviceIndex()));
EXPECT_FALSE(buffer->isReadWriteOnCpuPreffered(reinterpret_cast<void *>(0x1000), MemoryConstants::pageSize, device->getDevice()));
EXPECT_FALSE(buffer->isReadWriteOnCpuPreferred(reinterpret_cast<void *>(0x1000), MemoryConstants::pageSize, device->getDevice()));
}
TEST(ReadWriteBufferOnCpu, givenPointerThatRequiresCpuCopyWhenCpuCopyIsEvaluatedThenTrueIsReturned) {
@@ -313,5 +313,5 @@ TEST(ReadWriteBufferOnCpu, whenLocalMemoryPoolAllocationIsAskedForPreferenceThen
reinterpret_cast<MemoryAllocation *>(buffer->getGraphicsAllocation(device->getRootDeviceIndex()))->overrideMemoryPool(MemoryPool::LocalMemory);
EXPECT_TRUE(buffer->isReadWriteOnCpuAllowed(device->getRootDeviceIndex()));
EXPECT_FALSE(buffer->isReadWriteOnCpuPreffered(reinterpret_cast<void *>(0x1000), MemoryConstants::pageSize, device->getDevice()));
EXPECT_FALSE(buffer->isReadWriteOnCpuPreferred(reinterpret_cast<void *>(0x1000), MemoryConstants::pageSize, device->getDevice()));
}

View File

@@ -12,12 +12,12 @@
using namespace NEO;
TEST(deferredDeleterHelper, DefferedDeleterIsDisabledWhenCheckIFDeferrDeleterIsEnabledThenCorrectValueReturned) {
TEST(deferredDeleterHelper, DeferredDeleterIsDisabledWhenCheckIFDeferrDeleterIsEnabledThenCorrectValueReturned) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.EnableDeferredDeleter.set(false);
EXPECT_FALSE(isDeferredDeleterEnabled());
}
TEST(deferredDeleterHelper, DefferedDeleterIsEnabledWhenCheckIFDeferrDeleterIsEnabledThenCorrectValueReturned) {
TEST(deferredDeleterHelper, DeferredDeleterIsEnabledWhenCheckIFDeferrDeleterIsEnabledThenCorrectValueReturned) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.EnableDeferredDeleter.set(true);
EXPECT_TRUE(isDeferredDeleterEnabled());

View File

@@ -585,7 +585,7 @@ TEST_F(KernelPrivateSurfaceTest, WhenChangingResidencyThenCsrResidencySizeIsUpda
delete pKernel;
}
TEST_F(KernelPrivateSurfaceTest, givenKernelWithPrivateSurfaceThatIsInUseByGpuWhenKernelIsBeingDestroyedThenAllocationIsAddedToDefferedFreeList) {
TEST_F(KernelPrivateSurfaceTest, givenKernelWithPrivateSurfaceThatIsInUseByGpuWhenKernelIsBeingDestroyedThenAllocationIsAddedToDeferredFreeList) {
auto pKernelInfo = std::make_unique<KernelInfo>();
SPatchAllocateStatelessPrivateSurface tokenSPS;
tokenSPS.SurfaceStateHeapOffset = 64;

View File

@@ -680,7 +680,7 @@ TEST_P(ProgramFromBinaryTest, givenProgramWhenCleanKernelInfoIsCalledThenKernelA
EXPECT_EQ(0u, pProgram->getNumKernels());
}
HWTEST_P(ProgramFromBinaryTest, givenProgramWhenCleanCurrentKernelInfoIsCalledButGpuIsNotYetDoneThenKernelAllocationIsPutOnDefferedFreeListAndCsrRegistersCacheFlush) {
HWTEST_P(ProgramFromBinaryTest, givenProgramWhenCleanCurrentKernelInfoIsCalledButGpuIsNotYetDoneThenKernelAllocationIsPutOnDeferredFreeListAndCsrRegistersCacheFlush) {
cl_device_id device = pClDevice;
auto &csr = pDevice->getGpgpuCommandStreamReceiver();
EXPECT_TRUE(csr.getTemporaryAllocations().peekIsEmpty());

View File

@@ -151,7 +151,7 @@ TEST_F(CompilerInterfaceTest, WhenCompilingToIsaThenSuccessIsReturned) {
EXPECT_EQ(TranslationOutput::ErrorCode::Success, err);
}
TEST_F(CompilerInterfaceTest, WhenPrefferedIntermediateRepresentationSpecifiedThenPreserveIt) {
TEST_F(CompilerInterfaceTest, WhenPreferredIntermediateRepresentationSpecifiedThenPreserveIt) {
TranslationOutput translationOutput;
inputArgs.preferredIntermediateType = IGC::CodeType::llvmLl;
auto err = pCompilerInterface->build(*pDevice, inputArgs, translationOutput);