diff --git a/opencl/test/unit_test/CMakeLists.txt b/opencl/test/unit_test/CMakeLists.txt index 6fa689cdba..39fa611711 100644 --- a/opencl/test/unit_test/CMakeLists.txt +++ b/opencl/test/unit_test/CMakeLists.txt @@ -354,7 +354,7 @@ macro(macro_for_each_platform) list(REMOVE_ITEM PLATFORM_TEST_KERNELS ${KERNEL_TO_REMOVE_PATH}) endforeach() - if(MSVC OR CMAKE_SIZEOF_VOID_P EQUAL 8) + if(WIN32 OR CMAKE_SIZEOF_VOID_P EQUAL 8) foreach(REVISION_CONFIG ${${PLATFORM_IT}_${CORE_TYPE}_REVISIONS}) parse_revision_config(${REVISION_CONFIG} ${PLATFORM_IT_LOWER} DEVICE_ID REVISION_ID) neo_gen_kernels(${PLATFORM_IT_LOWER} ${DEVICE_ID} ${REVISION_ID} FALSE ${PLATFORM_TEST_KERNELS}) diff --git a/opencl/test/unit_test/kernel/kernel_tests.cpp b/opencl/test/unit_test/kernel/kernel_tests.cpp index 5d1fe78d51..5778e6ded5 100644 --- a/opencl/test/unit_test/kernel/kernel_tests.cpp +++ b/opencl/test/unit_test/kernel/kernel_tests.cpp @@ -1032,7 +1032,7 @@ TEST_F(KernelGlobalSurfaceTest, givenNDRangeKernelWhenKernelIsCreatedThenGlobalS char buffer[16]; auto gmmHelper = pDevice->getGmmHelper(); auto canonizedGpuAddress = gmmHelper->canonize(castToUint64(buffer)); - GraphicsAllocation gfxAlloc(0, 1u /*num gmms*/, AllocationType::unknown, buffer, (uint64_t)buffer - 8u, 8, MemoryPool::memoryNull, 0u, canonizedGpuAddress); + GraphicsAllocation gfxAlloc(0, 1u /*num gmms*/, AllocationType::unknown, buffer, reinterpret_cast(buffer) - 8u, 8, MemoryPool::memoryNull, 0u, canonizedGpuAddress); uint64_t bufferAddress = gfxAlloc.getGpuAddress(); // create kernel @@ -1152,7 +1152,7 @@ TEST_F(KernelConstantSurfaceTest, givenNDRangeKernelWhenKernelIsCreatedThenConst char buffer[16]; auto gmmHelper = pDevice->getGmmHelper(); auto canonizedGpuAddress = gmmHelper->canonize(castToUint64(buffer)); - GraphicsAllocation gfxAlloc(0, 1u /*num gmms*/, AllocationType::unknown, buffer, (uint64_t)buffer - 8u, 8, MemoryPool::memoryNull, 0u, canonizedGpuAddress); + GraphicsAllocation gfxAlloc(0, 1u /*num gmms*/, AllocationType::unknown, buffer, reinterpret_cast(buffer) - 8u, 8, MemoryPool::memoryNull, 0u, canonizedGpuAddress); uint64_t bufferAddress = gfxAlloc.getGpuAddress(); // create kernel diff --git a/opencl/test/unit_test/platform/platform_icd_tests.cpp b/opencl/test/unit_test/platform/platform_icd_tests.cpp index 1c76ba5ee7..33b1a7e8d3 100644 --- a/opencl/test/unit_test/platform/platform_icd_tests.cpp +++ b/opencl/test/unit_test/platform/platform_icd_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -42,7 +42,7 @@ class IcdRestore : public SharingFactory { std::vector> sharings; }; -void fakeGlF() { +void CL_API_CALL fakeGlF() { } class PlatformTestedSharingBuilderFactory : public SharingBuilderFactory { diff --git a/opencl/test/unit_test/program/program_tests.cpp b/opencl/test/unit_test/program/program_tests.cpp index 02f4e291fc..1fff10a20f 100644 --- a/opencl/test/unit_test/program/program_tests.cpp +++ b/opencl/test/unit_test/program/program_tests.cpp @@ -3496,14 +3496,14 @@ TEST(ProgramInternalOptionsTests, givenProgramWhenPossibleInternalOptionsChecked MockClDevice device{new MockDevice()}; MockProgram program(toClDeviceVector(device)); auto &optsToExtract = program.internalOptionsToExtract; - EXPECT_EQ(1U, std::count(optsToExtract.begin(), optsToExtract.end(), CompilerOptions::largeGrf)); + EXPECT_EQ(1, std::count(optsToExtract.begin(), optsToExtract.end(), CompilerOptions::largeGrf)); } TEST(ProgramInternalOptionsTests, givenProgramWhenPossibleInternalOptionsCheckedThenDefaultGRFOptionIsPresent) { MockClDevice device{new MockDevice()}; MockProgram program(toClDeviceVector(device)); auto &optsToExtract = program.internalOptionsToExtract; - EXPECT_EQ(1U, std::count(optsToExtract.begin(), optsToExtract.end(), CompilerOptions::defaultGrf)); + EXPECT_EQ(1, std::count(optsToExtract.begin(), optsToExtract.end(), CompilerOptions::defaultGrf)); } TEST(ProgramInternalOptionsTests, givenProgramWhenPossibleInternalOptionsCheckedThenNumThreadsPerUsIsPresent) { diff --git a/shared/source/os_interface/windows/wddm_memory_manager.cpp b/shared/source/os_interface/windows/wddm_memory_manager.cpp index 9ee19be9dc..6c76ac1890 100644 --- a/shared/source/os_interface/windows/wddm_memory_manager.cpp +++ b/shared/source/os_interface/windows/wddm_memory_manager.cpp @@ -47,6 +47,8 @@ namespace NEO { +template void WddmMemoryManager::adjustGpuPtrToHostAddressSpace(WddmAllocation &wddmAllocation, void *&requiredGpuVa); + WddmMemoryManager::~WddmMemoryManager() = default; WddmMemoryManager::WddmMemoryManager(ExecutionEnvironment &executionEnvironment) : MemoryManager(executionEnvironment) { @@ -1321,7 +1323,7 @@ GraphicsAllocation *WddmMemoryManager::allocatePhysicalLocalDeviceMemory(const A } const auto chunkSize = alignDown(getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::allocateByKmd), alignment); - const size_t numGmms = (static_cast(sizeAligned) + chunkSize - 1) / chunkSize; + const size_t numGmms = static_cast((static_cast(sizeAligned) + chunkSize - 1) / chunkSize); auto wddmAllocation = std::make_unique(allocationData.rootDeviceIndex, singleBankAllocation ? numGmms : numBanks, allocationData.type, nullptr, 0, sizeAligned, nullptr, MemoryPool::localMemory, allocationData.flags.shareable, maxOsContextCount); @@ -1412,7 +1414,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryInDevicePool(const } const auto chunkSize = alignDown(getHugeGfxMemoryChunkSize(GfxMemoryAllocationMethod::allocateByKmd), alignment); - const size_t numGmms = (static_cast(sizeAligned) + chunkSize - 1) / chunkSize; + const size_t numGmms = static_cast((static_cast(sizeAligned) + chunkSize - 1) / chunkSize); auto wddmAllocation = std::make_unique(allocationData.rootDeviceIndex, singleBankAllocation ? numGmms : numBanks, allocationData.type, nullptr, 0, sizeAligned, nullptr, MemoryPool::localMemory, allocationData.flags.shareable, maxOsContextCount); diff --git a/shared/test/unit_test/memory_manager/gfx_partition_tests.cpp b/shared/test/unit_test/memory_manager/gfx_partition_tests.cpp index 7034789128..01bf5e5c0d 100644 --- a/shared/test/unit_test/memory_manager/gfx_partition_tests.cpp +++ b/shared/test/unit_test/memory_manager/gfx_partition_tests.cpp @@ -63,7 +63,7 @@ class CpuInfoOverrideVirtualAddressSizeAndFlags { using namespace NEO; -constexpr size_t reservedCpuAddressRangeSize = is64bit ? (6 * 4 * MemoryConstants::gigaByte) : 0; +constexpr size_t reservedCpuAddressRangeSize = static_cast(is64bit ? (6 * 4 * MemoryConstants::gigaByte) : 0); constexpr uint64_t sizeHeap32 = 4 * MemoryConstants::gigaByte; void testGfxPartition(MockGfxPartition &gfxPartition, uint64_t gfxBase, uint64_t gfxTop, uint64_t svmTop) {