Open tfruan2000 opened 1 week ago
I can make the follow ir legal by change the td
file like:
%1 = tt.atomic_rmw fadd, relaxed, gpu, %0, %cst, %mask : (!tt.ptr<tensor<128x32xf16>>, tensor<128x32xf16>, tensor<128x32xi1>) -> tensor<128x32xf16>
but I’m not sure if this change is correct
I noticed that the PR Support block pointer semantics #1392 was the first to add the TT_TensorPtr
type to tt.load and tt.store. Could it be that the pointer type for atomic operations was overlooked, or is it meanless for atomic ops to support TT_TensorPtr
like load and store
Hi, guys~
I am a bit confused about the definition of
tt.atomic_rmw
in TritonOps.td.Currently, the type verification for the ptr and val operands is done using
getPointerTypeSameShape
.However, the behavior of this op is similar to
tt.load
andtt.store
, but intt.load
andtt.store
,getPointeeType
is used for verification.This leads to the following IR describing tt.store being valid
while the corresponding IR for tt.atomic_rmw is considered invalid
And the type of ptr in
atomic_rmw
don't allowTT_PtrLike
(!ptr<tensor<>>).Could some one explain why we don't define
tt.atomic_rmw
same astt.load
, like:thx~