diff options
| author | Lei Zhang <antiagainst@google.com> | 2019-03-08 13:57:27 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 17:08:20 -0700 |
| commit | d6afced0069e2d37ab3b1d8a227f7e1b74d4da55 (patch) | |
| tree | 121cf6db8c48c0cc4e314736e7a691c19a907fff | |
| parent | 684cc6e8da2682cc0fee022aa8276f25b43a242c (diff) | |
| download | bcm5719-llvm-d6afced0069e2d37ab3b1d8a227f7e1b74d4da55.tar.gz bcm5719-llvm-d6afced0069e2d37ab3b1d8a227f7e1b74d4da55.zip | |
[TF] Define tf.FusedBatchNormOp in TableGen
Also fixed wrong epsilon attribute types for tf.FusedBatchNormOp in test cases.
PiperOrigin-RevId: 237514017
| -rw-r--r-- | mlir/include/mlir/IR/OpBase.td | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mlir/include/mlir/IR/OpBase.td b/mlir/include/mlir/IR/OpBase.td index 94f729a3c67..4118fa10df9 100644 --- a/mlir/include/mlir/IR/OpBase.td +++ b/mlir/include/mlir/IR/OpBase.td @@ -338,7 +338,8 @@ class TypeBasedAttr<BuildableType t, string attrName, string descr> : } // An attribute backed by a string type. -class StringBasedAttr<string descr> : Attr<CPred<"true">, descr> { +class StringBasedAttr<Pred condition, string descr> : + Attr<condition, descr> { let constBuilderCall = [{ {0}.getStringAttr("{1}") }]; let storageType = [{ StringAttr }]; let returnType = [{ StringRef }]; @@ -378,7 +379,7 @@ def I32Attr : IntegerAttrBase<I32, "32-bit integer"> { let returnType = [{ int }]; let convertFromStorage = [{ {0}.getValue().getSExtValue() }]; } -def StrAttr : StringBasedAttr<"string">; +def StrAttr : StringBasedAttr<CPred<"true">, "string">; // Attributes containing functions. def FunctionAttr |

