Skip to content

Commit

Permalink
Potential fix for CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pjanevskiTT committed Nov 12, 2024
1 parent ef806f6 commit 84ebdd1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ env:
LIB_OUTPUT_DIR: ./build/lib
DEPS_OUTPUT_DIR: ./build/_deps
TEST_OUTPUT_DIR: ./build/test
DEVICE_DIR: ./build/device

jobs:
build:
Expand Down Expand Up @@ -74,7 +75,8 @@ jobs:
run: |
tar cvf artifact.tar ${{ env.TEST_OUTPUT_DIR }} \
${{ env.LIB_OUTPUT_DIR }} \
${{ env.DEPS_OUTPUT_DIR }}
${{ env.DEPS_OUTPUT_DIR }} \
${{ env.DEVICE_DIR }}
- name: Upload build artifacts archive
uses: actions/upload-artifact@v4
Expand Down
3 changes: 2 additions & 1 deletion common/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#pragma once

#include <filesystem>
#include <iostream>
#include <string>

namespace tt::umd::utils {
Expand All @@ -20,7 +21,7 @@ std::string get_abs_path(std::string path) {
umd_root = current_file_path.parent_path().parent_path();
} else {
std::filesystem::path umd_root_relative =
std::filesystem::relative(std::filesystem::path(__FILE__).parent_path().parent_path().parent_path(), "../");
std::filesystem::relative(std::filesystem::path(__FILE__).parent_path().parent_path(), "../");
umd_root = std::filesystem::canonical(umd_root_relative);
}
std::filesystem::path abs_path = umd_root / path;
Expand Down
1 change: 0 additions & 1 deletion device/tt_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,6 @@ class tt_SiliconDevice: public tt_device
virtual tt_version get_ethernet_fw_version() const;
// TODO: This should be accessible through public API, probably to be moved to tt_device.
PCIDevice *get_pci_device(int device_id) const;
const tt_ClusterDescriptor* get_cluster_desc();

// Destructor
virtual ~tt_SiliconDevice ();
Expand Down
6 changes: 2 additions & 4 deletions device/tt_silicon_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ std::unordered_map<chip_id_t, tt_SocDescriptor>& tt_SiliconDevice::get_virtual_s
return soc_descriptor_per_chip;
}

const tt_ClusterDescriptor* tt_SiliconDevice::get_cluster_desc() {
return ndesc.get();
}

void tt_SiliconDevice::initialize_interprocess_mutexes(int pci_interface_id, bool cleanup_mutexes_in_shm) {
// These mutexes are intended to be based on physical devices/pci-intf not logical. Set these up ahead of time here (during device init)
// since its unsafe to modify shared state during multithreaded runtime.
Expand Down Expand Up @@ -434,6 +430,7 @@ void tt_SiliconDevice::construct_tt_silicon_device(const uint32_t &num_host_mem_

tt_SiliconDevice::tt_SiliconDevice(const uint32_t &num_host_mem_ch_per_mmio_device, const bool skip_driver_allocs,
const bool clean_system_resources, bool perform_harvesting, std::unordered_map<chip_id_t, uint32_t> simulated_harvesting_masks) : tt_device() {
// TODO: this should be fetched through ClusterDescriptor
auto available_device_ids = detect_available_device_ids();
m_num_pci_devices = available_device_ids.size();

Expand Down Expand Up @@ -466,6 +463,7 @@ tt_SiliconDevice::tt_SiliconDevice(const uint32_t &num_host_mem_ch_per_mmio_devi
tt_SiliconDevice::tt_SiliconDevice(const std::string &sdesc_path, const std::string &ndesc_path, const std::set<chip_id_t> &target_devices,
const uint32_t &num_host_mem_ch_per_mmio_device, const bool skip_driver_allocs,
const bool clean_system_resources, bool perform_harvesting, std::unordered_map<chip_id_t, uint32_t> simulated_harvesting_masks) : tt_device() {
// TODO: this should be fetched through ClusterDescriptor
auto available_device_ids = detect_available_device_ids();
m_num_pci_devices = available_device_ids.size();

Expand Down
4 changes: 2 additions & 2 deletions tests/api/test_cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TEST(ApiClusterTest, OpenAllChips) { std::unique_ptr<Cluster> umd_cluster = get_
TEST(ApiClusterTest, SimpleIOAllChips) {
std::unique_ptr<Cluster> umd_cluster = get_cluster();

const tt_ClusterDescriptor* cluster_desc = umd_cluster->get_cluster_desc();
const tt_ClusterDescriptor* cluster_desc = umd_cluster->get_cluster_description();

if (umd_cluster == nullptr || umd_cluster->get_all_chips_in_cluster().empty()) {
std::cout << "No chips found. Skipping test." << std::endl;
Expand Down Expand Up @@ -119,7 +119,7 @@ TEST(ApiClusterTest, SimpleIOAllChips) {
TEST(ApiClusterTest, RemoteFlush) {
std::unique_ptr<Cluster> umd_cluster = get_cluster();

const tt_ClusterDescriptor* cluster_desc = umd_cluster->get_cluster_desc();
const tt_ClusterDescriptor* cluster_desc = umd_cluster->get_cluster_description();

if (umd_cluster == nullptr || umd_cluster->get_all_chips_in_cluster().empty()) {
std::cout << "No chips found. Skipping test." << std::endl;
Expand Down

0 comments on commit 84ebdd1

Please sign in to comment.