Correct misspelled identifiers.

Change-Id: Ifa629c0d6bb1b04b5cfde908f2672ef1843043f0
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
This commit is contained in:
Piotr Fusik
2019-07-17 17:45:52 +02:00
parent ca26cb7044
commit a141911e19
12 changed files with 25 additions and 40 deletions

View File

@@ -90,7 +90,7 @@ void Context::overrideSpecialQueueAndDecrementRefCount(CommandQueue *commandQueu
this->decRefInternal(); this->decRefInternal();
}; };
bool Context::areMultiStorageAllocationsPreffered() { bool Context::areMultiStorageAllocationsPreferred() {
return this->contextType != ContextType::CONTEXT_TYPE_SPECIALIZED; return this->contextType != ContextType::CONTEXT_TYPE_SPECIALIZED;
} }

View File

@@ -122,7 +122,7 @@ class Context : public BaseObject<_cl_context> {
bool getInteropUserSyncEnabled() { return interopUserSync; } bool getInteropUserSyncEnabled() { return interopUserSync; }
void setInteropUserSyncEnabled(bool enabled) { interopUserSync = enabled; } void setInteropUserSyncEnabled(bool enabled) { interopUserSync = enabled; }
bool areMultiStorageAllocationsPreffered(); bool areMultiStorageAllocationsPreferred();
ContextType peekContextType() { return this->contextType; } ContextType peekContextType() { return this->contextType; }

View File

@@ -76,7 +76,7 @@ Kernel::Kernel(Program *programArg, const KernelInfo &kernelInfoArg, const Devic
workDim(&Kernel::dummyPatchLocation), workDim(&Kernel::dummyPatchLocation),
dataParameterSimdSize(&Kernel::dummyPatchLocation), dataParameterSimdSize(&Kernel::dummyPatchLocation),
parentEventOffset(&Kernel::dummyPatchLocation), parentEventOffset(&Kernel::dummyPatchLocation),
prefferedWkgMultipleOffset(&Kernel::dummyPatchLocation), preferredWkgMultipleOffset(&Kernel::dummyPatchLocation),
slmTotalSize(kernelInfoArg.workloadInfo.slmStaticSize), slmTotalSize(kernelInfoArg.workloadInfo.slmStaticSize),
isBuiltIn(false), isBuiltIn(false),
isParentKernel((kernelInfoArg.patchInfo.executionEnvironment != nullptr) ? (kernelInfoArg.patchInfo.executionEnvironment->HasDeviceEnqueue != 0) : false), isParentKernel((kernelInfoArg.patchInfo.executionEnvironment != nullptr) ? (kernelInfoArg.patchInfo.executionEnvironment->HasDeviceEnqueue != 0) : false),
@@ -225,11 +225,11 @@ cl_int Kernel::initialize() {
workDim = workloadInfo.workDimOffset != WorkloadInfo::undefinedOffset ? ptrOffset(crossThread, workloadInfo.workDimOffset) : workDim; workDim = workloadInfo.workDimOffset != WorkloadInfo::undefinedOffset ? ptrOffset(crossThread, workloadInfo.workDimOffset) : workDim;
dataParameterSimdSize = workloadInfo.simdSizeOffset != WorkloadInfo::undefinedOffset ? ptrOffset(crossThread, workloadInfo.simdSizeOffset) : dataParameterSimdSize; dataParameterSimdSize = workloadInfo.simdSizeOffset != WorkloadInfo::undefinedOffset ? ptrOffset(crossThread, workloadInfo.simdSizeOffset) : dataParameterSimdSize;
parentEventOffset = workloadInfo.parentEventOffset != WorkloadInfo::undefinedOffset ? ptrOffset(crossThread, workloadInfo.parentEventOffset) : parentEventOffset; parentEventOffset = workloadInfo.parentEventOffset != WorkloadInfo::undefinedOffset ? ptrOffset(crossThread, workloadInfo.parentEventOffset) : parentEventOffset;
prefferedWkgMultipleOffset = workloadInfo.prefferedWkgMultipleOffset != WorkloadInfo::undefinedOffset ? ptrOffset(crossThread, workloadInfo.prefferedWkgMultipleOffset) : prefferedWkgMultipleOffset; preferredWkgMultipleOffset = workloadInfo.preferredWkgMultipleOffset != WorkloadInfo::undefinedOffset ? ptrOffset(crossThread, workloadInfo.preferredWkgMultipleOffset) : preferredWkgMultipleOffset;
*maxWorkGroupSize = static_cast<uint32_t>(device.getDeviceInfo().maxWorkGroupSize); *maxWorkGroupSize = static_cast<uint32_t>(device.getDeviceInfo().maxWorkGroupSize);
*dataParameterSimdSize = getKernelInfo().getMaxSimdSize(); *dataParameterSimdSize = getKernelInfo().getMaxSimdSize();
*prefferedWkgMultipleOffset = getKernelInfo().getMaxSimdSize(); *preferredWkgMultipleOffset = getKernelInfo().getMaxSimdSize();
*parentEventOffset = WorkloadInfo::invalidParentEvent; *parentEventOffset = WorkloadInfo::invalidParentEvent;
} }

View File

@@ -331,7 +331,7 @@ class Kernel : public BaseObject<_cl_kernel> {
uint32_t *workDim; uint32_t *workDim;
uint32_t *dataParameterSimdSize; uint32_t *dataParameterSimdSize;
uint32_t *parentEventOffset; uint32_t *parentEventOffset;
uint32_t *prefferedWkgMultipleOffset; uint32_t *preferredWkgMultipleOffset;
static uint32_t dummyPatchLocation; static uint32_t dummyPatchLocation;

View File

@@ -215,7 +215,7 @@ Buffer *Buffer::create(Context *context,
} }
if (!memory) { if (!memory) {
AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(properties, allocateMemory, size, allocationType, context->areMultiStorageAllocationsPreffered()); AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(properties, allocateMemory, size, allocationType, context->areMultiStorageAllocationsPreferred());
memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties, hostPtr); memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties, hostPtr);
} }
@@ -228,7 +228,7 @@ Buffer *Buffer::create(Context *context,
allocationType = GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY; allocationType = GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY;
zeroCopyAllowed = false; zeroCopyAllowed = false;
copyMemoryFromHostPtr = true; copyMemoryFromHostPtr = true;
AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(properties, true, size, allocationType, context->areMultiStorageAllocationsPreffered()); AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(properties, true, size, allocationType, context->areMultiStorageAllocationsPreferred());
memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties); memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties);
} }

