Skip to content

Commit

Permalink
#0: squash this
Browse files Browse the repository at this point in the history
  • Loading branch information
tt-nshanker committed Feb 21, 2024
1 parent 295fa51 commit b703099
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ttnn/cpp/ttnn/operations/binary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ inline ttnn::Tensor add(

if (height_b == 1 or width_b == 1) {
if (dtype.has_value()) {
TT_THROW("Bcast: Unsupported dtype argument.");
TT_THROW("ttnn.add: cannot change dtype when broadcasting");
}
tt::tt_metal::BcastOpDim bcast_op_dim;
if (height_b == 1 and width_b == 1) {
Expand Down
3 changes: 2 additions & 1 deletion ttnn/ttnn/operations/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,8 @@ def clone(tensor, memory_config: ttnn.MemoryConfig, dtype: ttnn.DataType):
In the case where the layout is the same, the operation simply pad or unpad the last two dimensions depending on layout requested.
Args:
* :attr:`tensor`: the ttnn.Tensor
* :attr:`layout`: the layout of either ttnn.ROW_MAJOR_LAYOUT or ttnn.TILE_LAYOUT.
* :attr:`memory_config`: the `ttnn` memory config, DRAM_MEMORY_CONFIG or L1_MEMORY_CONFIG.
* :attr:`dtype`: the `ttnn` data type.
Example::
>>> tensor = ttnn.to_device(ttnn.from_torch(torch.zeros((1, 1, 64, 32), dtype=torch.bfloat16, layout=ttnn.TILE_LAYOUT)), device, memory_config=ttnn.DRAM_MEMORY_CONFIG)
>>> output = ttnn.clone(tensor, tnn.DRAM_MEMORY_CONFIG, tnn.bfloat8_b)
Expand Down

0 comments on commit b703099

Please sign in to comment.