Skip to content

Commit

Permalink
#2934: Add check that expects num host channels for a mmio device to …
Browse files Browse the repository at this point in the history
…be number of chips on a card and run multi cq device fixture on GS
  • Loading branch information
abhullar-tt committed Dec 6, 2023
1 parent fbfc617 commit 4d34b98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions tests/tt_metal/tt_metal/unit_tests/basic/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ TEST_F(DeviceFixture, TestDeviceToHostMemChannelAssignment) {
}

for (const auto& [mmio_dev_id, device_group] : mmio_device_to_device_group) {
EXPECT_EQ(tt::Cluster::instance().get_num_host_channels(mmio_dev_id), device_group.size());
EXPECT_EQ(tt::Cluster::instance().get_assigned_channel_for_device(mmio_dev_id), 0);
std::unordered_set<uint16_t> channels;
for (const chip_id_t &device_id : device_group) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "tt_metal/detail/tt_metal.hpp"
#include "tt_metal/test_utils/env_vars.hpp"
#include "tt_metal/test_utils/stimulus.hpp"
#include "tt_metal/test_utils/print_helpers.hpp"

using namespace tt::tt_metal;

Expand Down Expand Up @@ -52,7 +53,7 @@ TEST_F(MultiCommandQueueFixture, TestDirectedLoopbackToUniqueHugepage) {
for (chip_id_t device_id = 0; device_id < num_devices_; device_id++) {
chip_id_t mmio_device_id = tt::Cluster::instance().get_associated_mmio_device(device_id);
uint16_t channel = tt::Cluster::instance().get_assigned_channel_for_device(device_id);
tt::Cluster::instance().read_sysmem(&readback_data, byte_size, address, mmio_device_id, channel);
tt::Cluster::instance().read_sysmem(readback_data.data(), byte_size, address, mmio_device_id, channel);
EXPECT_EQ(readback_data, golden_data.at(device_id));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ class MultiCommandQueueFixture : public ::testing::Test {

num_devices_ = tt::tt_metal::Device::detect_num_available_devices();

if (arch_ == tt::ARCH::GRAYSKULL && num_devices_ > 1) {
GTEST_SKIP();
}

for (unsigned int id = 0; id < num_devices_; id++) {
auto* device = tt::tt_metal::CreateDevice(id);
devices_.push_back(device);
Expand Down

0 comments on commit 4d34b98

Please sign in to comment.