Skip to content

Commit

Permalink
Fix flatbuffer serialization for embedding backward op (#1642)
Browse files Browse the repository at this point in the history
As described in #1633, I
checked if any other operations has the same problem, and the embedding
backward operation was the only one.
  • Loading branch information
jserbedzijaTT authored Dec 20, 2024
1 parent c44a4bd commit 1ce54d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Target/TTNN/TTNNToFlatbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,8 +780,8 @@ createEmbeddingBackwardOp(FlatbufferObjectCache &cache,
std::optional<::mlir::tt::ttnn::MemoryConfigAttr> memoryConfig =
op.getMemoryConfig();

auto output = cache.getOrCreate(op.getResult(), tensorValueToFlatbuffer,
kHostAllocatedAddress, kHostAllocatedSize);
auto out = cache.at<::tt::target::TensorRef>(
getOperandThroughDPSOps(op.getResult()));
return ::tt::target::ttnn::CreateEmbeddingBackwardOp(
*cache.fbb, in0, in1, in2,
dtype.has_value()
Expand All @@ -791,7 +791,7 @@ createEmbeddingBackwardOp(FlatbufferObjectCache &cache,
memoryConfig.has_value()
? cache.getOrCreate(memoryConfig.value(), memoryConfigToFlatbuffer)
: 0,
output);
out);
}

template <typename ReshapeOp>
Expand Down

0 comments on commit 1ce54d5

Please sign in to comment.