/external/tensorflow/tensorflow/compiler/mlir/lite/utils/ |
D | validators.cc | 28 bool TFIntListIs1XY1(Operation *op, StringRef name, IntegerAttr *x, in TFIntListIs1XY1() 29 IntegerAttr *y) { in TFIntListIs1XY1() 36 [](Attribute e) { return !e.isa<IntegerAttr>(); })) in TFIntListIs1XY1() 39 if (elements.front().cast<IntegerAttr>().getInt() != 1 || in TFIntListIs1XY1() 40 elements.back().cast<IntegerAttr>().getInt() != 1) in TFIntListIs1XY1() 44 *x = b.getI32IntegerAttr(elements[1].cast<IntegerAttr>().getInt()); in TFIntListIs1XY1() 45 *y = b.getI32IntegerAttr(elements[2].cast<IntegerAttr>().getInt()); in TFIntListIs1XY1() 55 [](Attribute e) { return !e.isa<IntegerAttr>(); })) in TFIntListIs1XY1() 58 if (elements.front().cast<IntegerAttr>().getValue() != 1 || in TFIntListIs1XY1() 59 elements.back().cast<IntegerAttr>().getValue() != 1) in TFIntListIs1XY1() [all …]
|
D | validators.h | 50 bool TFIntListIs1XY1(Operation *op, StringRef name, IntegerAttr *x, 51 IntegerAttr *y); 60 bool TFIntListIs1XYZ1(Operation *op, StringRef name, IntegerAttr *x, 61 IntegerAttr *y, IntegerAttr *z);
|
D | attribute_utils.cc | 39 IntegerAttr ExtractSingleElementAsInteger(ElementsAttr attr) { in ExtractSingleElementAsInteger() 45 return attr.getValue<IntegerAttr>(index); in ExtractSingleElementAsInteger()
|
D | tftext_utils.cc | 214 auto width = attrs.get("width").dyn_cast_or_null<IntegerAttr>(); in CreateNgramsCustomOption() 232 auto axis = attrs.get("axis").dyn_cast_or_null<IntegerAttr>(); in CreateNgramsCustomOption() 304 auto buckets = attr.GetAttrs().get("buckets").dyn_cast_or_null<IntegerAttr>(); in VerifySgnnProjection() 321 (hash_seed.getValue().data() + i)->dyn_cast<IntegerAttr>().getInt())); in CreateSgnnProjectionCustomOption() 325 auto buckets = attrs.get("buckets").dyn_cast_or_null<IntegerAttr>(); in CreateSgnnProjectionCustomOption()
|
/external/llvm-project/mlir/lib/Dialect/SPIRV/ |
D | SPIRVAttributes.cpp | 124 : IntegerAttr(); in get() 129 spirv::InterfaceVarABIAttr::get(IntegerAttr descriptorSet, IntegerAttr binding, in get() 130 IntegerAttr storageClass) { in get() 141 return getImpl()->binding.cast<IntegerAttr>().getInt(); in getBinding() 145 return getImpl()->descriptorSet.cast<IntegerAttr>().getInt(); in getDescriptorSet() 151 getImpl()->storageClass.cast<IntegerAttr>().getValue().getZExtValue()); in getStorageClass() 156 Location loc, IntegerAttr descriptorSet, IntegerAttr binding, in verifyConstructionInvariants() 157 IntegerAttr storageClass) { in verifyConstructionInvariants() 165 if (auto storageClassAttr = storageClass.cast<IntegerAttr>()) { in verifyConstructionInvariants() 202 spirv::VerCapExtAttr spirv::VerCapExtAttr::get(IntegerAttr version, in get() [all …]
|
/external/llvm-project/mlir/include/mlir/Dialect/SPIRV/ |
D | SPIRVAttributes.h | 49 static InterfaceVarABIAttr get(IntegerAttr descriptorSet, IntegerAttr binding, 50 IntegerAttr storageClass); 65 IntegerAttr descriptorSet, 66 IntegerAttr binding, 67 IntegerAttr storageClass); 82 static VerCapExtAttr get(IntegerAttr version, ArrayAttr capabilities, 116 IntegerAttr version,
|
/external/llvm-project/mlir/lib/IR/ |
D | Builders.cpp | 98 IntegerAttr Builder::getIndexAttr(int64_t value) { in getIndexAttr() 99 return IntegerAttr::get(getIndexType(), APInt(64, value)); in getIndexAttr() 102 IntegerAttr Builder::getI64IntegerAttr(int64_t value) { in getI64IntegerAttr() 103 return IntegerAttr::get(getIntegerType(64), APInt(64, value)); in getI64IntegerAttr() 145 IntegerAttr Builder::getI32IntegerAttr(int32_t value) { in getI32IntegerAttr() 146 return IntegerAttr::get(getIntegerType(32), APInt(32, value)); in getI32IntegerAttr() 149 IntegerAttr Builder::getSI32IntegerAttr(int32_t value) { in getSI32IntegerAttr() 150 return IntegerAttr::get(getIntegerType(32, /*isSigned=*/true), in getSI32IntegerAttr() 154 IntegerAttr Builder::getUI32IntegerAttr(uint32_t value) { in getUI32IntegerAttr() 155 return IntegerAttr::get(getIntegerType(32, /*isSigned=*/false), in getUI32IntegerAttr() [all …]
|
/external/llvm-project/mlir/lib/Conversion/SPIRVToLLVM/ |
D | ConvertLaunchFuncToLLVMCalls.cpp | 55 IntegerAttr binding = op->getAttrOfType<IntegerAttr>(bindingName()); in calculateGlobalIndex() 77 IntegerAttr descriptorSet = in createGlobalVariableWithBindName() 78 op->getAttrOfType<IntegerAttr>(descriptorSetName()); in createGlobalVariableWithBindName() 79 IntegerAttr binding = op->getAttrOfType<IntegerAttr>(bindingName()); in createGlobalVariableWithBindName() 89 IntegerAttr descriptorSet = in hasDescriptorSetAndBinding() 90 op->getAttrOfType<IntegerAttr>(descriptorSetName()); in hasDescriptorSetAndBinding() 91 IntegerAttr binding = op->getAttrOfType<IntegerAttr>(bindingName()); in hasDescriptorSetAndBinding()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/ |
D | translate_utils.cc | 46 version_attr.get("producer").dyn_cast_or_null<mlir::IntegerAttr>(); in ExtractTfVersions() 51 version_attr.get("min_consumer").dyn_cast_or_null<mlir::IntegerAttr>(); in ExtractTfVersions() 60 bad_consumer.dyn_cast_or_null<mlir::IntegerAttr>(); in ExtractTfVersions() 75 auto producer = versions.get("producer").dyn_cast<mlir::IntegerAttr>(); in GetTfGraphProducerVersion()
|
/external/llvm-project/mlir/lib/Dialect/Async/Transforms/ |
D | AsyncRefCounting.cpp | 125 builder.create<DropRefOp>(loc, value, IntegerAttr::get(i32, 1)); in addAutomaticRefCounting() 203 builder.create<DropRefOp>(loc, value, IntegerAttr::get(i32, 1)); in addAutomaticRefCounting() 235 builder.create<DropRefOp>(loc, value, IntegerAttr::get(i32, 1)); in addAutomaticRefCounting() 270 builder.create<AddRefOp>(loc, value, IntegerAttr::get(i32, 1)); in addAutomaticRefCounting() 274 executeBuilder.create<DropRefOp>(loc, value, IntegerAttr::get(i32, 1)); in addAutomaticRefCounting()
|
/external/llvm-project/mlir/include/mlir/IR/ |
D | Builders.h | 33 class IntegerAttr; variable 92 IntegerAttr getIntegerAttr(Type type, int64_t value); 93 IntegerAttr getIntegerAttr(Type type, const APInt &value); 113 IntegerAttr getI8IntegerAttr(int8_t value); 114 IntegerAttr getI16IntegerAttr(int16_t value); 115 IntegerAttr getI32IntegerAttr(int32_t value); 116 IntegerAttr getI64IntegerAttr(int64_t value); 117 IntegerAttr getIndexAttr(int64_t value); 120 IntegerAttr getSI32IntegerAttr(int32_t value); 121 IntegerAttr getUI32IntegerAttr(uint32_t value);
|
D | Matchers.h | 89 IntegerAttr::ValueType *bind_value; 92 constant_int_op_binder(IntegerAttr::ValueType *bv) : bind_value(bv) {} in constant_int_op_binder() 101 return attr_value_binder<IntegerAttr>(bind_value).match(attr); in match() 104 return attr_value_binder<IntegerAttr>(bind_value) in match() 260 m_ConstantInt(IntegerAttr::ValueType *bind_value) { in m_ConstantInt()
|
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/ |
D | dilated_conv.h | 144 int64_t squeeze_axis = squeeze_dims[0].cast<IntegerAttr>().getInt(); in matchAndRewrite() 244 auto paddings = stb_paddings_attr.getValues<IntegerAttr>(); in matchAndRewrite() 245 auto crops = bts_crops_attr.getValues<IntegerAttr>(); in matchAndRewrite() 327 dilation_h_factor = stb_bs_attr.getValue({0}).cast<IntegerAttr>().getInt(); in ExtractDilationsAttrFromBlockShape() 328 dilation_w_factor = stb_bs_attr.getValue({1}).cast<IntegerAttr>().getInt(); in ExtractDilationsAttrFromBlockShape() 337 stb_bs_attr.getValue({0}).cast<IntegerAttr>().getInt(); in ExtractDilationsAttrFromBlockShape() 341 stb_bs_attr.getValue({0}).cast<IntegerAttr>().getInt(); in ExtractDilationsAttrFromBlockShape()
|
D | legalize_tf.cc | 203 LogicalResult ConvertToI32Attr(IntegerAttr attr, IntegerAttr* attr_i32) { in ConvertToI32Attr() 215 *attr_i32 = IntegerAttr::get( in ConvertToI32Attr() 229 IntegerAttr axis_int = ExtractSingleElementAsInteger(axis); in matchAndRewrite() 232 IntegerAttr axis_i32; in matchAndRewrite() 348 IntegerAttr stride_depth, stride_height, stride_width; in matchAndRewrite() 353 IntegerAttr dilation_depth_factor, dilation_height_factor, in matchAndRewrite() 465 IntegerAttr index = index_attr.cast<IntegerAttr>(); in matchAndRewrite()
|
/external/llvm-project/mlir/unittests/Dialect/Quant/ |
D | QuantizationUtilsTest.cpp | 89 EXPECT_EQ(valueResult.cast<IntegerAttr>().getInt(), 5); in TEST() 91 valueResult.cast<IntegerAttr>().getType().cast<IntegerType>().getWidth(), in TEST() 117 EXPECT_EQ(firstValue.cast<IntegerAttr>().getInt(), 5); in TEST() 142 EXPECT_EQ(firstValue.cast<IntegerAttr>().getInt(), 5); in TEST() 166 EXPECT_EQ(firstValue.cast<IntegerAttr>().getInt(), 5); in TEST()
|
/external/tensorflow/tensorflow/compiler/mlir/tosa/transforms/ |
D | legalize_tf.cc | 477 int32_t axis = axis_elems.getValue<IntegerAttr>({}).getInt(); in matchAndRewrite() 486 IntegerAttr axis_attr = rewriter.getI64IntegerAttr(axis); in matchAndRewrite() 516 int64_t stride_h = tmpAttr[1].dyn_cast<IntegerAttr>().getInt(); in matchAndRewrite() 517 int64_t stride_w = tmpAttr[2].dyn_cast<IntegerAttr>().getInt(); in matchAndRewrite() 527 int64_t kernel_h = tmpAttr[1].dyn_cast<IntegerAttr>().getInt(); in matchAndRewrite() 528 int64_t kernel_w = tmpAttr[2].dyn_cast<IntegerAttr>().getInt(); in matchAndRewrite() 543 int64_t value = elem.dyn_cast<IntegerAttr>().getInt(); in matchAndRewrite() 586 int64_t stride_h = tmpAttr[1].dyn_cast<IntegerAttr>().getInt(); in matchAndRewrite() 587 int64_t stride_w = tmpAttr[2].dyn_cast<IntegerAttr>().getInt(); in matchAndRewrite() 597 int64_t kernel_h = tmpAttr[1].dyn_cast<IntegerAttr>().getInt(); in matchAndRewrite() [all …]
|
D | legalize_utils.cc | 221 for (auto idx : elems.getValues<IntegerAttr>()) { in getVectorFromValue32() 252 int64_t dim_dilation = dilations[i].template cast<IntegerAttr>().getInt(); in getPaddingValuesFromPadType() 253 int64_t dim_stride = strides[i].template cast<IntegerAttr>().getInt(); in getPaddingValuesFromPadType() 293 pad_before = explicit_pad[dim * 2].template cast<IntegerAttr>().getInt(); in getPaddingValuesFromExplicitPadAttr() 294 pad_after = explicit_pad[dim * 2 + 1].template cast<IntegerAttr>().getInt(); in getPaddingValuesFromExplicitPadAttr() 327 int64_t dim_dilation = dilations[i].template cast<IntegerAttr>().getInt(); in getTransposeConv2dPaddingValues() 328 int64_t dim_stride = strides[i].template cast<IntegerAttr>().getInt(); in getTransposeConv2dPaddingValues()
|
/external/tensorflow/tensorflow/compiler/mlir/python/mlir_wrapper/ |
D | attrs.cc | 22 py::class_<mlir::IntegerAttr, mlir::Attribute>(m, "IntegerAttr") in init_attrs() 24 py::overload_cast<mlir::Type, int64_t>(&mlir::IntegerAttr::get)); in init_attrs()
|
/external/llvm-project/mlir/lib/Conversion/StandardToSPIRV/ |
D | ConvertStandardToSPIRV.cpp | 45 if (auto intAttr = srcAttr.dyn_cast<IntegerAttr>()) in convertBoolAttr() 52 static IntegerAttr convertIntegerAttr(IntegerAttr srcAttr, IntegerType dstType, in convertIntegerAttr() 74 return IntegerAttr(); in convertIntegerAttr() 144 IntegerAttr idxAttr = in getOffsetForBitwidth() 147 IntegerAttr srcBitsAttr = builder.getIntegerAttr(targetType, sourceBits); in getOffsetForBitwidth() 169 IntegerAttr attr = in adjustAccessChainForBitwidth() 516 zeroAttr = IntegerAttr::get(dstType, 0); in matchAndRewrite() 517 oneAttr = IntegerAttr::get(dstType, 1); in matchAndRewrite() 640 IntegerAttr dstAttr = in matchAndRewrite() 641 convertIntegerAttr(srcAttr.cast<IntegerAttr>(), in matchAndRewrite() [all …]
|
/external/llvm-project/mlir/include/mlir/Dialect/Tosa/Utils/ |
D | QuantUtils.h | 58 Attribute maxAttr, IntegerAttr quantBits, 65 IntegerAttr quantBits, int filterQuantDim,
|
/external/llvm-project/mlir/test/mlir-tblgen/ |
D | predicate.td | 36 // CHECK: (tblgen_attr.cast<::mlir::IntegerAttr>().getInt() >= 10) 44 // CHECK: (tblgen_attr.cast<::mlir::IntegerAttr>().getInt() <= 10) 60 …ize() > 0)) && ((tblgen_attr.cast<::mlir::ArrayAttr>()[0].cast<::mlir::IntegerAttr>().getInt() == … 68 …ize() > 0)) && ((tblgen_attr.cast<::mlir::ArrayAttr>()[0].cast<::mlir::IntegerAttr>().getInt() >= …
|
/external/llvm-project/mlir/lib/Interfaces/ |
D | ViewLikeInterface.cpp | 30 return isDynamic(attr.cast<IntegerAttr>().getInt()); in verifyOpWithOffsetSizesAndStridesPart() 71 int64_t val = a.cast<IntegerAttr>().getInt(); in printListOfOperandsOrIntegers() 126 IntegerAttr attr; in parseListOfOperandsOrIntegers() 127 if (failed(parser.parseAttribute<IntegerAttr>(attr))) in parseListOfOperandsOrIntegers()
|
/external/llvm-project/mlir/include/mlir/Interfaces/ |
D | ViewLikeInterface.td | 161 .template getAsValueRange<IntegerAttr>().begin() + idx); 175 .template getAsValueRange<IntegerAttr>().begin() + idx); 189 .template getAsValueRange<IntegerAttr>().begin() + idx); 205 template getAsValueRange<IntegerAttr>().begin() + idx); 220 template getAsValueRange<IntegerAttr>().begin() + idx); 235 template getAsValueRange<IntegerAttr>().begin() + idx); 307 return isDynamic(attr.cast<IntegerAttr>().getInt());
|
/external/llvm-project/mlir/test/Bindings/Python/dialects/ |
D | python_test.py | 18 one = IntegerAttr.get(i32, 1) 19 two = IntegerAttr.get(i32, 2)
|
/external/llvm-project/mlir/lib/Dialect/StandardOps/IR/ |
D | Ops.cpp | 247 return constFoldBinaryOp<IntegerAttr>(operands, in fold() 255 return a.cast<IntegerAttr>().getInt(); in extractFromI64ArrayAttr() 348 newOperands, IntegerAttr()); in matchAndRewrite() 401 return constFoldBinaryOp<IntegerAttr>(operands, in fold() 833 auto lhs = operands.front().dyn_cast_or_null<IntegerAttr>(); in fold() 834 auto rhs = operands.back().dyn_cast_or_null<IntegerAttr>(); in fold() 915 return IntegerAttr::get(IntegerType::get(1, getContext()), APInt(1, val)); in fold() 1092 if (IntegerAttr condAttr = operands.front().dyn_cast_or_null<IntegerAttr>()) in getSuccessorForOperands() 1147 if (auto intAttr = value.dyn_cast<IntegerAttr>()) { in verify() 1203 if (auto intCst = getValue().dyn_cast<IntegerAttr>()) { in getAsmResultNames() [all …]
|