Skip to content

Commit

Permalink
#0: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aliuTT committed May 30, 2024
1 parent 4320557 commit 73410e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions tt_metal/impl/device/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ bool Device::initialize(const uint8_t num_hw_cqs, size_t l1_small_size, const st
log_info(tt::LogMetal, "Initializing device {}. Program cache is {}enabled", this->id_, this->program_cache.is_enabled() ? "": "NOT ");
TT_ASSERT(num_hw_cqs > 0 and num_hw_cqs < 3, "num_hw_cqs can be between 1 and 2");
this->build_key_ = tt::Cluster::instance().get_harvesting_mask(this->id());
this->using_fast_dispatch = false;
this->num_hw_cqs_ = num_hw_cqs;
this->initialize_cluster();
this->initialize_allocator(l1_small_size, l1_bank_remap);
Expand Down
4 changes: 2 additions & 2 deletions tt_metal/impl/device/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class Device {
uint8_t num_hw_cqs_;

vector<std::unique_ptr<Program, tt::tt_metal::detail::ProgramDeleter>> command_queue_programs;
bool using_fast_dispatch = false;
bool using_fast_dispatch;
program_cache::detail::ProgramCache program_cache;

// Program cache interface. Syncrhonize with worker worker threads before querying or
Expand All @@ -264,9 +264,9 @@ class Device {
log_info(tt::LogMetal, "Disabling and clearing program cache on device {}", this->id_);
this->synchronize();
if (this->program_cache.is_enabled()) {
program_cache.clear();
program_cache.disable();
}
program_cache.clear();
}
std::size_t num_program_cache_entries() {
this->synchronize();
Expand Down
1 change: 1 addition & 0 deletions tt_metal/impl/dispatch/command_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ void EnqueueProgramCommand::process() {
this->assemble_device_commands();
} else {
static constexpr uint32_t count_offset = (sizeof(CQPrefetchCmd) + offsetof(CQDispatchCmd, wait.count));
TT_ASSERT(this->cached_program_command_sequences.find(program.id) != this->cached_program_command_sequences.end(), "Program cache hit, but no stored command sequence");
this->cached_program_command_sequences[program.id].preamble_command_sequence.update_cmd_sequence(
count_offset, &this->expected_num_workers_completed, sizeof(uint32_t));
this->assemble_device_commands();
Expand Down

0 comments on commit 73410e6

Please sign in to comment.