mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
build: update opencl headers to v2024.10.24
https://github.com/intel/compute-runtime/issues/822 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1432f6a7b2
commit
21f6bb8889
@@ -249,7 +249,7 @@ bool Context::createImpl(const cl_context_properties *properties,
|
||||
driverDiagnosticsUsed = debugManager.flags.PrintDriverDiagnostics.get();
|
||||
}
|
||||
if (driverDiagnosticsUsed >= 0) {
|
||||
driverDiagnostics.reset(new DriverDiagnostics((cl_diagnostics_verbose_level)driverDiagnosticsUsed));
|
||||
driverDiagnostics = std::make_unique<DriverDiagnostics>(static_cast<cl_diagnostic_verbose_level_intel>(driverDiagnosticsUsed));
|
||||
}
|
||||
|
||||
this->numProperties = numProperties;
|
||||
|
||||
@@ -185,7 +185,7 @@ class Context : public BaseObject<_cl_context> {
|
||||
void registerSharing(Sharing *sharing);
|
||||
|
||||
template <typename... Args>
|
||||
void providePerformanceHint(cl_diagnostics_verbose_level flags, PerformanceHints performanceHint, Args &&...args) {
|
||||
void providePerformanceHint(cl_diagnostic_verbose_level_intel flags, PerformanceHints performanceHint, Args &&...args) {
|
||||
DEBUG_BREAK_IF(contextCallback == nullptr);
|
||||
DEBUG_BREAK_IF(driverDiagnostics == nullptr);
|
||||
char hint[DriverDiagnostics::maxHintStringSize];
|
||||
@@ -202,8 +202,8 @@ class Context : public BaseObject<_cl_context> {
|
||||
|
||||
template <typename... Args>
|
||||
void providePerformanceHintForMemoryTransfer(cl_command_type commandType, bool transferRequired, Args &&...args) {
|
||||
cl_diagnostics_verbose_level verboseLevel = transferRequired ? CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL
|
||||
: CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL;
|
||||
cl_diagnostic_verbose_level_intel verboseLevel = transferRequired ? CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL
|
||||
: CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL;
|
||||
PerformanceHints hint = driverDiagnostics->obtainHintForTransferOperation(commandType, transferRequired);
|
||||
|
||||
providePerformanceHint(verboseLevel, hint, args...);
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
DriverDiagnostics::DriverDiagnostics(cl_diagnostics_verbose_level level) {
|
||||
DriverDiagnostics::DriverDiagnostics(cl_diagnostic_verbose_level_intel level) {
|
||||
this->verboseLevel = level;
|
||||
}
|
||||
|
||||
bool DriverDiagnostics::validFlags(cl_diagnostics_verbose_level flags) const {
|
||||
bool DriverDiagnostics::validFlags(cl_diagnostic_verbose_level_intel flags) const {
|
||||
return !!(verboseLevel & flags);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,14 +56,14 @@ enum PerformanceHints {
|
||||
|
||||
class DriverDiagnostics {
|
||||
public:
|
||||
DriverDiagnostics(cl_diagnostics_verbose_level level);
|
||||
bool validFlags(cl_diagnostics_verbose_level flags) const;
|
||||
DriverDiagnostics(cl_diagnostic_verbose_level_intel level);
|
||||
bool validFlags(cl_diagnostic_verbose_level_intel flags) const;
|
||||
~DriverDiagnostics() = default;
|
||||
static const char *const hintFormat[];
|
||||
static const cl_int maxHintStringSize = 1024;
|
||||
PerformanceHints obtainHintForTransferOperation(cl_command_type commandType, bool transferRequired);
|
||||
|
||||
protected:
|
||||
cl_diagnostics_verbose_level verboseLevel;
|
||||
cl_diagnostic_verbose_level_intel verboseLevel;
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "opencl/source/sharings/sharing.h"
|
||||
|
||||
#include "CL/cl.h"
|
||||
#include "CL/cl_gl.h"
|
||||
|
||||
#if __clang__
|
||||
#pragma clang diagnostic push
|
||||
|
||||
@@ -38,14 +38,14 @@ void CL_CALLBACK callbackFunction(const char *providedHint, const void *flags, s
|
||||
strcpy_s((char *)userData + offset, DriverDiagnostics::maxHintStringSize, providedHint);
|
||||
}
|
||||
|
||||
cl_diagnostics_verbose_level diagnosticsVerboseLevels[] = {
|
||||
cl_diagnostic_verbose_level_intel diagnosticsVerboseLevels[] = {
|
||||
CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL,
|
||||
CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL,
|
||||
CL_CONTEXT_DIAGNOSTICS_LEVEL_NEUTRAL_INTEL};
|
||||
|
||||
TEST_P(VerboseLevelTest, GivenVerboseLevelWhenProvidedHintLevelIsSameOrAllThenCallbackFunctionTakesProvidedHint) {
|
||||
cl_device_id deviceID = devices[0];
|
||||
cl_diagnostics_verbose_level diagnosticsLevel = GetParam();
|
||||
cl_diagnostic_verbose_level_intel diagnosticsLevel = GetParam();
|
||||
cl_context_properties validProperties[3] = {CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL, (cl_context_properties)diagnosticsLevel, 0};
|
||||
retVal = CL_SUCCESS;
|
||||
|
||||
@@ -67,7 +67,7 @@ TEST_P(VerboseLevelTest, GivenVerboseLevelWhenProvidedHintLevelIsSameOrAllThenCa
|
||||
|
||||
TEST_P(VerboseLevelTest, GivenVerboseLevelAllWhenAnyHintIsProvidedThenCallbackFunctionTakesProvidedHint) {
|
||||
cl_device_id deviceID = devices[0];
|
||||
cl_diagnostics_verbose_level providedHintLevel = GetParam();
|
||||
cl_diagnostic_verbose_level_intel providedHintLevel = GetParam();
|
||||
cl_context_properties validProperties[3] = {CL_CONTEXT_SHOW_DIAGNOSTICS_INTEL, CL_CONTEXT_DIAGNOSTICS_LEVEL_ALL_INTEL, 0};
|
||||
retVal = CL_SUCCESS;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -46,7 +46,7 @@ struct DriverDiagnosticsTest : public PlatformFixture,
|
||||
};
|
||||
|
||||
struct VerboseLevelTest : public DriverDiagnosticsTest,
|
||||
public ::testing::WithParamInterface<unsigned int> {
|
||||
public ::testing::WithParamInterface<uint64_t> {
|
||||
|
||||
void SetUp() override {
|
||||
DriverDiagnosticsTest::SetUp();
|
||||
@@ -57,7 +57,7 @@ struct VerboseLevelTest : public DriverDiagnosticsTest,
|
||||
void TearDown() override {
|
||||
DriverDiagnosticsTest::TearDown();
|
||||
}
|
||||
std::vector<unsigned int> validLevels{
|
||||
std::vector<uint64_t> validLevels{
|
||||
CL_CONTEXT_DIAGNOSTICS_LEVEL_ALL_INTEL,
|
||||
CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL,
|
||||
CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL,
|
||||
|
||||
Reference in New Issue
Block a user