Closed
[Bug-Report|缺陷反馈]: PReLU二维输入,报错内存不对齐 #612
陈展熹Add on  Mar 9Closed at  Mar 9
陈展熹
陈展熹
Mar 9 Create

Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.

Describe the current behavior / 问题描述 (Mandatory / 必填)

PReLU_L0_bf16_532_772,"[532,772],[772]","bf16,bf16","ND, ND","[-0.001, 0.001],[1.0, 1.0]","[532,772]",bf16,ND,"[532,772]","[32,256]",68,0.000764996
此用例,造成pto isa内存非对齐报错

Environment / 环境信息 (Mandatory / 必填)

ascend910b

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

执行用例必现

Describe the expected behavior / 预期结果 (Mandatory / 必填)

用例精度通过

/home/g00859615/PyPTO_Test/output/PReLU/20260306113854/6/pass_output/output_20260306_113904_113269_3471959/kernel_aicore/TENSOR_LOOP_L1_sIdx_Unroll1_PATH0_hiddenfunc0_11_8175045707679415625_1_aiv.cpp:3:
In file included from /usr/local/python3.11.13/lib/python3.11/site-packages/pypto/lib/include/tileop/TileOpImpl.h:20:
In file included from /usr/local/python3.11.13/lib/python3.11/site-packages/pypto/lib/include/tileop/arch32/mte.h:19:
In file included from /usr/local/python3.11.13/lib/python3.11/site-packages/pypto/lib/include/tileop/utils/../tileop_common.h:20:
In file included from /usr/local/Ascend/cann-9.0.0/include/pto/pto-inst.hpp:22:
/usr/local/Ascend/cann-9.0.0/include/pto/common/pto_tile.hpp:1308:5: error: static assertion failed due to requirement '((pto::BLayout)0 == BLayout::RowMajor && (pto::SLayout)0 == SLayout::NoneBox && Cols * sizeof(unsigned char) % TileConfig::alignedSize == 0) || ((pto::BLayout)0== BLayout::ColMajor && (pto::SLayout)0 == SLayout::NoneBox && Rows * sizeof(unsigned char) % TileConfig::alignedSize == 0) || ((pto::SLayout)0 != SLayout::NoneBox) && (((Loc == TileType::Vec) || (512 == TileConfig::fractalMxSize) || (1 == 1) || (Rows % InnerRows == 0)) && Cols %InnerCols == 0)': BFractal_ is RowMajor and SFractal_ is NoneBox: Rows must be 32 bytes align, BFractal_ is ColMajor and SFractal_ is NoneBox: Cols must be 32 bytes align, SFractal_ in not NoneBox: Rows/Cols must be integer multiple of InnerRows/InnerCols.
static_assert((BFractal_ == BLayout::RowMajor && SFractal_ == SLayout::NoneBox &&
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/python3.11.13/lib/python3.11/site-packages/pypto/lib/include/tileop/vector/prelu.h:73:23: note: in instantiation of template class 'pto::Tile<pto::TileType::Vec, unsigned char, 1, 8, pto::BLayout::RowMajor, -1, -1, pto::SLayout::NoneBox, 512, pto::PadValue::Null, pto::CompactMode::Null>' requested here
TmpTileDefine tmpTile(1, srcShape4);

Special notes for this issue/备注 (Optional / 选填)

likedislike
陈展熹
陈展熹
Mar 9 Comments:

/assign

likedislike
CANN-robotCANN-robotCollaborators
Mar 9 Assign yourealize as responsible person
陈展熹陈展熹
Mar 9 changed custom state from 进行中 to 已完成
陈展熹陈展熹
Mar 9 Close issue
杨旭杨旭Collaborators
Mar 9 associated Kanban: PyPTO
CANN-robotCANN-robotCollaborators
Mar 20 Added label: resolved