-
-
Save jpienaar/7ffd2e9b0737134ba2ea2729b91c9572 to your computer and use it in GitHub Desktop.
Before vs after change using lambda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static ::mlir::LogicalResult generated( | |
::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind, | |
unsigned valueGroupStartIndex) { | |
if (!(((type.isa<::mlir::TensorType>())) && ([](Type elementType) { | |
return (((elementType.isBF16())) || | |
((elementType.isa<mlir::TF::Bfloat16RefType>()))) || | |
((((elementType.isa<::mlir::ComplexType>())) && | |
((elementType.cast<::mlir::ComplexType>() | |
.getElementType() | |
.isF64()))) || | |
((elementType.isa<mlir::TF::Complex128RefType>()))) || | |
((((elementType.isa<::mlir::ComplexType>())) && | |
((elementType.cast<::mlir::ComplexType>() | |
.getElementType() | |
.isF32()))) || | |
((elementType.isa<mlir::TF::Complex64RefType>()))) || | |
(((elementType.isF16())) || | |
((elementType.isa<mlir::TF::HalfRefType>()))) || | |
(((elementType.isF32())) || | |
((elementType.isa<mlir::TF::FloatRefType>()))) || | |
(((elementType.isF64())) || | |
((elementType.isa<mlir::TF::DoubleRefType>()))) || | |
(((elementType.isSignlessInteger(16))) || | |
((elementType.isa<mlir::TF::Int16RefType>()))) || | |
(((elementType.isSignlessInteger(32))) || | |
((elementType.isa<mlir::TF::Int32RefType>()))) || | |
(((elementType.isSignlessInteger(64))) || | |
((elementType.isa<mlir::TF::Int64RefType>()))) || | |
(((elementType.isSignlessInteger(8))) || | |
((elementType.isa<mlir::TF::Int8RefType>()))); | |
}(type.cast<::mlir::ShapedType>().getElementType())))) { | |
return op->emitOpError(valueKind) << "..."; | |
} | |
return ::mlir::success(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static::mlir::LogicalResult generated( | |
::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind, | |
unsigned valueGroupStartIndex) { | |
if (!(((type.isa<::mlir::TensorType>())) && | |
((((type.cast<::mlir::ShapedType>().getElementType().isBF16())) || | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<mlir::TF::Bfloat16RefType>()))) || | |
((((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<::mlir::ComplexType>())) && | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.cast<::mlir::ComplexType>() | |
.getElementType() | |
.isF64()))) || | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<mlir::TF::Complex128RefType>()))) || | |
((((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<::mlir::ComplexType>())) && | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.cast<::mlir::ComplexType>() | |
.getElementType() | |
.isF32()))) || | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<mlir::TF::Complex64RefType>()))) || | |
(((type.cast<::mlir::ShapedType>().getElementType().isF16())) || | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<mlir::TF::HalfRefType>()))) || | |
(((type.cast<::mlir::ShapedType>().getElementType().isF32())) || | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<mlir::TF::FloatRefType>()))) || | |
(((type.cast<::mlir::ShapedType>().getElementType().isF64())) || | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<mlir::TF::DoubleRefType>()))) || | |
(((type.cast<::mlir::ShapedType>().getElementType().isSignlessInteger( | |
16))) || | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<mlir::TF::Int16RefType>()))) || | |
(((type.cast<::mlir::ShapedType>().getElementType().isSignlessInteger( | |
32))) || | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<mlir::TF::Int32RefType>()))) || | |
(((type.cast<::mlir::ShapedType>().getElementType().isSignlessInteger( | |
64))) || | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<mlir::TF::Int64RefType>()))) || | |
(((type.cast<::mlir::ShapedType>().getElementType().isSignlessInteger( | |
8))) || | |
((type.cast<::mlir::ShapedType>() | |
.getElementType() | |
.isa<mlir::TF::Int8RefType>())))))) { | |
return op->emitOpError(valueKind) << "..."; | |
} | |
return ::mlir::success(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment