diff options
author | Gunes Bayir <gunes.bayir@arm.com> | 2024-07-02 15:45:01 +0100 |
---|---|---|
committer | Gunes Bayir <gunes.bayir@arm.com> | 2024-07-02 16:00:11 +0000 |
commit | a3f238a44d9f306c77be0177f13d22ae3f3bcc57 (patch) | |
tree | 44bf40fb59fb8c4452d65d25e3a967c035bc6863 /src/core/NEON/kernels/arm_gemm/gemm_int8.cpp | |
parent | f92b0fffa0d32dc08340c1abfa1a7f09c6e53795 (diff) | |
download | ComputeLibrary-a3f238a44d9f306c77be0177f13d22ae3f3bcc57.tar.gz |
Revert "Update CPU kernels and add mixed sign GEMM support"
This reverts commit fc94f4d23abd4bc427b701f54ad85282e9ec7872 and 5d6fff041ade7eb44af0945867212f3979be3d3e (because the latter fixes a build failure caused by the former)
Change-Id: I7d07fea8307e9a7033b30874bbb14ba9202b23d8
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11815
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Adnan AlSinan <adnan.alsinan@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/arm_gemm/gemm_int8.cpp')
-rw-r--r-- | src/core/NEON/kernels/arm_gemm/gemm_int8.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/src/core/NEON/kernels/arm_gemm/gemm_int8.cpp b/src/core/NEON/kernels/arm_gemm/gemm_int8.cpp index 464e2c6059..fedda3a47a 100644 --- a/src/core/NEON/kernels/arm_gemm/gemm_int8.cpp +++ b/src/core/NEON/kernels/arm_gemm/gemm_int8.cpp @@ -54,7 +54,7 @@ namespace arm_gemm { -static const GemmImplementation<int8_t, int8_t, int32_t> gemm_s8_methods[] = { +static const GemmImplementation<int8_t, int32_t> gemm_s8_methods[] = { #ifdef ARM_COMPUTE_ENABLE_SVE #ifdef ARM_COMPUTE_ENABLE_SME2 // SME kernels @@ -82,48 +82,48 @@ static const GemmImplementation<int8_t, int8_t, int32_t> gemm_s8_methods[] = { [](const GemmArgs &args) { return new GemmInterleavedNoMerge<cls_sme2_interleaved_nomerge_s8s32_mopa_2VLx2VL, int8_t, int32_t>(args); } }, #endif // ARM_COMPUTE_ENABLE_SME2 -GemmImplementation<int8_t, int8_t, int32_t>::with_estimate( +GemmImplementation<int8_t, int32_t>::with_estimate( GemmMethod::GEMM_HYBRID, "sve_hybrid_s8s32_mmla_6x4VL", [](const GemmArgs &args) { return args._ci->has_svei8mm(); }, - [](const GemmArgs &args) { return GemmHybridIndirect<cls_sve_hybrid_s8s32_mmla_6x4VL, int8_t, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, - [](const GemmArgs &args) { return new GemmHybridIndirect<cls_sve_hybrid_s8s32_mmla_6x4VL, int8_t, int8_t, int32_t>(args); } + [](const GemmArgs &args) { return GemmHybridIndirect<cls_sve_hybrid_s8s32_mmla_6x4VL, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, + [](const GemmArgs &args) { return new GemmHybridIndirect<cls_sve_hybrid_s8s32_mmla_6x4VL, int8_t, int32_t>(args); } ), -GemmImplementation<int8_t, int8_t, int32_t>::with_estimate( +GemmImplementation<int8_t, int32_t>::with_estimate( GemmMethod::GEMM_INTERLEAVED, "sve_interleaved_s8s32_mmla_8x3VL", [](const GemmArgs &args) { return args._ci->has_svei8mm() && (args._Ksize>8); }, - [](const GemmArgs &args) { return GemmInterleaved<cls_sve_interleaved_s8s32_mmla_8x3VL, int8_t, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, - [](const GemmArgs &args) { return new GemmInterleaved<cls_sve_interleaved_s8s32_mmla_8x3VL, int8_t, int8_t, int32_t>(args); } + [](const GemmArgs &args) { return GemmInterleaved<cls_sve_interleaved_s8s32_mmla_8x3VL, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, + [](const GemmArgs &args) { return new GemmInterleaved<cls_sve_interleaved_s8s32_mmla_8x3VL, int8_t, int32_t>(args); } ), -GemmImplementation<int8_t, int8_t, int32_t>::with_estimate( +GemmImplementation<int8_t, int32_t>::with_estimate( GemmMethod::GEMM_HYBRID, "sve_hybrid_s8s32_dot_6x4VL", [](const GemmArgs &args) { return args._ci->has_sve() && args._Ksize>=16; }, - [](const GemmArgs &args) { return GemmHybridIndirect<cls_sve_hybrid_s8s32_dot_6x4VL, int8_t, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, - [](const GemmArgs &args) { return new GemmHybridIndirect<cls_sve_hybrid_s8s32_dot_6x4VL, int8_t, int8_t, int32_t>(args); } + [](const GemmArgs &args) { return GemmHybridIndirect<cls_sve_hybrid_s8s32_dot_6x4VL, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, + [](const GemmArgs &args) { return new GemmHybridIndirect<cls_sve_hybrid_s8s32_dot_6x4VL, int8_t, int32_t>(args); } ), -GemmImplementation<int8_t, int8_t, int32_t>::with_estimate( +GemmImplementation<int8_t, int32_t>::with_estimate( GemmMethod::GEMM_INTERLEAVED, "sve_interleaved_s8s32_dot_8x3VL", [](const GemmArgs &args) { return args._ci->has_sve() && (args._Ksize>4); }, - [](const GemmArgs &args) { return GemmInterleaved<cls_sve_interleaved_s8s32_dot_8x3VL, int8_t, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, - [](const GemmArgs &args) { return new GemmInterleaved<cls_sve_interleaved_s8s32_dot_8x3VL, int8_t, int8_t, int32_t>(args); } + [](const GemmArgs &args) { return GemmInterleaved<cls_sve_interleaved_s8s32_dot_8x3VL, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, + [](const GemmArgs &args) { return new GemmInterleaved<cls_sve_interleaved_s8s32_dot_8x3VL, int8_t, int32_t>(args); } ), #endif // ARM_COMPUTE_ENABLE_SVE -GemmImplementation<int8_t, int8_t, int32_t>::with_estimate( +GemmImplementation<int8_t, int32_t>::with_estimate( GemmMethod::GEMM_INTERLEAVED, "a64_interleaved_s8s32_mmla_8x12", [](const GemmArgs &args) { return args._ci->has_i8mm() && (args._Ksize>8); }, - [](const GemmArgs &args) { return GemmInterleaved<cls_a64_interleaved_s8s32_mmla_8x12, int8_t, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, - [](const GemmArgs &args) { return new GemmInterleaved<cls_a64_interleaved_s8s32_mmla_8x12, int8_t, int8_t, int32_t>(args); } + [](const GemmArgs &args) { return GemmInterleaved<cls_a64_interleaved_s8s32_mmla_8x12, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, + [](const GemmArgs &args) { return new GemmInterleaved<cls_a64_interleaved_s8s32_mmla_8x12, int8_t, int32_t>(args); } ), -GemmImplementation<int8_t, int8_t, int32_t>::with_estimate( +GemmImplementation<int8_t, int32_t>::with_estimate( GemmMethod::GEMM_HYBRID, "a64_hybrid_s8s32_mmla_6x16", [](const GemmArgs &args) { return args._ci->has_i8mm(); }, - [](const GemmArgs &args) { return GemmHybridIndirect<cls_a64_hybrid_s8s32_mmla_6x16, int8_t, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, - [](const GemmArgs &args) { return new GemmHybridIndirect<cls_a64_hybrid_s8s32_mmla_6x16, int8_t, int8_t, int32_t>(args); } + [](const GemmArgs &args) { return GemmHybridIndirect<cls_a64_hybrid_s8s32_mmla_6x16, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, + [](const GemmArgs &args) { return new GemmHybridIndirect<cls_a64_hybrid_s8s32_mmla_6x16, int8_t, int32_t>(args); } ), { GemmMethod::GEMM_HYBRID, @@ -144,29 +144,29 @@ GemmImplementation<int8_t, int8_t, int32_t>::with_estimate( "a64_gemm_s16_8x12", nullptr, [](const GemmArgs &args) { return args._ci->get_cpu_model() == CPUModel::A53 && ((args._Msize > 28) || ((args._Msize % 8) > 4)); }, - [](const GemmArgs &args) { return new GemmInterleaved<cls_a64_gemm_s16_8x12, int8_t, int8_t, int32_t>(args); }, + [](const GemmArgs &args) { return new GemmInterleaved<cls_a64_gemm_s16_8x12, int8_t, int32_t>(args); }, }, -GemmImplementation<int8_t, int8_t, int32_t>::with_estimate( +GemmImplementation<int8_t, int32_t>::with_estimate( GemmMethod::GEMM_HYBRID, "a64_hybrid_s8s32_dot_6x16", [](const GemmArgs &args) { return args._ci->has_dotprod(); }, - [](const GemmArgs &args) { return GemmHybridIndirect<cls_a64_hybrid_s8s32_dot_6x16, int8_t, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, - [](const GemmArgs &args) { return new GemmHybridIndirect<cls_a64_hybrid_s8s32_dot_6x16, int8_t, int8_t, int32_t>(args); } + [](const GemmArgs &args) { return GemmHybridIndirect<cls_a64_hybrid_s8s32_dot_6x16, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, + [](const GemmArgs &args) { return new GemmHybridIndirect<cls_a64_hybrid_s8s32_dot_6x16, int8_t, int32_t>(args); } ), -GemmImplementation<int8_t, int8_t, int32_t>::with_estimate( +GemmImplementation<int8_t, int32_t>::with_estimate( GemmMethod::GEMM_INTERLEAVED, "a64_gemm_s8_8x12", [](const GemmArgs &args) { return args._ci->has_dotprod(); }, - [](const GemmArgs &args) { return GemmInterleaved<cls_a64_gemm_s8_8x12, int8_t, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, - [](const GemmArgs &args) { return new GemmInterleaved<cls_a64_gemm_s8_8x12, int8_t, int8_t, int32_t>(args); } + [](const GemmArgs &args) { return GemmInterleaved<cls_a64_gemm_s8_8x12, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, + [](const GemmArgs &args) { return new GemmInterleaved<cls_a64_gemm_s8_8x12, int8_t, int32_t>(args); } ), -GemmImplementation<int8_t, int8_t, int32_t>::with_estimate( +GemmImplementation<int8_t, int32_t>::with_estimate( GemmMethod::GEMM_INTERLEAVED, "a64_gemm_s8_4x4", nullptr, - [](const GemmArgs &args) { return GemmInterleaved<cls_a64_gemm_s8_4x4, int8_t, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, - [](const GemmArgs &args) { return new GemmInterleaved<cls_a64_gemm_s8_4x4, int8_t, int8_t, int32_t>(args); } + [](const GemmArgs &args) { return GemmInterleaved<cls_a64_gemm_s8_4x4, int8_t, int32_t>::estimate_cycles<int32_t>(args); }, + [](const GemmArgs &args) { return new GemmInterleaved<cls_a64_gemm_s8_4x4, int8_t, int32_t>(args); } ), { @@ -179,15 +179,15 @@ GemmImplementation<int8_t, int8_t, int32_t>::with_estimate( }; template<> -const GemmImplementation<int8_t, int8_t, int32_t> *gemm_implementation_list<int8_t, int8_t, int32_t>() { +const GemmImplementation<int8_t, int32_t> *gemm_implementation_list<int8_t, int32_t>() { return gemm_s8_methods; } /* Explicitly instantiate the external functions for these types. */ -template UniqueGemmCommon<int8_t, int8_t, int32_t> gemm<int8_t, int8_t, int32_t, Nothing>(const GemmArgs &args, const Nothing &); -template bool has_opt_gemm<int8_t, int8_t, int32_t, Nothing>(WeightFormat &weight_format, const GemmArgs &args, const Nothing &); -template KernelDescription get_gemm_method<int8_t, int8_t, int32_t, Nothing>(const GemmArgs &args, const Nothing &); -template std::vector<KernelDescription> get_compatible_kernels<int8_t, int8_t, int32_t, Nothing> (const GemmArgs &args, const Nothing &); +template UniqueGemmCommon<int8_t, int32_t> gemm<int8_t, int32_t, Nothing>(const GemmArgs &args, const Nothing &); +template bool has_opt_gemm<int8_t, int32_t, Nothing>(WeightFormat &weight_format, const GemmArgs &args, const Nothing &); +template KernelDescription get_gemm_method<int8_t, int32_t, Nothing>(const GemmArgs &args, const Nothing &); +template std::vector<KernelDescription> get_compatible_kernels<int8_t, int32_t, Nothing> (const GemmArgs &args, const Nothing &); } // namespace arm_gemm |