mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
refactor: add separate helper for extension support
cl_intel_subgroup_split_matrix_multiply_accumulate Related-To: NEO-7800 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1e4c91fb08
commit
39eab81c83
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
#include "compiler_product_helper_adln.inl"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
#include "compiler_product_helper_adlp.inl"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hp.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_disable_subgroup_local_block_io.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -45,7 +45,9 @@ set(NEO_CORE_HELPERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_bdw_and_later.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_before_xe_hp.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_before_xe_hpc.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_disable_split_matrix_multiply_accumulate.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_disable_subgroup_local_block_io.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_enable_split_matrix_multiply_accumulate.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_enable_subgroup_local_block_io.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_xe_hp_and_later.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compiler_product_helper_xe_hpc_and_later.inl
|
||||
|
||||
@@ -37,6 +37,7 @@ class CompilerProductHelper {
|
||||
virtual bool isForceEmuInt32DivRemSPRequired() const = 0;
|
||||
virtual bool isStatelessToStatefulBufferOffsetSupported() const = 0;
|
||||
virtual bool isMatrixMultiplyAccumulateSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isSplitMatrixMultiplyAccumulateSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isBFloat16ConversionSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isSubgroupLocalBlockIoSupported() const = 0;
|
||||
virtual bool isDotAccumulateSupported() const = 0;
|
||||
@@ -69,6 +70,7 @@ class CompilerProductHelperHw : public CompilerProductHelper {
|
||||
bool isForceEmuInt32DivRemSPRequired() const override;
|
||||
bool isStatelessToStatefulBufferOffsetSupported() const override;
|
||||
bool isMatrixMultiplyAccumulateSupported(const HardwareInfo &hwInfo) const override;
|
||||
bool isSplitMatrixMultiplyAccumulateSupported(const HardwareInfo &hwInfo) const override;
|
||||
bool isBFloat16ConversionSupported(const HardwareInfo &hwInfo) const override;
|
||||
bool isSubgroupLocalBlockIoSupported() const override;
|
||||
bool isDotAccumulateSupported() const override;
|
||||
|
||||
@@ -50,6 +50,9 @@ std::string CompilerProductHelperHw<gfxProduct>::getExtensions(const HardwareInf
|
||||
|
||||
if (isMatrixMultiplyAccumulateSupported(hwInfo)) {
|
||||
extensions += "cl_intel_subgroup_matrix_multiply_accumulate ";
|
||||
}
|
||||
|
||||
if (isSplitMatrixMultiplyAccumulateSupported(hwInfo)) {
|
||||
extensions += "cl_intel_subgroup_split_matrix_multiply_accumulate ";
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool CompilerProductHelperHw<gfxProduct>::isSplitMatrixMultiplyAccumulateSupported(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool CompilerProductHelperHw<gfxProduct>::isSplitMatrixMultiplyAccumulateSupported(const HardwareInfo &hwInfo) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/basic_math.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_base.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/compiler_product_helper_base.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hpc_and_later.inl"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "shared/source/helpers/compiler_product_helper_base.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_split_matrix_multiply_accumulate.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_enable_subgroup_local_block_io.inl"
|
||||
#include "shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl"
|
||||
|
||||
|
||||
@@ -25,6 +25,11 @@ bool CompilerProductHelperHw<gfxProduct>::isMatrixMultiplyAccumulateSupported(co
|
||||
return (MTL::isLpg(hwInfo) == false);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool CompilerProductHelperHw<gfxProduct>::isSplitMatrixMultiplyAccumulateSupported(const HardwareInfo &hwInfo) const {
|
||||
return (MTL::isLpg(hwInfo) == false);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool CompilerProductHelperHw<gfxProduct>::isBFloat16ConversionSupported(const HardwareInfo &hwInfo) const {
|
||||
return (MTL::isLpg(hwInfo) == false);
|
||||
|
||||
Reference in New Issue
Block a user