View File

@@ -49,7 +49,7 @@ struct WorkloadInfo {
uint32_t slmStaticSize = 0; uint32_t slmStaticSize = 0;
uint32_t simdSizeOffset; uint32_t simdSizeOffset;
uint32_t parentEventOffset; uint32_t parentEventOffset;
uint32_t prefferedWkgMultipleOffset; uint32_t preferredWkgMultipleOffset;
static const uint32_t undefinedOffset; static const uint32_t undefinedOffset;
static const uint32_t invalidParentEvent; static const uint32_t invalidParentEvent;
@@ -77,7 +77,7 @@ struct WorkloadInfo {
workDimOffset = undefinedOffset; workDimOffset = undefinedOffset;
simdSizeOffset = undefinedOffset; simdSizeOffset = undefinedOffset;
parentEventOffset = undefinedOffset; parentEventOffset = undefinedOffset;
prefferedWkgMultipleOffset = undefinedOffset; preferredWkgMultipleOffset = undefinedOffset;
} }
}; };

View File

@@ -383,7 +383,7 @@ cl_int Program::parsePatchList(KernelInfo &kernelInfo, uint32_t kernelNum) {
break; break;
case DATA_PARAMETER_PREFERRED_WORKGROUP_MULTIPLE: case DATA_PARAMETER_PREFERRED_WORKGROUP_MULTIPLE:
DBG_LOG(LogPatchTokens, "\n .Type", "PREFERRED_WORKGROUP_MULTIPLE"); DBG_LOG(LogPatchTokens, "\n .Type", "PREFERRED_WORKGROUP_MULTIPLE");
kernelInfo.workloadInfo.prefferedWkgMultipleOffset = pDataParameterBuffer->Offset; kernelInfo.workloadInfo.preferredWkgMultipleOffset = pDataParameterBuffer->Offset;
break; break;
case DATA_PARAMETER_BUFFER_OFFSET: case DATA_PARAMETER_BUFFER_OFFSET:
DBG_LOG(LogPatchTokens, "\n .Type", "DATA_PARAMETER_BUFFER_OFFSET"); DBG_LOG(LogPatchTokens, "\n .Type", "DATA_PARAMETER_BUFFER_OFFSET");

View File

@@ -364,11 +364,11 @@ TEST(DefaultContext, givenDefaultContextWhenItIsQueriedForTypeThenDefaultTypeIsR
TEST(Context, givenContextWhenCheckIfAllocationsAreMultiStorageThenReturnProperValueAccordingToContextType) { TEST(Context, givenContextWhenCheckIfAllocationsAreMultiStorageThenReturnProperValueAccordingToContextType) {
MockContext context; MockContext context;
EXPECT_TRUE(context.areMultiStorageAllocationsPreffered()); EXPECT_TRUE(context.areMultiStorageAllocationsPreferred());
context.setContextType(ContextType::CONTEXT_TYPE_SPECIALIZED); context.setContextType(ContextType::CONTEXT_TYPE_SPECIALIZED);
EXPECT_FALSE(context.areMultiStorageAllocationsPreffered()); EXPECT_FALSE(context.areMultiStorageAllocationsPreferred());
context.setContextType(ContextType::CONTEXT_TYPE_UNRESTRICTIVE); context.setContextType(ContextType::CONTEXT_TYPE_UNRESTRICTIVE);
EXPECT_TRUE(context.areMultiStorageAllocationsPreffered()); EXPECT_TRUE(context.areMultiStorageAllocationsPreferred());
} }

View File

@@ -126,7 +126,7 @@ TEST(GetDeviceInfo, simultaneousInterops) {
EXPECT_TRUE(memcmp(value, &device->simultaneousInterops[0], 4u * sizeof(cl_uint)) == 0); EXPECT_TRUE(memcmp(value, &device->simultaneousInterops[0], 4u * sizeof(cl_uint)) == 0);
} }
TEST(GetDeviceInfo, prefferedInteropUserSync) { TEST(GetDeviceInfo, preferredInteropUserSync) {
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr)); auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
cl_bool value = 0; cl_bool value = 0;

View File

@@ -114,7 +114,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueTest, createDeviceQueuesWhenMultipleDevic
typedef DeviceQueueTest DeviceQueueBuffer; typedef DeviceQueueTest DeviceQueueBuffer;
HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueBuffer, setPrefferedSizeWhenNoPropertyGiven) { HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueBuffer, setPreferredSizeWhenNoPropertyGiven) {
auto &deviceInfo = device->getDeviceInfo(); auto &deviceInfo = device->getDeviceInfo();
deviceQueue = createQueueObject(); // only minimal properties deviceQueue = createQueueObject(); // only minimal properties
ASSERT_NE(deviceQueue, nullptr); ASSERT_NE(deviceQueue, nullptr);
@@ -122,7 +122,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueBuffer, setPrefferedSizeWhenNoPropertyGiv
deviceQueue->release(); deviceQueue->release();
} }
HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueBuffer, setPrefferedSizeWhenInvalidPropertyGiven) { HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueBuffer, setPreferredSizeWhenInvalidPropertyGiven) {
cl_queue_properties properties[5] = {CL_QUEUE_PROPERTIES, deviceQueueProperties::minimumProperties[1], cl_queue_properties properties[5] = {CL_QUEUE_PROPERTIES, deviceQueueProperties::minimumProperties[1],
CL_QUEUE_SIZE, 0, 0}; CL_QUEUE_SIZE, 0, 0};
auto &deviceInfo = device->getDeviceInfo(); auto &deviceInfo = device->getDeviceInfo();

View File

@@ -2270,18 +2270,18 @@ TEST_F(KernelCrossThreadTests, givenKernelWithPrivateMemoryWhenItIsCreatedThenCu
delete kernel; delete kernel;
} }
TEST_F(KernelCrossThreadTests, givenKernelWithPrefferedWkgMultipleWhenItIsCreatedThenCurbeIsPatchedProperly) { TEST_F(KernelCrossThreadTests, givenKernelWithPreferredWkgMultipleWhenItIsCreatedThenCurbeIsPatchedProperly) {
pKernelInfo->workloadInfo.prefferedWkgMultipleOffset = 8; pKernelInfo->workloadInfo.preferredWkgMultipleOffset = 8;
MockKernel *kernel = new MockKernel(program.get(), *pKernelInfo, *pDevice); MockKernel *kernel = new MockKernel(program.get(), *pKernelInfo, *pDevice);
kernel->initialize(); kernel->initialize();
auto *crossThread = kernel->getCrossThreadData(); auto *crossThread = kernel->getCrossThreadData();
uint32_t *prefferedWkgMultipleOffset = (uint32_t *)ptrOffset(crossThread, 8); uint32_t *preferredWkgMultipleOffset = (uint32_t *)ptrOffset(crossThread, 8);
EXPECT_EQ(pKernelInfo->getMaxSimdSize(), *prefferedWkgMultipleOffset); EXPECT_EQ(pKernelInfo->getMaxSimdSize(), *preferredWkgMultipleOffset);
delete kernel; delete kernel;
} }

