mirror of https://github.com/llvm/torch-mlir
parent
9adad9bc40
commit
80bd093d56
|
@ -95,6 +95,16 @@ struct OpBinder {
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ParseResult tensorResultTypeAtIndex(Torch::ValueTensorType &typeIdx, int64_t idx) {
|
||||||
|
if (idx >= op->getNumResults())
|
||||||
|
return failure();
|
||||||
|
auto t = toValidTensorType(op->getResult(idx).getType());
|
||||||
|
if (!t)
|
||||||
|
return failure();
|
||||||
|
typeIdx = t;
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
|
||||||
// Attribute accessors.
|
// Attribute accessors.
|
||||||
ParseResult s64BoolAttr(bool &value, StringRef nameSuffix,
|
ParseResult s64BoolAttr(bool &value, StringRef nameSuffix,
|
||||||
bool defaultValue = false) {
|
bool defaultValue = false) {
|
||||||
|
|
Loading…
Reference in New Issue