File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -276,8 +276,12 @@ class PoisonOpAxisInfoVisitor final : public AxisInfoVisitorImpl<ub::PoisonOp> {
276276 getAxisInfo (ub::PoisonOp op,
277277 ArrayRef<const dataflow::Lattice<AxisInfo> *> operands) override {
278278 unsigned rank = 1 ;
279- if (auto shape = dyn_cast<RankedTensorType>(op.getType ()))
279+ if (auto shape = dyn_cast<RankedTensorType>(op.getType ())) {
280280 rank = shape.getRank ();
281+ } else if (auto ptrTy = dyn_cast<PointerType>(op.getType ())) {
282+ if (auto tensorType = dyn_cast<RankedTensorType>(ptrTy.getPointeeType ()))
283+ rank = tensorType.getRank ();
284+ }
281285
282286 // Poison values are never accessed, thus assume optimistic values.
283287 return AxisInfo (AxisInfo::DimVectorT (rank, kMaxDivisor ),
You can’t perform that action at this time.
0 commit comments