View File

@@ -1,23 +1,8 @@
/* /*
* Copyright (c) 2017, Intel Corporation * Copyright (C) 2017-2019 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * SPDX-License-Identifier: MIT
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "unit_tests/fixtures/kernel_data_fixture.h" #include "unit_tests/fixtures/kernel_data_fixture.h"
@@ -116,7 +101,7 @@ TEST_F(KernelDataTest, GIVENdataParameterParentEventWHENdecodeTokensTHENoffsetLo
EXPECT_EQ(pKernelInfo->workloadInfo.parentEventOffset, offsetSimdSize); EXPECT_EQ(pKernelInfo->workloadInfo.parentEventOffset, offsetSimdSize);
} }
TEST_F(KernelDataTest, GIVENdataParameterPrefferedWorkgroupMultipleTokenWHENbinaryIsdecodedTHENcorrectOffsetIsAssigned) { TEST_F(KernelDataTest, GIVENdataParameterPreferredWorkgroupMultipleTokenWHENbinaryIsdecodedTHENcorrectOffsetIsAssigned) {
const uint32_t offset = 0x100; const uint32_t offset = 0x100;
SPatchDataParameterBuffer dataParameterToken; SPatchDataParameterBuffer dataParameterToken;
@@ -133,7 +118,7 @@ TEST_F(KernelDataTest, GIVENdataParameterPrefferedWorkgroupMultipleTokenWHENbina
buildAndDecode(); buildAndDecode();
EXPECT_EQ(pKernelInfo->workloadInfo.prefferedWkgMultipleOffset, offset); EXPECT_EQ(pKernelInfo->workloadInfo.preferredWkgMultipleOffset, offset);
} }
TEST_F(KernelDataTest, GIVENdataParameterObjectIdWHENdecodeTokensTHENoffsetLocatedInKernelArgInfo) { TEST_F(KernelDataTest, GIVENdataParameterObjectIdWHENdecodeTokensTHENoffsetLocatedInKernelArgInfo) {