Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upsize EDM fabric channel buffer slots to be able to fit 4 bfp8 tiles per packet #18000

Merged
merged 2 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ bool RunLoopbackTest(
// EDM Builder Setup
////////////////////////////////////////////////////////////////////////////

static constexpr std::size_t edm_buffer_size = 4096 + PACKET_HEADER_SIZE_BYTES;
static constexpr std::size_t edm_buffer_size =
ttnn::ccl::FabricEriscDatamoverBuilder::default_packet_payload_size_bytes + PACKET_HEADER_SIZE_BYTES;

auto chip0_worker_fabric_connection = chip_0_edm_builder.build_connection_to_worker_channel();
////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -910,7 +911,8 @@ bool RunLineFabricTest(
std::size_t page_plus_header_size = page_size + sizeof(tt::fabric::PacketHeader);
std::size_t tensor_size_bytes = num_pages_total * page_size;

static constexpr std::size_t edm_buffer_size = 4096 + PACKET_HEADER_SIZE_BYTES;
static constexpr std::size_t edm_buffer_size =
ttnn::ccl::FabricEriscDatamoverBuilder::default_packet_payload_size_bytes + PACKET_HEADER_SIZE_BYTES;
const size_t local_chip_id = 0;
const size_t remote_chip_id = 1;
auto program_ptrs = std::vector<Program*>(devices.size());
Expand Down Expand Up @@ -1237,7 +1239,8 @@ int TestLoopbackEntrypoint(
IDevice* sender_device = device_0;
IDevice* receiver_device = device_1;

static constexpr std::size_t edm_buffer_size = 4096 + PACKET_HEADER_SIZE_BYTES;
static constexpr std::size_t edm_buffer_size =
ttnn::ccl::FabricEriscDatamoverBuilder::default_packet_payload_size_bytes + PACKET_HEADER_SIZE_BYTES;
const chip_id_t local_chip_id = 0;
const chip_id_t remote_chip_id = 1;
auto const& edm_config = ttnn::ccl::FabricEriscDatamoverConfig(edm_buffer_size, 1, 2);
Expand Down Expand Up @@ -2988,7 +2991,8 @@ void RunWriteThroughputStabilityTestWithPersistentFabric(
static constexpr uint32_t source_payload_cb_index = tt::CB::c_in1;
static constexpr size_t packet_header_cb_size_in_headers = 4;
static constexpr bool enable_persistent_fabric_mode = true;
static constexpr size_t packet_payload_size_bytes = 4096;
static constexpr size_t packet_payload_size_bytes =
ttnn::ccl::FabricEriscDatamoverBuilder::default_packet_payload_size_bytes;
static constexpr size_t dest_buffer_size = packet_payload_size_bytes * 4;
static constexpr tt::DataFormat cb_df = tt::DataFormat::Bfp8;

Expand Down
2 changes: 1 addition & 1 deletion ttnn/cpp/ttnn/operations/ccl/erisc_datamover_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class FabricEriscDatamoverBuilder {
public:
static constexpr size_t default_firmware_context_switch_interval = 200000;
// payload only, no header
static constexpr size_t default_packet_payload_size_bytes = 4096;
static constexpr size_t default_packet_payload_size_bytes = tt::tile_size(tt::DataFormat::Bfp8_b) * 4;

FabricEriscDatamoverBuilder(
const CoreCoord& my_eth_core_logical,
Expand Down
Loading