Home
last modified time | relevance | path

Searched refs:IntegerAttr (Results 1 – 25 of 182) sorted by relevance

12345678

/llvm-project-15.0.7/mlir/include/mlir/Dialect/SPIRV/IR/
H A DSPIRVAttributes.h58 static InterfaceVarABIAttr get(IntegerAttr descriptorSet, IntegerAttr binding,
59 IntegerAttr storageClass);
74 IntegerAttr descriptorSet, IntegerAttr binding,
75 IntegerAttr storageClass);
90 static VerCapExtAttr get(IntegerAttr version, ArrayAttr capabilities,
124 IntegerAttr version, ArrayAttr capabilities,
/llvm-project-15.0.7/mlir/python/mlir/dialects/
H A D_structured_transform_ops_ext.py14 IntOrAttrList = Sequence[Union[IntegerAttr, int]]
18 def _get_int64_attr(value: Union[int, Attribute]) -> IntegerAttr:
20 return IntegerAttr.get(IntegerType.get_signless(64), value)
36 values: Optional[Union[ArrayAttr, Sequence[Union[IntegerAttr, int]]]] argument
119 dimension: Union[int, IntegerAttr], argument
120 target_size: Union[int, IntegerAttr],
121 divisor: Optional[Union[int, IntegerAttr]] = None, argument
235 static_sizes.append(IntegerAttr.get(i64_type, size))
236 elif isinstance(size, IntegerAttr):
240 IntegerAttr.get(i64_type, ShapedType._get_dynamic_size()))
[all …]
H A D_loop_transform_ops_ext.py15 def _get_int64_attr(arg: Optional[Union[int, IntegerAttr]], argument
17 if isinstance(arg, IntegerAttr):
24 return IntegerAttr.get(IntegerType.get_signless(64), arg)
87 iteration_interval: Optional[Union[int, IntegerAttr]] = None, argument
88 read_latency: Optional[Union[int, IntegerAttr]] = None,
106 factor: Union[int, IntegerAttr], argument
H A D_pdl_ops_ext.py15 def _get_int_attr(bits: int, value: Union[IntegerAttr, int]) -> IntegerAttr: argument
19 return IntegerAttr.get(ty, value)
165 benefit: Union[IntegerAttr, int], argument
203 index: Union[IntegerAttr, int], argument
219 index: Optional[Union[IntegerAttr, int]] = None, argument
H A D_arith_ops_ext.py44 super().__init__(IntegerAttr.get(result, value), loc=loc, ip=ip)
66 return IntegerAttr(self.value).value
/llvm-project-15.0.7/mlir/lib/IR/
H A DBuilders.cpp95 IntegerAttr Builder::getIndexAttr(int64_t value) { in getIndexAttr()
96 return IntegerAttr::get(getIndexType(), APInt(64, value)); in getIndexAttr()
99 IntegerAttr Builder::getI64IntegerAttr(int64_t value) { in getI64IntegerAttr()
148 IntegerAttr Builder::getI32IntegerAttr(int32_t value) { in getI32IntegerAttr()
152 IntegerAttr Builder::getSI32IntegerAttr(int32_t value) { in getSI32IntegerAttr()
157 IntegerAttr Builder::getUI32IntegerAttr(uint32_t value) { in getUI32IntegerAttr()
162 IntegerAttr Builder::getI16IntegerAttr(int16_t value) { in getI16IntegerAttr()
166 IntegerAttr Builder::getI8IntegerAttr(int8_t value) { in getI8IntegerAttr()
172 return IntegerAttr::get(type, APInt(64, value)); in getIntegerAttr()
173 return IntegerAttr::get( in getIntegerAttr()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/IR/
H A DSPIRVAttributes.cpp129 : IntegerAttr(); in get()
134 spirv::InterfaceVarABIAttr::get(IntegerAttr descriptorSet, IntegerAttr binding, in get()
135 IntegerAttr storageClass) { in get()
146 return getImpl()->binding.cast<IntegerAttr>().getInt(); in getBinding()
150 return getImpl()->descriptorSet.cast<IntegerAttr>().getInt(); in getDescriptorSet()
162 IntegerAttr binding, IntegerAttr storageClass) { in verify()
263 if (auto intAttr = attr.dyn_cast<IntegerAttr>()) in verify()
384 IntegerAttr descriptorSetAttr; in parseInterfaceVarABIAttr()
401 IntegerAttr bindingAttr; in parseInterfaceVarABIAttr()
417 IntegerAttr storageClassAttr; in parseInterfaceVarABIAttr()
[all …]
/llvm-project-15.0.7/mlir/lib/Conversion/SPIRVToLLVM/
H A DConvertLaunchFuncToLLVMCalls.cpp61 IntegerAttr binding = op->getAttrOfType<IntegerAttr>(bindingName()); in calculateGlobalIndex()
83 IntegerAttr descriptorSet = in createGlobalVariableWithBindName()
84 op->getAttrOfType<IntegerAttr>(descriptorSetName()); in createGlobalVariableWithBindName()
85 IntegerAttr binding = op->getAttrOfType<IntegerAttr>(bindingName()); in createGlobalVariableWithBindName()
95 IntegerAttr descriptorSet = in hasDescriptorSetAndBinding()
96 op->getAttrOfType<IntegerAttr>(descriptorSetName()); in hasDescriptorSetAndBinding()
97 IntegerAttr binding = op->getAttrOfType<IntegerAttr>(bindingName()); in hasDescriptorSetAndBinding()
/llvm-project-15.0.7/mlir/lib/Dialect/Arithmetic/IR/
H A DArithmeticOps.cpp208 return constFoldBinaryOp<IntegerAttr>( in fold()
230 return constFoldBinaryOp<IntegerAttr>( in fold()
256 return constFoldBinaryOp<IntegerAttr>( in fold()
501 return constFoldBinaryOp<IntegerAttr>( in fold()
518 return constFoldBinaryOp<IntegerAttr>( in fold()
538 return constFoldBinaryOp<IntegerAttr>( in fold()
885 return constFoldCastOp<IntegerAttr, IntegerAttr>( in fold()
914 return constFoldCastOp<IntegerAttr, IntegerAttr>( in fold()
969 return constFoldCastOp<IntegerAttr, IntegerAttr>( in fold()
1226 return IntegerAttr::get(resType, bits); in fold()
[all …]
/llvm-project-15.0.7/mlir/test/mlir-tblgen/
H A Dattr-or-type-format.td41 // ATTR: FailureOr<IntegerAttr> _result_value;
75 "IntegerAttr":$value,
234 "IntegerAttr":$value,
372 // TYPE: IntegerAttr((*_result_v0)),
373 // TYPE: IntegerAttr((*_result_v1)),
374 // TYPE: IntegerAttr((*_result_v2)),
375 // TYPE: IntegerAttr((*_result_v3)));
394 "IntegerAttr":$v0,
395 "IntegerAttr":$v1,
396 "IntegerAttr":$v2,
[all …]
/llvm-project-15.0.7/mlir/test/python/ir/
H A Dattributes.py94 assert IntegerAttr.isinstance(a1)
95 assert not IntegerAttr.isinstance(a2)
192 i_attr = IntegerAttr(Attribute.parse("42"))
197 si_attr = IntegerAttr(Attribute.parse("-1 : si8"))
200 ui_attr = IntegerAttr(Attribute.parse("255 : ui8"))
203 idx_attr = IntegerAttr(Attribute.parse("-1 : index"))
209 print("default_get:", IntegerAttr.get(
393 'integerattr' : IntegerAttr.get(
/llvm-project-15.0.7/mlir/lib/Dialect/MemRef/Transforms/
H A DComposeSubView.cpp60 return attr && attr.cast<IntegerAttr>().getInt() == 1; in matchAndRewrite()
96 opOffsetAttr.cast<IntegerAttr>().getInt() + in matchAndRewrite()
97 sourceOffsetAttr.cast<IntegerAttr>().getInt())); in matchAndRewrite()
105 expr = expr + attr.cast<IntegerAttr>().getInt(); in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Dialect/Vector/Transforms/
H A DVectorInsertExtractStridedSliceRewritePatterns.cpp136 op.getOffsets().getValue().front().cast<IntegerAttr>().getInt(); in matchAndRewrite()
139 op.getStrides().getValue().front().cast<IntegerAttr>().getInt(); in matchAndRewrite()
210 op.getOffsets().getValue().front().cast<IntegerAttr>().getInt(); in matchAndRewrite()
212 op.getSizes().getValue().front().cast<IntegerAttr>().getInt(); in matchAndRewrite()
214 op.getStrides().getValue().front().cast<IntegerAttr>().getInt(); in matchAndRewrite()
255 op.getOffsets().getValue().front().cast<IntegerAttr>().getInt(); in matchAndRewrite()
257 op.getSizes().getValue().front().cast<IntegerAttr>().getInt(); in matchAndRewrite()
259 op.getStrides().getValue().front().cast<IntegerAttr>().getInt(); in matchAndRewrite()
/llvm-project-15.0.7/mlir/test/IR/
H A Delements-attr-interface.mlir14 // expected-error@below {{Test iterating `IntegerAttr`: 10 : i64, 11 : i64, 12 : i64, 13 : i64, 14 …
20 // expected-error@below {{Test iterating `IntegerAttr`: 10 : i64, 11 : i64, 12 : i64, 13 : i64, 14 …
26 // expected-error@below {{Test iterating `IntegerAttr`: unable to iterate type}}
33 // expected-error@below {{Test iterating `IntegerAttr`: }}
53 // expected-error@below {{Test iterating `IntegerAttr`: unable to iterate type}}
/llvm-project-15.0.7/mlir/include/mlir/IR/
H A DBuilders.h34 class IntegerAttr; variable
100 IntegerAttr getIntegerAttr(Type type, int64_t value);
101 IntegerAttr getIntegerAttr(Type type, const APInt &value);
117 IntegerAttr getI8IntegerAttr(int8_t value);
118 IntegerAttr getI16IntegerAttr(int16_t value);
119 IntegerAttr getI32IntegerAttr(int32_t value);
120 IntegerAttr getI64IntegerAttr(int64_t value);
121 IntegerAttr getIndexAttr(int64_t value);
124 IntegerAttr getSI32IntegerAttr(int32_t value);
125 IntegerAttr getUI32IntegerAttr(uint32_t value);
H A DMatchers.h134 IntegerAttr::ValueType *bind_value;
137 constant_int_op_binder(IntegerAttr::ValueType *bv) : bind_value(bv) {} in constant_int_op_binder()
146 return attr_value_binder<IntegerAttr>(bind_value).match(attr); in match()
149 return attr_value_binder<IntegerAttr>(bind_value) in match()
356 m_ConstantInt(IntegerAttr::ValueType *bind_value) { in m_ConstantInt()
/llvm-project-15.0.7/mlir/unittests/Dialect/Quant/
H A DQuantizationUtilsTest.cpp89 EXPECT_EQ(valueResult.cast<IntegerAttr>().getInt(), 5); in TEST()
91 valueResult.cast<IntegerAttr>().getType().cast<IntegerType>().getWidth(), in TEST()
118 EXPECT_EQ(firstValue.cast<IntegerAttr>().getInt(), 5); in TEST()
144 EXPECT_EQ(firstValue.cast<IntegerAttr>().getInt(), 5); in TEST()
169 EXPECT_EQ(firstValue.cast<IntegerAttr>().getInt(), 5); in TEST()
/llvm-project-15.0.7/mlir/lib/Dialect/Utils/
H A DStaticValueUtils.cpp28 APInt apInt = ofr.get<Attribute>().cast<IntegerAttr>().getValue(); in dispatchIndexOpFoldResult()
48 return a.cast<IntegerAttr>().getInt(); in extractFromI64ArrayAttr()
88 if (auto intAttr = attr.dyn_cast_or_null<IntegerAttr>()) in getConstantIntValue()
/llvm-project-15.0.7/mlir/lib/Target/SPIRV/Serialization/
H A DSerializeOps.cpp71 if (auto specID = op->getAttrOfType<IntegerAttr>("spec_id")) { in processSpecConstantOp()
281 attr.cast<IntegerAttr>().getValue().getZExtValue())); in processVariableOp()
492 arguments.push_back(val.cast<IntegerAttr>().getInt()); in processBranchConditionalOp()
576 auto argIntAttr = op->getAttrOfType<IntegerAttr>(argName); in processOp()
610 intVal.cast<IntegerAttr>().getValue().getZExtValue())); in processOp()
625 auto argIntAttr = op->getAttrOfType<IntegerAttr>(argName); in processOp()
678 attr.cast<IntegerAttr>().getValue().getZExtValue())); in processOp()
685 attr.cast<IntegerAttr>().getValue().getZExtValue())); in processOp()
692 attr.cast<IntegerAttr>().getValue().getZExtValue())); in processOp()
699 attr.cast<IntegerAttr>().getValue().getZExtValue())); in processOp()
/llvm-project-15.0.7/mlir/lib/Interfaces/
H A DViewLikeInterface.cpp29 return isDynamic(attr.cast<IntegerAttr>().getInt()); in verifyListOfOperandsOrIntegers()
83 int64_t val = a.cast<IntegerAttr>().getInt(); in printOperandsOrIntegersListImpl()
128 IntegerAttr attr; in parseOperandsOrIntegersImpl()
129 if (failed(parser.parseAttribute<IntegerAttr>(attr))) in parseOperandsOrIntegersImpl()
235 staticValues.push_back(it.get<Attribute>().cast<IntegerAttr>().getInt()); in decomposeMixedImpl()
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Tosa/Utils/
H A DQuantUtils.h58 Attribute maxAttr, IntegerAttr quantBits,
65 IntegerAttr quantBits, int filterQuantDim,
/llvm-project-15.0.7/mlir/test/python/dialects/
H A Dtransform_structured_ext.py48 IntegerAttr.get(IntegerType.get_signless(64), 1), 0
130 [IntegerAttr.get(IntegerType.get_signless(64), x) for x in [4, 8]])
132 [IntegerAttr.get(IntegerType.get_signless(64), x) for x in [0, 1]])
/llvm-project-15.0.7/mlir/lib/Dialect/Bufferization/Transforms/
H A DBufferUtils.cpp181 IntegerAttr memrefAlignment = in getGlobalFor()
182 alignment > 0 ? IntegerAttr::get(globalBuilder.getI64Type(), alignment) in getGlobalFor()
183 : IntegerAttr(); in getGlobalFor()
/llvm-project-15.0.7/mlir/lib/Conversion/TosaToTensor/
H A DTosaToTensor.cpp40 int64_t size = i.value().cast<IntegerAttr>().getInt(); in matchAndRewrite()
48 rewriter.getIndexAttr(starts[index].cast<IntegerAttr>().getInt())); in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Dialect/NVGPU/IR/
H A DNVGPUDialect.cpp126 int64_t m = getMmaShape()[0].cast<IntegerAttr>().getInt(); in verify()
127 int64_t n = getMmaShape()[1].cast<IntegerAttr>().getInt(); in verify()
128 int64_t k = getMmaShape()[2].cast<IntegerAttr>().getInt(); in verify()

12345678