Skip to content

Commit

Permalink
#7637: Update bcast unary op (scalar input) to use passed in memory c…
Browse files Browse the repository at this point in the history
…onfig instead of default interleaved

- Manually switch to DRAM output memory config for usages that now run out of L1
- Raise falcon7b batch 1 expected perf
  • Loading branch information
TT-BrianLiu committed Jul 5, 2024
1 parent afec31e commit aaab87a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@pytest.mark.parametrize(
"batch_size, test, expected_perf",
[
[1, "BFLOAT16-L1-falcon_7b-layers_32-prefill_seq256", 3.44],
[1, "BFLOAT16-L1-falcon_7b-layers_32-prefill_seq256", 3.666],
[32, "BFLOAT16-L1-falcon_7b-layers_32-decode_batch32", 139],
],
)
Expand Down
2 changes: 1 addition & 1 deletion tests/ttnn/unit_tests/operations/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def test_add_attention_scores_to_scalar(device, shape, scalar):
input_tensor = ttnn.from_torch(
torch_input_tensor, layout=ttnn.TILE_LAYOUT, device=device, memory_config=ttnn.L1_MEMORY_CONFIG
)
output_tensor = ttnn.add(input_tensor, scalar, memory_config=ttnn.L1_MEMORY_CONFIG)
output_tensor = ttnn.add(input_tensor, scalar, memory_config=ttnn.DRAM_MEMORY_CONFIG)
output_tensor = ttnn.to_torch(output_tensor)

assert ttnn.pearson_correlation_coefficient(torch_output_tensor, output_tensor) >= 0.99988
Expand Down
4 changes: 2 additions & 2 deletions ttnn/cpp/ttnn/operations/eltwise/binary/binary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ struct Binary {
input_tensor_a,
scalar,
dtype,
operation::DEFAULT_OUTPUT_MEMORY_CONFIG,
memory_config,
optional_output_tensor,
activations);
}
Expand All @@ -141,7 +141,7 @@ struct Binary {
input_tensor_a,
scalar_tensor_device,
dtype,
operation::DEFAULT_OUTPUT_MEMORY_CONFIG,
memory_config,
optional_output_tensor,
activations);
}
Expand Down

0 comments on commit aaab87a

Please sign in to comment.