Skip to content

Commit

Permalink
return in()->toInlineString() in LoadStoreOp::toInlineString (#3378)
Browse files Browse the repository at this point in the history
Fix #3360 
Return `in()->toInlineString()` in `LoadStoreOp::toInlineString`
to ensure we get a string that only consists of symbols that have no
defining expressions.
  • Loading branch information
liqiangxl authored Nov 9, 2024
1 parent b534837 commit 5b9fb77
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion csrc/ir/nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2273,7 +2273,12 @@ std::string LoadStoreOp::toString(int indent_size) const {
}

std::string LoadStoreOp::toInlineString(int indent_size) const {
NVF_CHECK(false, "Tensor op can not be printed inline");
NVF_CHECK(
!(out()->isA<TensorView>() || in()->isA<TensorView>()),
"Tensor op can not be printed inline");
// Set is allowed to have a scalar, e.g. setting the iteration domain
// of a tensor in pad.
return in()->toInlineString();
}

NVFUSER_DEFINE_CLONE_AND_CREATE(LoadStoreOp)
Expand Down

0 comments on commit 5b9fb77

Please sign in to comment.