已关闭
[Bug-Report|缺陷反馈]: GCC升级不兼容变更致MakeLayoutByFormat的constexpr修饰编译失败 #4963
景明创建于  22 天前关闭于  22 天前
景明
景明成员
22 天前 创建

问题描述

GCC 新版本引入不兼容变更:constexpr 函数体内不允许调用非 constexpr 函数。

MakeLayoutByFormat 函数签名带有 constexpr 修饰,函数体内调用了 AscendC::MakeLayout/MakeShape/MakeStride 等非 constexpr 接口,属于调用栈上层的 constexpr,需要删除(在变更前该 constexpr 实际也不生效,无法在编译期求值,删除无语义影响)。

涉及文件(同名副本函数):

  • experimental/ffn/swiglu_gated_mlp/op_kernel/common/matmul_act/utils/layout_utils.h
  • gmm/common/cgmct/utils/cgmct_layout_utils.h

期望结果

删除 constexpr 修饰,适配 GCC 升级。

likedislike
景明景明成员
22 天前 修改标题为 “[Bug-Report|缺陷反馈]: GCC升级不兼容变更致MakeLayoutByFormat的constexpr修饰编译失败”,原标题为“[Bug-Report|缺陷反馈]: MakeLayoutByFormat的constexpr修饰导致GCC升级后编译失败”
景明景明成员
22 天前 修改了issue 的描述
游震成员
22 天前 评论:

/assign @gitcode_lijd

likedislike
CANN-robotCANN-robot成员
22 天前 将 gitcode_lijd 设为负责人
CANN-robotCANN-robot成员
22 天前 关闭了 issue
CANN-robotCANN-robot成员
22 天前 添加了label:resolved