From f3b38e5d1214afa6046ad21543ab3bb10d2d3b98 Mon Sep 17 00:00:00 2001 From: Ze Zhang Date: Wed, 14 Feb 2024 18:18:11 -0800 Subject: [PATCH] DecomposeComplexOps: update parseEquation to skip space char for AtenEinsumOp op (#2910) Just a minor update to skip the space char if included in the equation string --------- Co-authored-by: Ze Zhang --- lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp b/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp index bc5276dca..abd716c56 100644 --- a/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp +++ b/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp @@ -181,7 +181,7 @@ static bool parseEquation(const std::string &equation, inputToken.clear(); currentVariable = kIsResult; index++; - } else { + } else if (equation[index] != ' ') { return false; } index++;