Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
mlir/lib/Dialect/GPU/TransformOps/GPUTransformOps.cpp
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | checkMappingAttributeTypes(std::optional<TransformOpInterface> transformOp, | ||||
countMappingTypes += hasThreadMapping ? 1 : 0; | countMappingTypes += hasThreadMapping ? 1 : 0; | ||||
if (countMappingTypes > 1) { | if (countMappingTypes > 1) { | ||||
return failureHelper(transformOp, forallOp, | return failureHelper(transformOp, forallOp, | ||||
"cannot mix different mapping types, use nesting"); | "cannot mix different mapping types, use nesting"); | ||||
} | } | ||||
DenseSet<Attribute> seen; | DenseSet<Attribute> seen; | ||||
for (Attribute map : forallOp.getMapping()->getValue()) { | for (Attribute map : forallOp.getMapping()->getValue()) { | ||||
if (llvm::is_contained(seen, map)) { | if (seen.contains(map)) { | ||||
return failureHelper(transformOp, forallOp, | return failureHelper(transformOp, forallOp, | ||||
"duplicated attribute, cannot map different loops " | "duplicated attribute, cannot map different loops " | ||||
"to the same processor"); | "to the same processor"); | ||||
} | } | ||||
seen.insert(map); | seen.insert(map); | ||||
} | } | ||||
return DiagnosedSilenceableFailure::success(); | return DiagnosedSilenceableFailure::success(); | ||||
▲ Show 20 Lines • Show All 488 Lines • Show Last 20 Lines |