mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 14:33:04 +08:00
Add support for cl_ext_float_atomics
Resolves: NEO-6596 Signed-off-by: Kacper Kasper <kacper.k.kasper@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6c2f5df6c3
commit
da22e0aac9
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -64,6 +64,7 @@ std::string getExtensionsList(const HardwareInfo &hwInfo) {
|
||||
}
|
||||
allExtensionsList += "cl_intel_spirv_subgroups ";
|
||||
allExtensionsList += "cl_khr_spirv_no_integer_wrap_decoration ";
|
||||
allExtensionsList += "cl_ext_float_atomics ";
|
||||
}
|
||||
|
||||
if (hwInfo.capabilityTable.ftrSupportsFP64) {
|
||||
@@ -128,6 +129,32 @@ void getOpenclCFeaturesList(const HardwareInfo &hwInfo, OpenClCFeaturesContainer
|
||||
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_subgroups");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
if (hwInfo.capabilityTable.supportsFloatAtomics) {
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp32_global_atomic_add");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp32_local_atomic_add");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp32_global_atomic_min_max");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp32_local_atomic_min_max");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp16_global_atomic_load_store");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp16_local_atomic_load_store");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp16_global_atomic_min_max");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp16_local_atomic_min_max");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
}
|
||||
}
|
||||
|
||||
auto forcePipeSupport = DebugManager.flags.ForcePipeSupport.get();
|
||||
@@ -142,6 +169,20 @@ void getOpenclCFeaturesList(const HardwareInfo &hwInfo, OpenClCFeaturesContainer
|
||||
(forceFp64Support == 1)) {
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_fp64");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
if (hwInfo.capabilityTable.supportsOcl21Features && hwInfo.capabilityTable.supportsFloatAtomics) {
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp64_global_atomic_add");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp64_local_atomic_add");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp64_global_atomic_min_max");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
|
||||
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_ext_fp64_local_atomic_min_max");
|
||||
openclCFeatures.push_back(openClCFeature);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
using OpenClCFeaturesContainer = StackVec<cl_name_version, 15>;
|
||||
using OpenClCFeaturesContainer = StackVec<cl_name_version, 27>;
|
||||
|
||||
namespace NEO {
|
||||
struct HardwareInfo;
|
||||
|
||||
@@ -75,7 +75,8 @@ const RuntimeCapabilityTable EHL::capabilityTable{
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
false, // fusedEuEnabled
|
||||
false // l0DebuggerSupported;
|
||||
false, // l0DebuggerSupported;
|
||||
false // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable EHL::workaroundTable = {};
|
||||
|
||||
@@ -75,7 +75,8 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
false, // fusedEuEnabled
|
||||
false // l0DebuggerSupported;
|
||||
false, // l0DebuggerSupported;
|
||||
false // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable ICLLP::workaroundTable = {};
|
||||
|
||||
@@ -75,7 +75,8 @@ const RuntimeCapabilityTable LKF::capabilityTable{
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
false, // fusedEuEnabled
|
||||
false // l0DebuggerSupported;
|
||||
false, // l0DebuggerSupported;
|
||||
false // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable LKF::workaroundTable = {};
|
||||
|
||||
@@ -77,7 +77,9 @@ const RuntimeCapabilityTable ADLN::capabilityTable{
|
||||
true, // supportsMediaBlock
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
true // fusedEuEnabled
|
||||
true, // fusedEuEnabled
|
||||
false, // l0DebuggerSupported;
|
||||
true // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable ADLN::workaroundTable = {};
|
||||
|
||||
@@ -78,7 +78,8 @@ const RuntimeCapabilityTable ADLP::capabilityTable{
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
true, // fusedEuEnabled
|
||||
false // l0DebuggerSupported;
|
||||
false, // l0DebuggerSupported;
|
||||
true // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable ADLP::workaroundTable = {};
|
||||
|
||||
@@ -78,7 +78,8 @@ const RuntimeCapabilityTable ADLS::capabilityTable{
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
true, // fusedEuEnabled
|
||||
false // l0DebuggerSupported;
|
||||
false, // l0DebuggerSupported;
|
||||
true // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable ADLS::workaroundTable = {};
|
||||
|
||||
@@ -79,6 +79,7 @@ const RuntimeCapabilityTable DG1::capabilityTable{
|
||||
false, // p2pAtomicAccessSupported
|
||||
true, // fusedEuEnabled
|
||||
true, // l0DebuggerSupported;
|
||||
true // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable DG1::workaroundTable = {};
|
||||
|
||||
@@ -79,6 +79,7 @@ const RuntimeCapabilityTable RKL::capabilityTable{
|
||||
false, // p2pAtomicAccessSupported
|
||||
true, // fusedEuEnabled
|
||||
false, // l0DebuggerSupported;
|
||||
true // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable RKL::workaroundTable = {};
|
||||
|
||||
@@ -79,6 +79,7 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{
|
||||
false, // p2pAtomicAccessSupported
|
||||
true, // fusedEuEnabled
|
||||
false, // l0DebuggerSupported;
|
||||
true // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable TGLLP::workaroundTable = {};
|
||||
|
||||
@@ -75,7 +75,8 @@ const RuntimeCapabilityTable BDW::capabilityTable{
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
false, // fusedEuEnabled
|
||||
false // l0DebuggerSupported;
|
||||
false, // l0DebuggerSupported;
|
||||
false // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable BDW::workaroundTable = {};
|
||||
|
||||
@@ -75,7 +75,8 @@ const RuntimeCapabilityTable BXT::capabilityTable{
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
false, // fusedEuEnabled
|
||||
false // l0DebuggerSupported;
|
||||
false, // l0DebuggerSupported;
|
||||
false // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable BXT::workaroundTable = {};
|
||||
|
||||
@@ -75,7 +75,8 @@ const RuntimeCapabilityTable CFL::capabilityTable{
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
false, // fusedEuEnabled
|
||||
false // l0DebuggerSupported;
|
||||
false, // l0DebuggerSupported;
|
||||
false // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable CFL::workaroundTable = {};
|
||||
|
||||
@@ -75,7 +75,8 @@ const RuntimeCapabilityTable GLK::capabilityTable{
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
false, // fusedEuEnabled
|
||||
false // l0DebuggerSupported;
|
||||
false, // l0DebuggerSupported;
|
||||
false // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable GLK::workaroundTable = {};
|
||||
|
||||
@@ -75,7 +75,8 @@ const RuntimeCapabilityTable KBL::capabilityTable{
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
false, // fusedEuEnabled
|
||||
false // l0DebuggerSupported;
|
||||
false, // l0DebuggerSupported;
|
||||
false // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable KBL::workaroundTable = {};
|
||||
|
||||
@@ -75,7 +75,8 @@ const RuntimeCapabilityTable SKL::capabilityTable{
|
||||
false, // p2pAccessSupported
|
||||
false, // p2pAtomicAccessSupported
|
||||
false, // fusedEuEnabled
|
||||
false // l0DebuggerSupported;
|
||||
false, // l0DebuggerSupported;
|
||||
false // supportsFloatAtomics
|
||||
};
|
||||
|
||||
WorkaroundTable SKL::workaroundTable = {};
|
||||
|
||||
@@ -64,6 +64,7 @@ struct RuntimeCapabilityTable {
|
||||
bool p2pAtomicAccessSupported;
|
||||
bool fusedEuEnabled;
|
||||
bool l0DebuggerSupported;
|
||||
bool supportsFloatAtomics;
|
||||
};
|
||||
|
||||
inline bool operator==(const RuntimeCapabilityTable &lhs, const RuntimeCapabilityTable &rhs) {
|
||||
@@ -128,6 +129,7 @@ inline bool operator==(const RuntimeCapabilityTable &lhs, const RuntimeCapabilit
|
||||
result &= (lhs.supportsMediaBlock == rhs.supportsMediaBlock);
|
||||
result &= (lhs.fusedEuEnabled == rhs.fusedEuEnabled);
|
||||
result &= (lhs.l0DebuggerSupported == rhs.l0DebuggerSupported);
|
||||
result &= (lhs.supportsFloatAtomics == rhs.supportsFloatAtomics);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user