MLIR 23.0.0git
TosaProfileCompliance.cpp
Go to the documentation of this file.
1//===--- TosaProfileCompliance.cpp - Tosa Profile Compliance Validation ---===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10#include "llvm/ADT/StringExtras.h"
11
12using namespace mlir;
13using namespace mlir::tosa;
14
16 const TypeInfo boolT = {mlir::IntegerType::getTypeID(), 1};
17 const TypeInfo i4T = {mlir::IntegerType::getTypeID(), 4};
18 const TypeInfo i8T = {mlir::IntegerType::getTypeID(), 8};
19 const TypeInfo i16T = {mlir::IntegerType::getTypeID(), 16};
20 const TypeInfo i32T = {mlir::IntegerType::getTypeID(), 32};
21 const TypeInfo i48T = {mlir::IntegerType::getTypeID(), 48};
22 const TypeInfo i64T = {mlir::IntegerType::getTypeID(), 64};
23 const TypeInfo bf16T = {mlir::BFloat16Type::getTypeID(), 16};
24 const TypeInfo fp16T = {mlir::Float16Type::getTypeID(), 16};
25 const TypeInfo fp32T = {mlir::Float32Type::getTypeID(), 32};
26 const TypeInfo fp8e4m3T = {mlir::Float8E4M3FNType::getTypeID(), 8};
27 const TypeInfo fp8e5m2T = {mlir::Float8E5M2Type::getTypeID(), 8};
28
29 // micro-scaling formats
30 const TypeInfo fp6e2m3T = {mlir::Float6E2M3FNType::getTypeID(), 6};
31 const TypeInfo fp6e3m2T = {mlir::Float6E3M2FNType::getTypeID(), 6};
32 const TypeInfo fp4e2m1T = {mlir::Float4E2M1FNType::getTypeID(), 4};
33 const TypeInfo fp8ue8m0T = {mlir::Float8E8M0FNUType::getTypeID(), 8};
34 const TypeInfo mxint8T = {mlir::tosa::mxint8Type::getTypeID(), 8};
35
36// The profile-based compliance content below is auto-generated by a script
37// in https://github.com/arm/tosa-specification
39 // End of auto-generated metadata
40}
41
42template <>
46
47template <>
50 return extensionComplianceMap;
51}
52
53// Base populating function
54LogicalResult ProfileInfoDepot::populateProfileInfo(ValueRange operands,
55 ValueRange results) {
56 for (const auto &operand : operands)
57 addValue(operand);
58 for (const auto &result : results)
60 return success();
61}
62
63template <>
64LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::ConcatOp op) {
65 addValue(op.getInput1().front());
66 addValue(op.getOutput());
67 return success();
68}
69
70template <>
71LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::AvgPool2dOp op) {
72 addValue(op.getInput());
73 addValue(op.getInputZp());
74 addValue(op.getOutputZp());
75 addType(op.getAccType());
76 addValue(op.getOutput());
77 return success();
78}
79
80template <>
81LogicalResult
82ProfileInfoDepot::populateProfileInfo(tosa::AvgPool2dAdaptiveOp op) {
83 addValue(op.getInput());
84 addValue(op.getInputZp());
85 addValue(op.getOutputZp());
86 addType(op.getAccType());
87 addValue(op.getOutput());
88 return success();
89}
90
91template <>
92LogicalResult
93ProfileInfoDepot::populateProfileInfo(tosa::MaxPool2dAdaptiveOp op) {
94 addValue(op.getInput());
95 addValue(op.getOutput());
96 return success();
97}
98
99template <typename T>
100LogicalResult ProfileInfoDepot::populateProfileInfoConv(T op) {
101 addValue(op.getInput());
102 addValue(op.getWeight());
103 addValue(op.getBias());
104 addValue(op.getInputZp());
105 addValue(op.getWeightZp());
106 addType(op.getAccType());
107 addValue(op.getOutput());
108 return success();
109}
110
111template <>
112LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::Conv2DOp op) {
113 return populateProfileInfoConv(op);
114}
115
116template <>
117LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::Conv3DOp op) {
118 return populateProfileInfoConv(op);
119}
120
121template <>
122LogicalResult
123ProfileInfoDepot::populateProfileInfo(tosa::TransposeConv2DOp op) {
124 return populateProfileInfoConv(op);
125}
126
127template <>
128LogicalResult
129ProfileInfoDepot::populateProfileInfo(tosa::DepthwiseConv2DOp op) {
130 return populateProfileInfoConv(op);
131}
132
133template <>
134LogicalResult
135ProfileInfoDepot::populateProfileInfo(tosa::Conv2DBlockScaledOp op) {
136 addValue(op.getInputData());
137 addValue(op.getInputScale());
138 addValue(op.getWeightData());
139 addValue(op.getWeightScale());
140 addValue(op.getBias());
141 addValue(op.getOutput());
142 return success();
143}
144
145template <>
146LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::PadOp op) {
147 addValue(op.getInput1());
148 addValue(op.getPadConst());
149 addValue(op.getOutput());
150 return success();
151}
152
153template <typename T>
154LogicalResult ProfileInfoDepot::populateProfileInfoDataLayout(T op) {
155 addValue(op.getInput1());
156 addValue(op.getOutput());
157 return success();
158}
159
160template <>
161LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::ReshapeOp op) {
162 return populateProfileInfoDataLayout(op);
163}
164
165template <>
166LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::SliceOp op) {
167 return populateProfileInfoDataLayout(op);
168}
169
170template <>
171LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::TileOp op) {
172 return populateProfileInfoDataLayout(op);
173}
174
175template <>
176LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::TransposeOp op) {
177 return populateProfileInfoDataLayout(op);
178}
179
180template <>
181LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::GatherOp op) {
182 addValue(op.getValues());
183 addValue(op.getIndices());
184 addValue(op.getOutput());
185 return success();
186}
187
188template <>
189LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::ScatterOp op) {
190 addValue(op.getValuesIn());
191 addValue(op.getIndices());
192 addValue(op.getInput());
193 addValue(op.getValuesOut());
194 return success();
195}
196
197template <>
198LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::MulOp op) {
199 addValue(op.getInput1());
200 addValue(op.getInput2());
201 addValue(op.getOutput());
202 return success();
203}
204
205template <>
206LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::ResizeOp op) {
207 addValue(op.getInput());
208 addValue(op.getOutput());
209 return success();
210}
211
212template <>
213LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::SelectOp op) {
214 addValue(op.getOnTrue());
215 addValue(op.getOnFalse());
216 addValue(op.getOutput());
217 return success();
218}
219
220template <>
221LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::RescaleOp op) {
222 addValue(op.getInput());
223 addValue(op.getInputZp());
224 addValue(op.getOutputZp());
225 addValue(op.getOutput());
226 return success();
227}
228
229template <>
230LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::MatMulOp op) {
231 addValue(op.getA());
232 addValue(op.getB());
233 addValue(op.getAZp());
234 addValue(op.getBZp());
235 addValue(op.getOutput());
236 return success();
237}
238
239template <>
240LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::VariableOp op) {
241 addType(op.getType());
242 return success();
243}
244
245template <>
246LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::VariableWriteOp op) {
247 addValue(op.getInput1());
248 return success();
249}
250
251template <>
252LogicalResult ProfileInfoDepot::populateProfileInfo(tosa::DimOp op) {
253 addValue(op.getInput1());
254 return success();
255}
256
257LogicalResult ProfileInfoDepot::populatationDispatch(Operation *op) {
258// This helper function only populates the info for the customised operands.
259#define POPULATE_PROFILE_INFO_CUSTOM(tosaOp) \
260 if (isa<tosa::tosaOp##Op>(op)) { \
261 return populateProfileInfo(cast<tosa::tosaOp##Op>(op)); \
262 }
263
264#define POPULATE_PROFILE_INFO_SKIP(tosaOp) \
265 if (isa<tosa::tosaOp##Op>(op)) \
266 return success();
267
268// This helper function populates the info for all operands.
269#define POPULATE_PROFILE_INFO_COMMON(tosaOp) \
270 if (isa<tosa::tosaOp##Op>(op)) { \
271 return populateProfileInfo(op->getOperands(), op->getResults()); \
272 }
273
274 // Skip irrelevant operands when they are independent and not tied to any
275 // specific profile/extension.
277 POPULATE_PROFILE_INFO_CUSTOM(AvgPool2dAdaptive)
278 POPULATE_PROFILE_INFO_CUSTOM(TransposeConv2D)
280 POPULATE_PROFILE_INFO_CUSTOM(Conv2DBlockScaled)
282 POPULATE_PROFILE_INFO_CUSTOM(DepthwiseConv2D)
297 POPULATE_PROFILE_INFO_CUSTOM(VariableWrite)
299 POPULATE_PROFILE_INFO_CUSTOM(MaxPool2dAdaptive)
300
301 // For the most of tosa operators, all operands are profile/extension related
302 // and hence are all considered in this profile-based compilance check.
303 POPULATE_PROFILE_INFO_COMMON(MatmulTBlockScaled)
307 POPULATE_PROFILE_INFO_COMMON(CastFromBlockScaled)
308 POPULATE_PROFILE_INFO_COMMON(CastToBlockScaled)
320 POPULATE_PROFILE_INFO_COMMON(ArithmeticRightShift)
325 POPULATE_PROFILE_INFO_COMMON(LogicalLeftShift)
326 POPULATE_PROFILE_INFO_COMMON(LogicalRightShift)
349 POPULATE_PROFILE_INFO_COMMON(ReduceProduct)
352 POPULATE_PROFILE_INFO_COMMON(GreaterEqual)
356 POPULATE_PROFILE_INFO_COMMON(VariableRead)
357
358 // Type Invariant Extension, a capability extension that is independent
359 // of the data type, meaning any compatible type can be used. No type
360 // constraint for those operations.
362 POPULATE_PROFILE_INFO_SKIP(AssertEqualShape)
363 POPULATE_PROFILE_INFO_SKIP(ConcatShape)
365 POPULATE_PROFILE_INFO_SKIP(DivCeilShape)
366 POPULATE_PROFILE_INFO_SKIP(DivFloorShape)
368 POPULATE_PROFILE_INFO_SKIP(Log2CeilShape)
369 POPULATE_PROFILE_INFO_SKIP(Log2FloorShape)
379
380 return failure();
381}
382
383//===----------------------------------------------------------------------===//
384// Tosa Profile And Extension Compliance Checker
385//===----------------------------------------------------------------------===//
386
387template <typename T>
388FailureOr<SmallVector<OpComplianceInfo<T>>>
389TosaProfileCompliance::getOperatorMatchedEntries(Operation *op) {
390 const std::string opName = op->getName().getStringRef().str();
391 const auto complianceMap = getProfileComplianceMap<T>();
392 const auto it = complianceMap.find(opName);
393 if (it == complianceMap.end())
394 return {};
395
396 return findMatchedEntries<T>(op, it->second);
397}
398
399template <typename T>
401 Operation *op, const tosa::TargetEnv &targetEnv,
402 const SmallVector<ArrayRef<T>> &specRequiredModeSet) {
403
404 // None of profile requirement is set in the specification.
405 if (specRequiredModeSet.size() == 0)
406 return success();
407
408 const auto maybeOpEntries = getOperatorMatchedEntries<T>(op);
409 if (failed(maybeOpEntries)) {
410 // Operators such as control-flow and shape ops do not have an operand type
411 // restriction. When the profile compliance information of operation is not
412 // found, confirm if the target have enabled the profile required from the
413 // specification.
414 int modeCount = 0;
415 for (const auto &cands : specRequiredModeSet) {
416 if (targetEnv.allowsAnyOf(cands))
417 return success();
418 modeCount += cands.size();
419 }
420
421 op->emitOpError() << "illegal: requires"
422 << (modeCount > 1 ? " any of " : " ") << "["
423 << llvm::join(stringifyProfile<T>(specRequiredModeSet),
424 ", ")
425 << "] but not enabled in target\n";
426
427 return failure();
428 }
429
430 const auto opEntries = maybeOpEntries.value();
431 if (opEntries.size() == 0) {
432 // No matched restriction found.
433 return success();
434 }
435
436 // Check the profile/extension requirement according to the current target
437 // profiles/extensions.
438 const auto isModeAllowed = [&](const OpComplianceInfo<T> &info) -> bool {
439 if (info.condition == CheckCondition::allOf)
440 return targetEnv.allowsAllOf(info.mode);
441 return targetEnv.allowsAnyOf(info.mode);
442 };
443
444 // Check the matched op compliance version does not exceed the target
445 // specification version.
446 const TosaSpecificationVersion targetVersion{targetEnv.getSpecVersion()};
447 const auto isVersionCompatible =
448 [&targetVersion](const OpComplianceInfo<T> &info) -> bool {
449 const TosaSpecificationVersion complianceVersion{
450 info.operandTypeInfoSet.front().second};
451 return targetVersion.isBackwardsCompatibleWith(complianceVersion);
452 };
453
454 for (const auto &info : opEntries) {
455 // Ensure the profile compliance is compatible with the profile knowledge of
456 // the op definition.
457 assert(llvm::all_of(info.mode,
458 [&specRequiredModeSet](const T &mode) {
459 return llvm::is_contained(specRequiredModeSet.front(),
460 mode);
461 }) &&
462 "the profile/extension requirement of the operator should be "
463 "included in the profile compliance information");
464
465 if (isModeAllowed(info) && isVersionCompatible(info))
466 return success();
467 }
468
469 // No valid entry was found, now emit appropriate error message and return
470 // failure
471 std::string message;
472 llvm::raw_string_ostream os(message);
473
474 os << "illegal: ";
475 const size_t numOpEntries = opEntries.size();
476 for (const auto &[index, info] : llvm::enumerate(opEntries)) {
477 bool mismatchedVersion = false;
478 if (!isVersionCompatible(info)) {
479 mismatchedVersion = true;
480 os << "requires specification version compatible with "
481 << stringifyVersion(info.operandTypeInfoSet.front().second) << " (got "
482 << stringifyVersion(targetVersion) << ") ";
483 }
484
485 if (!isModeAllowed(info)) {
486 if (mismatchedVersion)
487 os << "and ";
488 os << "requires "
489 << (info.condition == CheckCondition::allOf ? "all of " : "any of ")
490 << "[" << llvm::join(stringifyProfile<T>(info.mode), ", ")
491 << "] profiles/extensions ";
492 }
493
494 if (index != numOpEntries - 1)
495 os << "OR ";
496 }
497 os << "to be specified in the target environment";
498
499 return op->emitOpError(message);
500}
501
502LogicalResult
504 const tosa::TargetEnv &targetEnv) {
505 if (auto interface = dyn_cast<tosa::QueryProfileInterface>(op))
506 return checkProfileOrExtension<Profile>(op, targetEnv,
507 interface.getProfiles());
508
509 return success();
510}
511
512LogicalResult
514 const tosa::TargetEnv &targetEnv) {
515 if (auto interface = dyn_cast<tosa::QueryExtensionInterface>(op))
516 return checkProfileOrExtension<Extension>(op, targetEnv,
517 interface.getExtensions());
518
519 return success();
520}
521
523 const auto maybeProfEntries = getOperatorMatchedEntries<Profile>(op);
524 const auto maybeExtEntries = getOperatorMatchedEntries<Extension>(op);
525 if (failed(maybeProfEntries) && failed(maybeExtEntries))
526 return success();
527
528 const bool hasEntry =
529 (succeeded(maybeProfEntries) && !maybeProfEntries.value().empty()) ||
530 (succeeded(maybeExtEntries) && !maybeExtEntries.value().empty());
531
532 if (!hasEntry) {
533 std::string message;
534 llvm::raw_string_ostream os(message);
535 os << "illegal: operation operand/result data types did not align with any "
536 "profile or extension, got (";
537
538 ProfileInfoDepot depot(op);
539 SmallVector<TypeInfo> current = depot.getInfo();
540 for (const auto &typeInfo : llvm::drop_end(current))
541 os << stringifyTypeInfo(typeInfo) << ",";
542 os << stringifyTypeInfo(current.back()) << ")";
543
544 // avoid polluting the error message output by outputting only
545 // the best match
546 const std::string opName = op->getName().getStringRef().str();
547 int maxMatches = -1;
548 SmallVector<TypeInfo> bestTypeInfo;
549 const auto searchBestMatch = [&](auto map) {
550 for (const auto &complianceInfos : map[opName]) {
551 for (const auto &versionedTypeInfos :
552 complianceInfos.operandTypeInfoSet) {
553 const SmallVector<TypeInfo> typeInfos = versionedTypeInfos.first;
554 const int matches = llvm::count_if(
555 llvm::zip_equal(current, typeInfos), [&](const auto zipType) {
556 return isSameTypeInfo(std::get<0>(zipType),
557 std::get<1>(zipType));
558 });
559 if (matches > maxMatches) {
560 maxMatches = matches;
561 bestTypeInfo = typeInfos;
562 }
563 }
564 }
565 };
566 searchBestMatch(getProfileComplianceMap<Profile>());
567 searchBestMatch(getProfileComplianceMap<Extension>());
568
569 os << ", did you mean (";
570 for (const auto &typeInfo : llvm::drop_end(bestTypeInfo))
571 os << stringifyTypeInfo(typeInfo) << ",";
572 os << stringifyTypeInfo(bestTypeInfo.back()) << ")? ";
573 os << "Otherwise, please refer to the 'supported data types' for '"
574 << opName << "' in the specification.";
575 op->emitOpError(message);
576 return failure();
577 }
578
579 return success();
580}
581
582// Find the profiles or extensions requirement according to the signature of
583// type of the operand list.
584template <typename T>
587 assert(compInfo.size() != 0 &&
588 "profile-based compliance information is empty");
589
590 // Populate the type of profile/extension relevant operands.
591 ProfileInfoDepot depot(op);
592 SmallVector<TypeInfo> present = depot.getInfo();
593 if (present.size() == 0)
594 return {};
595
597 for (size_t i = 0; i < compInfo.size(); i++) {
598 SmallVector<VersionedTypeInfo> sets = compInfo[i].operandTypeInfoSet;
599 for (const auto &set : sets) {
600 SmallVector<TypeInfo> expected = set.first;
601 assert(present.size() == expected.size() &&
602 "the entries for profile-based compliance do not match between "
603 "the generated metadata and the type definition retrieved from "
604 " the operation");
605
606 bool isFound = true;
607 // Compare the type signature between the given operation and the
608 // compliance metadata.
609 for (size_t j = 0; j < expected.size(); j++) {
610 if (!isSameTypeInfo(present[j], expected[j])) {
611 // Verify the next mode set from the list.
612 isFound = false;
613 break;
614 }
615 }
616
617 if (isFound == true) {
618 SmallVector<VersionedTypeInfo> typeInfoSet{set};
619 OpComplianceInfo<T> info{compInfo[i].mode, typeInfoSet,
620 compInfo[i].condition};
621 matchedInfos.push_back(info);
622 }
623 }
624 }
625
626 return matchedInfos;
627}
628
629// Debug utilites.
630template <typename T>
633 SmallVector<StringRef> debugStrings;
634 for (const auto &profile : profiles) {
635 if constexpr (std::is_same_v<T, Profile>)
636 debugStrings.push_back(tosa::stringifyProfile(profile));
637 else
638 debugStrings.push_back(tosa::stringifyExtension(profile));
639 }
640 return debugStrings;
641}
642
643template <typename T>
645 const SmallVector<ArrayRef<T>> &profileSet) {
646 SmallVector<StringRef> debugStrings;
647
648 for (const auto &profiles : profileSet) {
649 auto tempStrings = stringifyProfile<T>(profiles);
650 llvm::append_range(debugStrings, tempStrings);
651 }
652
653 return debugStrings;
654}
655
658 if (typeInfo.typeID == mlir::IntegerType::getTypeID()) {
659 return {"i" + llvm::utostr(typeInfo.bitWidth)};
660 }
661 if (typeInfo.typeID == mlir::Float16Type::getTypeID()) {
662 return {"f16"};
663 } else if (typeInfo.typeID == mlir::Float32Type::getTypeID()) {
664 return {"f32"};
665 } else if (typeInfo.typeID == mlir::BFloat16Type::getTypeID()) {
666 return {"bf16"};
667 } else if (typeInfo.typeID == mlir::Float8E4M3FNType::getTypeID()) {
668 return {"fp8e4m3"};
669 } else if (typeInfo.typeID == mlir::Float8E5M2Type::getTypeID()) {
670 return {"fp8e5m2"};
671 } else if (typeInfo.typeID == mlir::Float6E2M3FNType::getTypeID()) {
672 return {"fp6e2m3"};
673 } else if (typeInfo.typeID == mlir::Float6E3M2FNType::getTypeID()) {
674 return {"fp6e3m2"};
675 } else if (typeInfo.typeID == mlir::Float4E2M1FNType::getTypeID()) {
676 return {"fp4e2m1"};
677 } else if (typeInfo.typeID == mlir::Float8E8M0FNUType::getTypeID()) {
678 return {"fp8e8m0"};
679 } else if (typeInfo.typeID == tosa::mxint8Type::getTypeID()) {
680 return {"mxint8"};
681 }
682 llvm_unreachable("unknown type");
683}
return success()
#define POPULATE_PROFILE_INFO_CUSTOM(tosaOp)
#define POPULATE_PROFILE_INFO_COMMON(tosaOp)
#define POPULATE_PROFILE_INFO_SKIP(tosaOp)
std::unordered_map< std::string, SmallVector< OpComplianceInfo< Profile > > > OperationProfileComplianceMap
std::unordered_map< std::string, SmallVector< OpComplianceInfo< Extension > > > OperationExtensionComplianceMap
@ Gather
SmallVector< TypeInfo > getInfo()
bool isSameTypeInfo(TypeInfo a, TypeInfo b)
LogicalResult checkProfile(Operation *op, const tosa::TargetEnv &targetEnv)
LogicalResult checkExtension(Operation *op, const tosa::TargetEnv &targetEnv)
LogicalResult checkInvalid(Operation *op)
SmallVector< StringRef > stringifyProfile(ArrayRef< T > profiles)
LogicalResult checkProfileOrExtension(Operation *op, const tosa::TargetEnv &targetEnv, const SmallVector< ArrayRef< T > > &specDefinedProfileSet)
static llvm::SmallString< 7 > stringifyTypeInfo(const TypeInfo &typeInfo)
std::unordered_map< std::string, SmallVector< OpComplianceInfo< T > > > getProfileComplianceMap()
SmallVector< OpComplianceInfo< T > > findMatchedEntries(Operation *op, SmallVector< OpComplianceInfo< T > > compInfo)
StringRef getStringRef() const
Return the name of this operation. This always succeeds.
Operation is the basic unit of execution within MLIR.
Definition Operation.h:88
OperationName getName()
The name of an operation is the key identifier for it.
Definition Operation.h:116
InFlightDiagnostic emitOpError(const Twine &message={})
Emit an error with the op name prefixed, like "'dim' op " which is convenient for verifiers.
This class provides an abstraction over the different types of ranges over Values.
Definition ValueRange.h:389
This class represents the capability enabled in the target implementation such as profile,...
Definition TargetEnv.h:100
bool allowsAllOf(ArrayRef< Profile > profs) const
Definition TargetEnv.h:133
bool allowsAnyOf(ArrayRef< Profile > profs) const
Definition TargetEnv.h:129
TosaSpecificationVersion getSpecVersion() const
Definition TargetEnv.h:113
A thin wrapper around the SpecificationVersion enum to represent and provide utilities around the TOS...
Definition TargetEnv.h:58
bool isBackwardsCompatibleWith(TosaSpecificationVersion baseVersion) const
Definition TargetEnv.h:67
llvm::SmallString< 4 > stringifyVersion(TosaSpecificationVersion version)
Definition TargetEnv.cpp:15
Include the generated interface declarations.
@ Mul
RHS of mul is always a constant or a symbolic expression.
Definition AffineExpr.h:43
mlir::TypeID typeID
Eliminates variable at the specified position using Fourier-Motzkin variable elimination.