pull/2677/head
Han-Chung Wang 2023-12-19 13:28:37 -08:00 committed by GitHub
parent ebaab4200f
commit be3e74b647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

@ -1 +1 @@
Subproject commit aa165edca8545b212de084d5b18c3d30347f774a
Subproject commit 282d501476284c46fd943dcbae87494cb08e2c5f

View File

@ -274,7 +274,7 @@ public:
SmallVector<StringRef> fragments;
llvm::SplitString(op->getName().getStringRef(), fragments, ".");
assert(fragments.size() >= 3 && fragments[2].endswith("_") &&
assert(fragments.size() >= 3 && fragments[2].ends_with("_") &&
"IsTrailingUnderscoreInplaceVariant incorrectly applied");
fragments[2] = fragments[2].drop_back();
std::string noUnderscoreName = llvm::join(fragments, ".");

View File

@ -78,7 +78,7 @@ LogicalResult Torch::wrapWithCalculateOpIfLibraryFunctionAvailable(
// mechanically consistent with existing torch conventions of in-place vs.
// out-of-place (value-semantic) variants), remove the prefix when
// looking them up in the library.
if (name.startswith("valsem."))
if (name.starts_with("valsem."))
name = name.drop_front(strlen("valsem."));
if (isa<OperatorOp>(op))
name = cast<OperatorOp>(op)->getAttr("name").cast<StringAttr>().getValue();