Skip to content

Commit

Permalink
#0: fix device_pool
Browse files Browse the repository at this point in the history
  • Loading branch information
sminakov-tt committed Jan 8, 2025
1 parent 9c23503 commit 2d367a3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tt_metal/impl/device/device_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,9 @@ bool DevicePool::close_device(chip_id_t device_id) {
const auto& mmio_device_id = tt::Cluster::instance().get_associated_mmio_device(device_id);
for (const auto& mmio_controlled_device_id :
tt::Cluster::instance().get_devices_controlled_by_mmio_device(mmio_device_id)) {
auto& device = devices[mmio_controlled_device_id];
if (device->is_initialized()) {
if (this->is_device_active(mmio_controlled_device_id)) {
auto& device = devices[mmio_controlled_device_id];
pass &= device->close();
// When a device is closed, its worker thread is joined. Stop tracking this
// worker thread.
this->unregister_worker_thread_for_device(device.get());
}
}
Expand Down

0 comments on commit 2d367a3

Please sign in to comment.