Skip to content

Commit

Permalink
#15356: Fix use of l1_alignment before declaration in command_queue_i…
Browse files Browse the repository at this point in the history
…nterface.hpp
  • Loading branch information
tt-aho committed Nov 22, 2024
1 parent e7cd350 commit 06c2663
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tt_metal/impl/dispatch/command_queue_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,14 @@ struct dispatch_constants {
dispatch_s_buffer_size_ = 32 * 1024; // dispatch_s only sends Go Signals -> CB can be small
base_device_command_queue_addr = tt::tt_metal::hal.get_dev_addr(tt::tt_metal::HalProgrammableCoreType::IDLE_ETH, tt::tt_metal::HalL1MemAddrType::UNRESERVED);
}
uint32_t pcie_alignment = tt::tt_metal::hal.get_alignment(tt::tt_metal::HalMemType::HOST);
uint32_t l1_alignment = tt::tt_metal::hal.get_alignment(tt::tt_metal::HalMemType::L1);

TT_ASSERT(cmddat_q_size_ >= 2 * max_prefetch_command_size_);
TT_ASSERT(scratch_db_size_ % 2 == 0);
TT_ASSERT((dispatch_buffer_block_size & (dispatch_buffer_block_size - 1)) == 0);
TT_ASSERT(DISPATCH_MESSAGE_ENTRIES <= DISPATCH_MESSAGES_MAX_OFFSET / l1_alignment + 1, "Number of dispatch message entries exceeds max representable offset");

uint32_t pcie_alignment = tt::tt_metal::hal.get_alignment(tt::tt_metal::HalMemType::HOST);
uint32_t l1_alignment = tt::tt_metal::hal.get_alignment(tt::tt_metal::HalMemType::L1);
uint8_t num_dev_cq_addrs = magic_enum::enum_count<CommandQueueDeviceAddrType>();
std::vector<uint32_t> device_cq_addr_sizes_(num_dev_cq_addrs, 0);
for (auto dev_addr_idx = 0; dev_addr_idx < num_dev_cq_addrs; dev_addr_idx++) {
Expand Down

0 comments on commit 06c2663

Please sign in to comment.