Skip to content

Commit

Permalink
Implement SPV_INTEL_subgroup_matrix_multiply_accumulate
Browse files Browse the repository at this point in the history
Implement SPV_INTEL_subgroup_matrix_multiply_accumulate
  • Loading branch information
YuriPlyakhin authored and igcbot committed Nov 12, 2024
1 parent ed453f9 commit 25a9fc9
Show file tree
Hide file tree
Showing 10 changed files with 1,415 additions and 0 deletions.
3 changes: 3 additions & 0 deletions IGC/AdaptorOCL/UnifyIROCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ SPDX-License-Identifier: MIT
#include "Compiler/Optimizer/OpenCLPasses/BufferBoundsChecking/BufferBoundsCheckingPatcher.hpp"
#include "Compiler/Optimizer/OpenCLPasses/MinimumValidAddressChecking/MinimumValidAddressChecking.hpp"
#include "Compiler/Optimizer/OpenCLPasses/Spv2dBlockIOResolution/Spv2dBlockIOResolution.hpp"
#include "Compiler/Optimizer/OpenCLPasses/SpvSubgroupMMAResolution/SpvSubgroupMMAResolution.hpp"

#include "common/debug/Debug.hpp"
#include "common/igc_regkeys.hpp"
Expand Down Expand Up @@ -413,6 +414,8 @@ static void CommonOCLBasedPasses(OpenCLProgramContext* pContext)
// This pass should be run before BuiltInImport and before Inlining to allow cache control to be resolved
mpm.add(new Spv2dBlockIOResolution());

mpm.add(new SpvSubgroupMMAResolution());

mpm.add(new PreBIImportAnalysis());
mpm.add(createTimeStatsCounterPass(pContext, TIME_Unify_BuiltinImport, STATS_COUNTER_START));
mpm.add(createBuiltInImportPass());
Expand Down
1 change: 1 addition & 0 deletions IGC/Compiler/InitializePasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ void initializeSimd32ProfitabilityAnalysisPass(llvm::PassRegistry&);
void initializeSetFastMathFlagsPass(llvm::PassRegistry&);
void initializeSPIRMetaDataTranslationPass(llvm::PassRegistry&);
void initializeSpv2dBlockIOResolutionPass(llvm::PassRegistry&);
void initializeSpvSubgroupMMAResolutionPass(llvm::PassRegistry&);
void initializeStatelessToStatefulPass(llvm::PassRegistry&);
void initializeSubGroupFuncsResolutionPass(llvm::PassRegistry&);
void initializeSubGroupReductionPatternPass(llvm::PassRegistry&);
Expand Down
3 changes: 3 additions & 0 deletions IGC/Compiler/Optimizer/OpenCLPasses/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ add_subdirectory(RewriteLocalSize)
add_subdirectory(ScalarArgAsPointer)
add_subdirectory(SetFastMathFlags)
add_subdirectory(Spv2dBlockIOResolution)
add_subdirectory(SpvSubgroupMMAResolution)
add_subdirectory(StackOverflowDetection)
add_subdirectory(StatelessToStateful)
add_subdirectory(SubGroupFuncs)
Expand Down Expand Up @@ -101,6 +102,7 @@ set(IGC_BUILD__SRC__Optimizer_OpenCLPasses_All
${IGC_BUILD__SRC__OpenCLPasses_ScalarArgAsPointer}
${IGC_BUILD__SRC__OpenCLPasses_SetFastMathFlags}
${IGC_BUILD__SRC__OpenCLPasses_Spv2dBlockIOResolution}
${IGC_BUILD__SRC__OpenCLPasses_SpvSubgroupMMAResolution}
${IGC_BUILD__SRC__OpenCLPasses_StackOverflowDetection}
${IGC_BUILD__SRC__OpenCLPasses_StatelessToStateful}
${IGC_BUILD__SRC__OpenCLPasses_SubGroupFuncs}
Expand Down Expand Up @@ -158,6 +160,7 @@ set(IGC_BUILD__HDR__Optimizer_OpenCLPasses_All
${IGC_BUILD__HDR__OpenCLPasses_ScalarArgAsPointer}
${IGC_BUILD__HDR__OpenCLPasses_SetFastMathFlags}
${IGC_BUILD__HDR__OpenCLPasses_Spv2dBlockIOResolution}
${IGC_BUILD__HDR__OpenCLPasses_SpvSubgroupMMAResolution}
${IGC_BUILD__HDR__OpenCLPasses_StackOverflowDetection}
${IGC_BUILD__HDR__OpenCLPasses_StatelessToStatefull}
${IGC_BUILD__HDR__OpenCLPasses_SubGroupFuncs}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#=========================== begin_copyright_notice ============================
#
# Copyright (C) 2024 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
#============================ end_copyright_notice =============================

include_directories("${CMAKE_CURRENT_SOURCE_DIR}")

set(IGC_BUILD__SRC__SpvSubgroupMMAResolution
"${CMAKE_CURRENT_SOURCE_DIR}/SpvSubgroupMMAResolution.cpp"
)
set(IGC_BUILD__SRC__OpenCLPasses_SpvSubgroupMMAResolution ${IGC_BUILD__SRC__SpvSubgroupMMAResolution} PARENT_SCOPE)

set(IGC_BUILD__HDR__SpvSubgroupMMAResolution
"${CMAKE_CURRENT_SOURCE_DIR}/SpvSubgroupMMAResolution.hpp"
)
set(IGC_BUILD__HDR__OpenCLPasses_SpvSubgroupMMAResolution ${IGC_BUILD__HDR__SpvSubgroupMMAResolution} PARENT_SCOPE)

igc_sg_register(
Compiler__OpenCLPasses_SpvSubgroupMMAResolution
"SpvSubgroupMMAResolution"
FILES
${IGC_BUILD__SRC__SpvSubgroupMMAResolution}
${IGC_BUILD__HDR__SpvSubgroupMMAResolution}
)
Loading

0 comments on commit 25a9fc9

Please sign in to comment.