From 756c54027542299ba9752f0c9dbc8271216fe2eb Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Tue, 4 Feb 2025 11:14:19 +0000 Subject: [PATCH] refactor: remove pre-gen9 code Signed-off-by: Mateusz Jablonski --- opencl/source/api/api.cpp | 6 ------ opencl/source/context/driver_diagnostics.cpp | 3 +-- opencl/source/context/driver_diagnostics.h | 3 +-- .../context/driver_diagnostics_tests.cpp | 16 +--------------- 4 files changed, 3 insertions(+), 25 deletions(-) diff --git a/opencl/source/api/api.cpp b/opencl/source/api/api.cpp index 042b38ebf8..a5b46d5f4b 100644 --- a/opencl/source/api/api.cpp +++ b/opencl/source/api/api.cpp @@ -616,9 +616,6 @@ cl_command_queue CL_API_CALL clCreateCommandQueue(cl_context context, pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, DRIVER_CALLS_INTERNAL_CL_FLUSH); if (castToObjectOrAbort(commandQueue)->isProfilingEnabled()) { pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, PROFILING_ENABLED); - if (pDevice->getDeviceInfo().preemptionSupported && pDevice->getHardwareInfo().platform.eProductFamily < IGFX_SKYLAKE) { - pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, PROFILING_ENABLED_WITH_DISABLED_PREEMPTION); - } } } } while (false); @@ -5617,9 +5614,6 @@ cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(cl_context conte pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, DRIVER_CALLS_INTERNAL_CL_FLUSH); if (castToObjectOrAbort(commandQueue)->isProfilingEnabled()) { pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, PROFILING_ENABLED); - if (pDevice->getDeviceInfo().preemptionSupported && pDevice->getHardwareInfo().platform.eProductFamily < IGFX_SKYLAKE) { - pContext->providePerformanceHint(CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL, PROFILING_ENABLED_WITH_DISABLED_PREEMPTION); - } } } diff --git a/opencl/source/context/driver_diagnostics.cpp b/opencl/source/context/driver_diagnostics.cpp index fa923200a5..0513e47517 100644 --- a/opencl/source/context/driver_diagnostics.cpp +++ b/opencl/source/context/driver_diagnostics.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -26,7 +26,6 @@ const char *const DriverDiagnostics::hintFormat[] = { "Performance hint: clCreateImage with pointer %p meets alignment restrictions and image will share the same physical memory with CPU.", // CL_IMAGE_MEETS_ALIGNMENT_RESTRICTIONS "Performance hint: Driver calls internal clFlush on the command queue each time 1 command is enqueued.", // DRIVER_CALLS_INTERNAL_CL_FLUSH "Performance hint: Profiling adds overhead on all enqueue commands with events.", // PROFILING_ENABLED - "Performance hint: Profiled kernels will be executed with disabled preemption.", // PROFILING_ENABLED_WITH_DISABLED_PREEMPTION "Performance hint: Subbuffer created from buffer %p shares the same memory with buffer.", // SUBBUFFER_SHARES_MEMORY "Performance hint: clSVMAlloc with pointer %p and size %u meets alignment restrictions.", // CL_SVM_ALLOC_MEETS_ALIGNMENT_RESTRICTIONS "Performance hint: clEnqueueReadBuffer call on a buffer %p with pointer %p will require driver to copy the data.Consider using clEnqueueMapBuffer with buffer that shares the same physical memory with CPU.", // CL_ENQUEUE_READ_BUFFER_REQUIRES_COPY_DATA diff --git a/opencl/source/context/driver_diagnostics.h b/opencl/source/context/driver_diagnostics.h index 3c9d855f77..5c2446736a 100644 --- a/opencl/source/context/driver_diagnostics.h +++ b/opencl/source/context/driver_diagnostics.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -17,7 +17,6 @@ enum PerformanceHints { CL_IMAGE_MEETS_ALIGNMENT_RESTRICTIONS, DRIVER_CALLS_INTERNAL_CL_FLUSH, PROFILING_ENABLED, - PROFILING_ENABLED_WITH_DISABLED_PREEMPTION, SUBBUFFER_SHARES_MEMORY, CL_SVM_ALLOC_MEETS_ALIGNMENT_RESTRICTIONS, CL_ENQUEUE_READ_BUFFER_REQUIRES_COPY_DATA, diff --git a/opencl/test/unit_test/context/driver_diagnostics_tests.cpp b/opencl/test/unit_test/context/driver_diagnostics_tests.cpp index f823c20086..5de505e3b1 100644 --- a/opencl/test/unit_test/context/driver_diagnostics_tests.cpp +++ b/opencl/test/unit_test/context/driver_diagnostics_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2024 Intel Corporation + * Copyright (C) 2018-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -129,13 +129,6 @@ TEST_P(PerformanceHintCommandQueueTest, GivenProfilingFlagAndPreemptionFlagWhenC snprintf(expectedHint, DriverDiagnostics::maxHintStringSize, DriverDiagnostics::hintFormat[PROFILING_ENABLED], 0); EXPECT_EQ(profilingEnabled, containsHint(expectedHint, userData)); - - snprintf(expectedHint, DriverDiagnostics::maxHintStringSize, DriverDiagnostics::hintFormat[PROFILING_ENABLED_WITH_DISABLED_PREEMPTION], 0); - if (context->getDevice(0)->getHardwareInfo().platform.eProductFamily < IGFX_SKYLAKE && preemptionSupported && profilingEnabled) { - EXPECT_TRUE(containsHint(expectedHint, userData)); - } else { - EXPECT_FALSE(containsHint(expectedHint, userData)); - } } TEST_P(PerformanceHintCommandQueueTest, GivenEnabledProfilingFlagAndSupportedPreemptionFlagWhenCommandQueueIsCreatingWithPropertiesThenContextProvidesProperHints) { @@ -154,13 +147,6 @@ TEST_P(PerformanceHintCommandQueueTest, GivenEnabledProfilingFlagAndSupportedPre snprintf(expectedHint, DriverDiagnostics::maxHintStringSize, DriverDiagnostics::hintFormat[PROFILING_ENABLED], 0); EXPECT_EQ(profilingEnabled, containsHint(expectedHint, userData)); - - snprintf(expectedHint, DriverDiagnostics::maxHintStringSize, DriverDiagnostics::hintFormat[PROFILING_ENABLED_WITH_DISABLED_PREEMPTION], 0); - if (context->getDevice(0)->getHardwareInfo().platform.eProductFamily < IGFX_SKYLAKE && preemptionSupported && profilingEnabled) { - EXPECT_TRUE(containsHint(expectedHint, userData)); - } else { - EXPECT_FALSE(containsHint(expectedHint, userData)); - } } TEST_F(PerformanceHintTest, GivenAlignedHostPtrWhenSubbufferIsCreatingThenContextProvidesHintAboutSharingMemoryWithParentBuffer) {