From 5b9fb7761ee7b265ecd150d8a61390ce89c815d2 Mon Sep 17 00:00:00 2001 From: Liqiang Lu <116412316+liqiangxl@users.noreply.github.com> Date: Fri, 8 Nov 2024 22:37:04 -0500 Subject: [PATCH] return in()->toInlineString() in LoadStoreOp::toInlineString (#3378) Fix #3360 Return `in()->toInlineString()` in `LoadStoreOp::toInlineString` to ensure we get a string that only consists of symbols that have no defining expressions. --- csrc/ir/nodes.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/csrc/ir/nodes.cpp b/csrc/ir/nodes.cpp index 0ff0e5c6bf3..1aaac849433 100644 --- a/csrc/ir/nodes.cpp +++ b/csrc/ir/nodes.cpp @@ -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() || in()->isA()), + "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)