Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
LPanosTT committed Sep 24, 2024
1 parent 488fec0 commit 682d504
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/ttmlir-c/TTAttrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ MLIR_CAPI_EXPORTED MlirAttribute ttmlirTTOOBValAttrGet(MlirContext ctx,
uint32_t oobVal);

MLIR_CAPI_EXPORTED MlirAttribute
ttmlirTTTensorMemoryLayoutAttrGet(MlirContext ctx, uint32_t memLayout);
ttmlirTTensorMemoryLayoutAttrGet(MlirContext ctx, uint32_t memLayout);

MLIR_CAPI_EXPORTED MlirAttribute
ttmlirTTIteratorTypeAttrGet(MlirContext ctx, uint32_t iteratorType);
Expand Down
6 changes: 3 additions & 3 deletions lib/Conversion/TTIRToTTNN/TTIRToTTNN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ class TensorEmptyConversionPattern
// If the tensor is not going to device, we can create the op without
// device-specific attributes
//
tt::TensorMemoryLayout ttTensorMemoryLayout = ttLayoutAttr.getMemLayout();
if (ttTensorMemoryLayout == TensorMemoryLayout::None) {
tt::TensorMemoryLayout tensorMemoryLayout = ttLayoutAttr.getMemLayout();
if (tensorMemoryLayout == TensorMemoryLayout::None) {
rewriter.replaceOpWithNewOp<ttnn::EmptyOp>(
op, this->getTypeConverter()->convertType(op.getType()), nullptr,
shapeAttr, dTypeAttr, tensorLayoutAttr, nullptr);
Expand All @@ -104,7 +104,7 @@ class TensorEmptyConversionPattern
auto device = getOrInsertDevice(rewriter, op);
ttnn::MemoryConfigAttr memoryConfigAttr = ttnn::MemoryConfigAttr::get(
op.getContext(),
TensorMemoryLayoutAttr::get(op.getContext(), ttTensorMemoryLayout),
TensorMemoryLayoutAttr::get(op.getContext(), tensorMemoryLayout),
ttnn::BufferTypeAttr::get(op.getContext(), bufferType));

rewriter.replaceOpWithNewOp<ttnn::EmptyOp>(
Expand Down

0 comments on commit 682d504

Please sign in to comment.