Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

SIGILL on SME-only AArch64 CPUs caused by SVE auto-vectorization in SME interleave wrappers

未关闭
#1,306 12 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
cpp, linux
领域
performance

调研方向

从 interleave_indirect-sve.cpp、indirect-interleaves/list-sve.hpp 和 sme_interleave*.hpp 的实现开始,然后使用提供的 SCons 命令和最小程序进行复现。跟踪 SME 特化如何进入 SVE 源代码组,并在所述的 SME-only CPU 上验证生成的指令。完成标准是 SME2 GEMM 路径能够在没有 SIGILL 的情况下运行,同时保留有效的 SME2 内核选择。

由索引模型根据 Issue 内容生成。

描述

Summary

An ACL multi-ISA build selects an SME2 FP16 GEMM kernel on a CPU that supports SME/SME2 but does not expose non-streaming SVE. The SME2 kernel selection itself appears valid.
However, the SME input-interleave specialization is instantiated from interleave_indirect-sve.cpp. That translation unit includes indirect-interleaves/list-sve.hpp, which also pulls in the sme_interleave*.hpp implementations, and is compiled as part of the SVE source group with an SVE-enabled -march.
As a result, GCC auto-vectorizes the wrapper's ordinary C++ with non-streaming SVE instructions, raising SIGILL.

Environment

  • AArch64 Linux, GCC 11.4.0, binutils 2.38, SCons 4.0.1
  • /proc/cpuinfo Features: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm sb dcpodp flagm2 frint i8mm bf16 ecv afp sme smei16i64 smef64f64 smei8i32 smef16f32 smeb16f32 smef32f32 ebf16 sme2 sme2p1 smei16i32 smebi32i32 smeb16b16 smef16f16
  • Build: scons -j14 Werror=0 debug=0 neon=1 opencl=0 os=linux arch=armv8.6-a-sve2-sme2 multi_isa=1 build=native cppthreads=1 openmp=0 examples=0

Minimal code to reproduce

#include <arm_compute/core/TensorInfo.h>
#include <arm_compute/core/Types.h>
#include <arm_compute/runtime/NEON/NEFunctions.h>
#include <arm_compute/runtime/Tensor.h>

using namespace arm_compute;

int main()
{
    const unsigned int M = 128, N = 128, K = 128;
    Tensor a, b, c;
    a.allocator()->init(TensorInfo(TensorShape(K, M), 1, DataType::F16));
    b.allocator()->init(TensorInfo(TensorShape(N, K), 1, DataType::F16));
    c.allocator()->init(TensorInfo(TensorShape(N, M), 1, DataType::F16));
    a.allocator()->allocate();
    b.allocator()->allocate();
    c.allocator()->allocate();

    NEGEMM gemm;
    gemm.configure(&a, &b, nullptr, &c, 1.0f, 0.0f);
    gemm.run();
    return 0;
}

Compile and run:

g++ -std=c++17 -O2 -I. -Iinclude repro.cpp -Lbuild -larm_compute -Wl,-rpath,$PWD/build -lpthread -ldl -o repro
./repro

Backtrace:

#0  0x0000fffff7d6cf5c in void arm_gemm::Interleave<1u, 2u, (arm_gemm::VLType)2, half, half>(half*, half const*, unsigned long, unsigned int, unsigned int, unsigned int, unsigned int, bool, int) ()
#1  0x0000fffff7c72840 in arm_gemm::GemmInterleaved<arm_gemm::cls_sme2_interleaved_nomerge_fp16fp32fp16_mopa_1VLx4VL, half, half, half, arm_gemm::Nothing, false, false, false, true>::execute_common(arm_gemm::NDCoordinate<6u> const&, arm_gemm::NDCoordinate<6u> const&, int, arm_gemm::GemmArrays<half, half, half>&) ()
#2  0x0000fffff77d0d4c in arm_compute::cpu::kernel::CpuGemmAssemblyWrapperKernel<half, half, half>::run_nd(arm_compute::Window const&, arm_compute::ThreadInfo const&, arm_compute::Window const&) ()

Disassembly:

   0xfffff7d6cf54 <_ZN8arm_gemm10InterleaveILj1ELj2ELNS_6VLTypeE2EDhDhEEvPT3_PKT2_mjjjjbi+180>: sub     x27, x29, #0x18
   0xfffff7d6cf58 <_ZN8arm_gemm10InterleaveILj1ELj2ELNS_6VLTypeE2EDhDhEEvPT3_PKT2_mjjjjbi+184>: mov     x21, x20
=> 0xfffff7d6cf5c <_ZN8arm_gemm10InterleaveILj1ELj2ELNS_6VLTypeE2EDhDhEEvPT3_PKT2_mjjjjbi+188>: uqdecd  x21
主要语言
C++
星标
3.2k
派生
820
平均合并
1 天 1 小时
30 天内合并 PR
2

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ARM-software/ComputeLibrary 的其他 Issue

查看 ARM-software/ComputeLibrary 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。