Skip to content

Commit

Permalink
Fix getBuffersize() for CategoryMapperOp
Browse files Browse the repository at this point in the history
Signed-off-by: Haruki Imai <imaihal@jp.ibm.com>
  • Loading branch information
imaihal committed Aug 30, 2024
1 parent 18b9919 commit b99a334
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Dialect/Krnl/KrnlOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,8 @@ uint64_t KrnlGlobalOp::getBufferSize() {
KrnlGlobalOp krnlGlobalOp = mlir::cast<KrnlGlobalOp>(getOperation());
const Type type = krnlGlobalOp.getResult().getType();
const MemRefType memRefTy = mlir::cast<mlir::MemRefType>(type);
return affine::getIntOrFloatMemRefSizeInBytes(memRefTy).value();
auto sizeInBytes = affine::getIntOrFloatMemRefSizeInBytes(memRefTy);
return sizeInBytes.has_value() ? sizeInBytes.value() : 0;
}

void KrnlGlobalOp::setBuffer(ArrayRef<char> rawData) { return; }
Expand Down

0 comments on commit b99a334

Please sign in to comment.