refactor: refactor logic for querying atomic FP capabilities

- Move logic from product helper to compiler product helper
- Add method for adjusting fp16 and extra capabilities using release
helper (if present).


Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
Kacper Nowak
2024-03-28 13:47:16 +00:00
committed by Compute-Runtime-Automation
parent bcaa62bed3
commit 35ca2bbea9
41 changed files with 314 additions and 91 deletions

View File

@@ -799,10 +799,9 @@ ze_result_t DeviceImp::getKernelProperties(ze_device_module_properties_t *pKerne
if (extendedProperties->stype == ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES) {
ze_float_atomic_ext_properties_t *floatProperties =
reinterpret_cast<ze_float_atomic_ext_properties_t *>(extendedProperties);
productHelper.getKernelExtendedProperties(hardwareInfo,
floatProperties->fp16Flags,
floatProperties->fp32Flags,
floatProperties->fp64Flags);
compilerProductHelper.getKernelFp16AtomicCapabilities(releaseHelper, floatProperties->fp16Flags);
compilerProductHelper.getKernelFp32AtomicCapabilities(floatProperties->fp32Flags);
compilerProductHelper.getKernelFp64AtomicCapabilities(floatProperties->fp64Flags);
static_assert(ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_LOAD_STORE == FpAtomicExtFlags::globalLoadStore, "Mismatch between internal and API - specific capabilities.");
static_assert(ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_ADD == FpAtomicExtFlags::globalAdd, "Mismatch between internal and API - specific capabilities.");
static_assert(ZE_DEVICE_FP_ATOMIC_EXT_FLAG_GLOBAL_MIN_MAX == FpAtomicExtFlags::globalMinMax, "Mismatch between internal and API - specific capabilities.");