mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
refactor: remove not needed flags to force OCL version support
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fa01460334
commit
6c0c229c82
@@ -461,7 +461,7 @@ IGC::FclOclDeviceCtxTagOCL *CompilerInterface::getFclDeviceCtx(const Device &dev
|
||||
DEBUG_BREAK_IF(true); // could not create device context
|
||||
return nullptr;
|
||||
}
|
||||
newDeviceCtx->SetOclApiVersion(device.getHardwareInfo().capabilityTable.clVersionSupport * 10);
|
||||
newDeviceCtx->SetOclApiVersion(ocl30ApiVersion);
|
||||
if (newDeviceCtx->GetUnderlyingVersion() > 4U) {
|
||||
auto igcPlatform = newDeviceCtx->GetPlatformHandle();
|
||||
if (nullptr == igcPlatform.get()) {
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
namespace NEO {
|
||||
struct HardwareInfo;
|
||||
|
||||
constexpr inline uint32_t ocl30ApiVersion = 300;
|
||||
|
||||
template <typename IgcPlatformType>
|
||||
void populateIgcPlatform(IgcPlatformType &igcPlatform, const HardwareInfo &hwInfo);
|
||||
} // namespace NEO
|
||||
|
||||
@@ -133,17 +133,6 @@ std::string convertEnabledExtensionsToCompilerInternalOptions(const char *enable
|
||||
return extensionsList;
|
||||
}
|
||||
|
||||
std::string getOclVersionCompilerInternalOption(unsigned int oclVersion) {
|
||||
switch (oclVersion) {
|
||||
case 30:
|
||||
return "-ocl-version=300 ";
|
||||
case 21:
|
||||
return "-ocl-version=210 ";
|
||||
default:
|
||||
return "-ocl-version=120 ";
|
||||
}
|
||||
}
|
||||
|
||||
cl_version getOclCExtensionVersion(std::string name, cl_version defaultVer) {
|
||||
if (name.compare("cl_khr_integer_dot_product") == 0) {
|
||||
return CL_MAKE_VERSION(2u, 0, 0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "CL/cl.h"
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
using OpenClCFeaturesContainer = StackVec<cl_name_version, 35>;
|
||||
|
||||
@@ -20,6 +21,8 @@ struct HardwareInfo;
|
||||
class CompilerProductHelper;
|
||||
class ReleaseHelper;
|
||||
|
||||
constexpr inline std::string_view oclVersionCompilerInternalOption = "-ocl-version=300 ";
|
||||
|
||||
namespace Extensions {
|
||||
inline constexpr const char *const sharingFormatQuery = "cl_intel_sharing_format_query ";
|
||||
}
|
||||
@@ -27,7 +30,6 @@ inline constexpr const char *const sharingFormatQuery = "cl_intel_sharing_format
|
||||
void getOpenclCFeaturesList(const HardwareInfo &hwInfo, OpenClCFeaturesContainer &openclCFeatures, const CompilerProductHelper &compilerProductHelper, const ReleaseHelper *releaseHelper);
|
||||
std::string convertEnabledExtensionsToCompilerInternalOptions(const char *deviceExtensions,
|
||||
OpenClCFeaturesContainer &openclCFeatures);
|
||||
std::string getOclVersionCompilerInternalOption(unsigned int oclVersion);
|
||||
|
||||
cl_version getOclCExtensionVersion(std::string name, cl_version defaultVer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user