Summary
目前 PTOAS 在 lowering pto.tfillpad 时,如果判断 src == dst,就会直接选择生成 TFILLPAD_INPLACE。但从 ISA 侧实现来看,FILLPAD_INPLACE 在运行时会同时读取src.GetValidRow()/GetValidCol()、dst.GetValidRow()/GetValidCol(),这意味着它实际上依赖的是src 提供原始有效区边界,dst 提供目标填充范围边界。TFILLPAD_INPLACE 的合理语义不应简单理解为“同一个 tile value 的 fillpad”,而应理解为:
1.src 和 dst 指向同一块底层地址
2.原地 padding
而当前的ptoas语义, src 和 dst 是同一个 tile 对象,它们的 validshape 通常相同,pto.tfillpad(tileA, tileA)转换成底层cce表达TFILLPAD_INPLACE(tileA, tileA),实际运行并没有执行任何填充操作。
Motivation / use case
a5功能
Proposed API / behavior
是否可以改为根据src或者dst同地址进行判断,或者显示支持pto.tfillpad_inplace
Alternatives considered
No response
Additional context
No response
Summary
目前 PTOAS 在 lowering pto.tfillpad 时,如果判断 src == dst,就会直接选择生成 TFILLPAD_INPLACE。但从 ISA 侧实现来看,FILLPAD_INPLACE 在运行时会同时读取src.GetValidRow()/GetValidCol()、dst.GetValidRow()/GetValidCol(),这意味着它实际上依赖的是src 提供原始有效区边界,dst 提供目标填充范围边界。TFILLPAD_INPLACE 的合理语义不应简单理解为“同一个 tile value 的 fillpad”,而应理解为:
1.src 和 dst 指向同一块底层地址
2.原地 padding
而当前的ptoas语义, src 和 dst 是同一个 tile 对象,它们的 validshape 通常相同,pto.tfillpad(tileA, tileA)转换成底层cce表达TFILLPAD_INPLACE(tileA, tileA),实际运行并没有执行任何填充操作。
Motivation / use case
a5功能
Proposed API / behavior
是否可以改为根据src或者dst同地址进行判断,或者显示支持pto.tfillpad_inplace
Alternatives considered
No response
Additional context
No response