mirror of https://github.com/llvm/torch-mlir
Integrate llvm/llvm-project@282d501476 (2023-12-19) (#2675)
parent
ebaab4200f
commit
be3e74b647
|
@ -1 +1 @@
|
||||||
Subproject commit aa165edca8545b212de084d5b18c3d30347f774a
|
Subproject commit 282d501476284c46fd943dcbae87494cb08e2c5f
|
|
@ -274,7 +274,7 @@ public:
|
||||||
|
|
||||||
SmallVector<StringRef> fragments;
|
SmallVector<StringRef> fragments;
|
||||||
llvm::SplitString(op->getName().getStringRef(), 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");
|
"IsTrailingUnderscoreInplaceVariant incorrectly applied");
|
||||||
fragments[2] = fragments[2].drop_back();
|
fragments[2] = fragments[2].drop_back();
|
||||||
std::string noUnderscoreName = llvm::join(fragments, ".");
|
std::string noUnderscoreName = llvm::join(fragments, ".");
|
||||||
|
|
|
@ -78,7 +78,7 @@ LogicalResult Torch::wrapWithCalculateOpIfLibraryFunctionAvailable(
|
||||||
// mechanically consistent with existing torch conventions of in-place vs.
|
// mechanically consistent with existing torch conventions of in-place vs.
|
||||||
// out-of-place (value-semantic) variants), remove the prefix when
|
// out-of-place (value-semantic) variants), remove the prefix when
|
||||||
// looking them up in the library.
|
// looking them up in the library.
|
||||||
if (name.startswith("valsem."))
|
if (name.starts_with("valsem."))
|
||||||
name = name.drop_front(strlen("valsem."));
|
name = name.drop_front(strlen("valsem."));
|
||||||
if (isa<OperatorOp>(op))
|
if (isa<OperatorOp>(op))
|
||||||
name = cast<OperatorOp>(op)->getAttr("name").cast<StringAttr>().getValue();
|
name = cast<OperatorOp>(op)->getAttr("name").cast<StringAttr>().getValue();
|
||||||
|
|
Loading…
Reference in New Issue