Skip to content

Conversation

@masahi
Copy link
Member

@masahi masahi commented Mar 11, 2022

I got an error below when working on a model. This change fixes it.

These operator overload are "dtype-promotion aware", see

BinaryOpMatchTypes(a, b, span);

Unfortunately, I've hit this problem on a very large model (QAT BERT-large) and I don't know why it is happening at all. So I don't have a minimum repro test.

@junrushao1994 @vinx13 @spectrometerHBH @wrongtest

  7: tvm::tir::BufferAccessRegionCollector::VisitStmt_(tvm::tir::BufferStoreNode const*)
  6: tvm::tir::ExprFunctor<void (tvm::PrimExpr const&)>::VisitExpr(tvm::PrimExpr const&)
  5: tvm::tir::BufferAccessRegionCollector::VisitExpr_(tvm::tir::CallNode const*)
  4: tvm::tir::ConditionalBoundsContext::EnterWithScope()
  3: tvm::tir::ConditionalBoundsContext::GetVarBoundsFromCondition()
  2: tvm::arith::SolveInequalitiesToRange(tvm::arith::IntConstraints const&)
  1: tvm::arith::AsConditions(tvm::runtime::Array<tvm::tir::Var, void> const&, tvm::runtime::Map<tvm::tir::Var, tvm::arith::IntGroupBounds, void, void> const&, tvm::runtime::Array<tvm::PrimExpr, void> const&)
  0: tvm::tir::LE::LE(tvm::PrimExpr, tvm::PrimExpr, tvm::Span)
  File "/home/masa/projects/dev/tvm/src/tir/ir/expr.cc", line 447
TypeError: Check failed: (a.dtype() == b.dtype()) is false: mismatched types. int32 vs. int64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants