diff --git a/runtime/context/context.cpp b/runtime/context/context.cpp index 042dff1d00..c715b457f1 100644 --- a/runtime/context/context.cpp +++ b/runtime/context/context.cpp @@ -90,7 +90,7 @@ void Context::overrideSpecialQueueAndDecrementRefCount(CommandQueue *commandQueu this->decRefInternal(); }; -bool Context::areMultiStorageAllocationsPreffered() { +bool Context::areMultiStorageAllocationsPreferred() { return this->contextType != ContextType::CONTEXT_TYPE_SPECIALIZED; } diff --git a/runtime/context/context.h b/runtime/context/context.h index f15c98034c..32b76c0374 100644 --- a/runtime/context/context.h +++ b/runtime/context/context.h @@ -122,7 +122,7 @@ class Context : public BaseObject<_cl_context> { bool getInteropUserSyncEnabled() { return interopUserSync; } void setInteropUserSyncEnabled(bool enabled) { interopUserSync = enabled; } - bool areMultiStorageAllocationsPreffered(); + bool areMultiStorageAllocationsPreferred(); ContextType peekContextType() { return this->contextType; } diff --git a/runtime/kernel/kernel.cpp b/runtime/kernel/kernel.cpp index adffebdb18..be6cd5c185 100644 --- a/runtime/kernel/kernel.cpp +++ b/runtime/kernel/kernel.cpp @@ -76,7 +76,7 @@ Kernel::Kernel(Program *programArg, const KernelInfo &kernelInfoArg, const Devic workDim(&Kernel::dummyPatchLocation), dataParameterSimdSize(&Kernel::dummyPatchLocation), parentEventOffset(&Kernel::dummyPatchLocation), - prefferedWkgMultipleOffset(&Kernel::dummyPatchLocation), + preferredWkgMultipleOffset(&Kernel::dummyPatchLocation), slmTotalSize(kernelInfoArg.workloadInfo.slmStaticSize), isBuiltIn(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; dataParameterSimdSize = workloadInfo.simdSizeOffset != WorkloadInfo::undefinedOffset ? ptrOffset(crossThread, workloadInfo.simdSizeOffset) : dataParameterSimdSize; 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(device.getDeviceInfo().maxWorkGroupSize); *dataParameterSimdSize = getKernelInfo().getMaxSimdSize(); - *prefferedWkgMultipleOffset = getKernelInfo().getMaxSimdSize(); + *preferredWkgMultipleOffset = getKernelInfo().getMaxSimdSize(); *parentEventOffset = WorkloadInfo::invalidParentEvent; } diff --git a/runtime/kernel/kernel.h b/runtime/kernel/kernel.h index e3faf01b84..afd4381162 100644 --- a/runtime/kernel/kernel.h +++ b/runtime/kernel/kernel.h @@ -331,7 +331,7 @@ class Kernel : public BaseObject<_cl_kernel> { uint32_t *workDim; uint32_t *dataParameterSimdSize; uint32_t *parentEventOffset; - uint32_t *prefferedWkgMultipleOffset; + uint32_t *preferredWkgMultipleOffset; static uint32_t dummyPatchLocation; diff --git a/runtime/mem_obj/buffer.cpp b/runtime/mem_obj/buffer.cpp index 2af83a030f..d63e5ed420 100644 --- a/runtime/mem_obj/buffer.cpp +++ b/runtime/mem_obj/buffer.cpp @@ -215,7 +215,7 @@ Buffer *Buffer::create(Context *context, } 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); } @@ -228,7 +228,7 @@ Buffer *Buffer::create(Context *context, allocationType = GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY; zeroCopyAllowed = false; 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); } diff --git a/runtime/program/kernel_info.h b/runtime/program/kernel_info.h index 12d5f6be9a..90a4fb90ad 100644 --- a/runtime/program/kernel_info.h +++ b/runtime/program/kernel_info.h @@ -49,7 +49,7 @@ struct WorkloadInfo { uint32_t slmStaticSize = 0; uint32_t simdSizeOffset; uint32_t parentEventOffset; - uint32_t prefferedWkgMultipleOffset; + uint32_t preferredWkgMultipleOffset; static const uint32_t undefinedOffset; static const uint32_t invalidParentEvent; @@ -77,7 +77,7 @@ struct WorkloadInfo { workDimOffset = undefinedOffset; simdSizeOffset = undefinedOffset; parentEventOffset = undefinedOffset; - prefferedWkgMultipleOffset = undefinedOffset; + preferredWkgMultipleOffset = undefinedOffset; } }; diff --git a/runtime/program/process_gen_binary.cpp b/runtime/program/process_gen_binary.cpp index f2e67d19c9..3993ca5fce 100644 --- a/runtime/program/process_gen_binary.cpp +++ b/runtime/program/process_gen_binary.cpp @@ -383,7 +383,7 @@ cl_int Program::parsePatchList(KernelInfo &kernelInfo, uint32_t kernelNum) { break; case DATA_PARAMETER_PREFERRED_WORKGROUP_MULTIPLE: DBG_LOG(LogPatchTokens, "\n .Type", "PREFERRED_WORKGROUP_MULTIPLE"); - kernelInfo.workloadInfo.prefferedWkgMultipleOffset = pDataParameterBuffer->Offset; + kernelInfo.workloadInfo.preferredWkgMultipleOffset = pDataParameterBuffer->Offset; break; case DATA_PARAMETER_BUFFER_OFFSET: DBG_LOG(LogPatchTokens, "\n .Type", "DATA_PARAMETER_BUFFER_OFFSET"); diff --git a/unit_tests/context/context_tests.cpp b/unit_tests/context/context_tests.cpp index fe33eb16f1..0d9f048c98 100644 --- a/unit_tests/context/context_tests.cpp +++ b/unit_tests/context/context_tests.cpp @@ -364,11 +364,11 @@ TEST(DefaultContext, givenDefaultContextWhenItIsQueriedForTypeThenDefaultTypeIsR TEST(Context, givenContextWhenCheckIfAllocationsAreMultiStorageThenReturnProperValueAccordingToContextType) { MockContext context; - EXPECT_TRUE(context.areMultiStorageAllocationsPreffered()); + EXPECT_TRUE(context.areMultiStorageAllocationsPreferred()); context.setContextType(ContextType::CONTEXT_TYPE_SPECIALIZED); - EXPECT_FALSE(context.areMultiStorageAllocationsPreffered()); + EXPECT_FALSE(context.areMultiStorageAllocationsPreferred()); context.setContextType(ContextType::CONTEXT_TYPE_UNRESTRICTIVE); - EXPECT_TRUE(context.areMultiStorageAllocationsPreffered()); + EXPECT_TRUE(context.areMultiStorageAllocationsPreferred()); } diff --git a/unit_tests/device/get_device_info_tests.cpp b/unit_tests/device/get_device_info_tests.cpp index d77eb438f0..069853569e 100644 --- a/unit_tests/device/get_device_info_tests.cpp +++ b/unit_tests/device/get_device_info_tests.cpp @@ -126,7 +126,7 @@ TEST(GetDeviceInfo, simultaneousInterops) { EXPECT_TRUE(memcmp(value, &device->simultaneousInterops[0], 4u * sizeof(cl_uint)) == 0); } -TEST(GetDeviceInfo, prefferedInteropUserSync) { +TEST(GetDeviceInfo, preferredInteropUserSync) { auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); cl_bool value = 0; diff --git a/unit_tests/device_queue/device_queue_tests.cpp b/unit_tests/device_queue/device_queue_tests.cpp index f1bfc13797..ef88b01b52 100644 --- a/unit_tests/device_queue/device_queue_tests.cpp +++ b/unit_tests/device_queue/device_queue_tests.cpp @@ -114,7 +114,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueTest, createDeviceQueuesWhenMultipleDevic typedef DeviceQueueTest DeviceQueueBuffer; -HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueBuffer, setPrefferedSizeWhenNoPropertyGiven) { +HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueBuffer, setPreferredSizeWhenNoPropertyGiven) { auto &deviceInfo = device->getDeviceInfo(); deviceQueue = createQueueObject(); // only minimal properties ASSERT_NE(deviceQueue, nullptr); @@ -122,7 +122,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DeviceQueueBuffer, setPrefferedSizeWhenNoPropertyGiv 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_SIZE, 0, 0}; auto &deviceInfo = device->getDeviceInfo(); diff --git a/unit_tests/kernel/kernel_tests.cpp b/unit_tests/kernel/kernel_tests.cpp index 39a1f22332..03d323626e 100644 --- a/unit_tests/kernel/kernel_tests.cpp +++ b/unit_tests/kernel/kernel_tests.cpp @@ -2270,18 +2270,18 @@ TEST_F(KernelCrossThreadTests, givenKernelWithPrivateMemoryWhenItIsCreatedThenCu 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); kernel->initialize(); 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; } diff --git a/unit_tests/program/kernel_data_OCL2_0.cpp b/unit_tests/program/kernel_data_OCL2_0.cpp index 587b9f50ab..7a9c3358c2 100644 --- a/unit_tests/program/kernel_data_OCL2_0.cpp +++ b/unit_tests/program/kernel_data_OCL2_0.cpp @@ -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 - * 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: + * SPDX-License-Identifier: MIT * - * 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" @@ -116,7 +101,7 @@ TEST_F(KernelDataTest, GIVENdataParameterParentEventWHENdecodeTokensTHENoffsetLo EXPECT_EQ(pKernelInfo->workloadInfo.parentEventOffset, offsetSimdSize); } -TEST_F(KernelDataTest, GIVENdataParameterPrefferedWorkgroupMultipleTokenWHENbinaryIsdecodedTHENcorrectOffsetIsAssigned) { +TEST_F(KernelDataTest, GIVENdataParameterPreferredWorkgroupMultipleTokenWHENbinaryIsdecodedTHENcorrectOffsetIsAssigned) { const uint32_t offset = 0x100; SPatchDataParameterBuffer dataParameterToken; @@ -133,7 +118,7 @@ TEST_F(KernelDataTest, GIVENdataParameterPrefferedWorkgroupMultipleTokenWHENbina buildAndDecode(); - EXPECT_EQ(pKernelInfo->workloadInfo.prefferedWkgMultipleOffset, offset); + EXPECT_EQ(pKernelInfo->workloadInfo.preferredWkgMultipleOffset, offset); } TEST_F(KernelDataTest, GIVENdataParameterObjectIdWHENdecodeTokensTHENoffsetLocatedInKernelArgInfo) {