You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
triton-opt -triton-raise-block-pointer ~/tmp/test1.mlir
/home/jovyan/tmp/test1.mlir:12:17: error: 'tt.broadcast' op operand #0 must be ranked tensor of floating-point or integer or ptr values, but got '!tt.ptr<tensor<1x256xbf16>>'
%bptr = tt.broadcast %ptr : tensor<1x256x!tt.ptr<bf16>> -> tensor<4x256x!tt.ptr<bf16>>
...
The text was updated successfully, but these errors were encountered:
The issue here is triggered by the rewrite of the tt.addptr outside the loop into a tt.make_tensor_ptr. The SSA value yielded by the tt.addptr operation (%2) is used in the init_arg list of the scf.for operation, and therefore that init argument is rewrittent to use the block ptr yielded by the tt.make_tensor_ptr operation just mentioned.
Unfortunately the loop contains a tt.broadcast operation which cannot accept a block ptr as its input !
We have a couple of possible solutions:
we can avoid rewriting the init_arg when the loop contains an operation which use that value and cannot be rewritten to use a block ptr (e.g. tt.broadcast), or
we can pass the original SSA value (%2) as well as the rewritten value yielded by the tt,make_tensor_ptr, and use the appropriate init_arg depending on the operation in the loop that references it (that is, use the original init_arg for tt.broadcast and the block ptr argument for operation that can accept it, such as load/store and addptr).
Reduced test:
Error:
The text was updated successfully, but these errors were encountered: