fix dcp merge bug
Some checks failed
Validate Operations / validate-operations (push) Failing after 15m54s

This commit is contained in:
NiccoloN
2026-05-04 15:58:14 +02:00
parent 5b9bb0c191
commit bdacb9871d
3 changed files with 18 additions and 7 deletions

View File

@@ -5,6 +5,7 @@
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/Support/LogicalResult.h"
#include "src/Accelerators/PIM/Common/PimCommon.hpp"
@@ -412,6 +413,10 @@ LogicalResult SpatComputeBatch::verify() {
return emitError("compute_batch core_id array length must match laneCount");
if (llvm::any_of(coreIdsAttr.asArrayRef(), [](int32_t coreId) { return coreId <= 0; }))
return emitError("compute_batch core_id values must be positive");
llvm::SmallDenseSet<int32_t, 8> seenCoreIds;
for (int32_t coreId : coreIdsAttr.asArrayRef())
if (!seenCoreIds.insert(coreId).second)
return emitError("compute_batch core_id values must be distinct");
}
Block& block = getBody().front();