Skip to content

Commit

Permalink
create-ethernet-map lib instead of bin (#245)
Browse files Browse the repository at this point in the history
Related to #99 

This change will simplify our build system changes by a lot. No
additional artefacts needed to be shipped with libdevice, and no
thinking about relative/absolute path once the lib is built.

@TTDRosen provided this library.

Changes:
- Add lib to git, add it to build system.
- Remove CEM binary from git
- Add cluster yaml creation to tt_ClusterDescriptor
- Use this interface in tests, remove deprecated GetClusterDescYAML

The following PR will remove cluster yaml altogether. Both from
tt_ClusterDescriptor interface and from tt_SiliconDevice. Didn't want to
overwhelm this PR.

This change requires client changes. Breaks existing references to
create-ethernet-map binary
- [x] tt_metal corresponding PR:
tenstorrent/tt-metal#14718
- tt_debuda has its own CEM so it will continue to build without any
changes.
  • Loading branch information
broskoTT authored Nov 6, 2024
1 parent d03acea commit 718132f
Show file tree
Hide file tree
Showing 27 changed files with 97 additions and 98 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
device/libs/**/*.a filter=lfs diff=lfs merge=lfs -text
1 change: 1 addition & 0 deletions .github/docker_install_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ apt-get update && apt-get install -y \
cmake \
ninja-build \
git \
git-lfs \
libhwloc-dev \
libgtest-dev \
libyaml-cpp-dev \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
lfs: 'true'

- name: Build ${{ env.BUILD_TARGET }}
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:

- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
lfs: 'true'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ env:
LIB_OUTPUT_DIR: ./build/lib
DEPS_OUTPUT_DIR: ./build/_deps
TEST_OUTPUT_DIR: ./build/test
CREATE_MAP_BINARIES_DIR: ./device/bin/silicon

jobs:
build:
Expand All @@ -59,6 +58,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
lfs: 'true'

- name: Build ${{ env.BUILD_TARGET }}
run: |
Expand All @@ -74,8 +74,7 @@ jobs:
run: |
tar cvf artifact.tar ${{ env.TEST_OUTPUT_DIR }} \
${{ env.LIB_OUTPUT_DIR }} \
${{ env.DEPS_OUTPUT_DIR }} \
${{ env.CREATE_MAP_BINARIES_DIR }}
${{ env.DEPS_OUTPUT_DIR }}
- name: Upload build artifacts archive
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions device/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ target_link_libraries(
Boost::interprocess
fmt::fmt-header-only
yaml-cpp::yaml-cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/${CMAKE_SYSTEM_PROCESSOR}/libcreate_ethernet_map.a
)

install(
Expand Down
Binary file removed device/bin/silicon/aarch64/create-ethernet-map
Binary file not shown.
Binary file removed device/bin/silicon/x86/create-ethernet-map
Binary file not shown.
9 changes: 9 additions & 0 deletions device/libs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Building lib from source

The source can be found in the repository: https://github.com/tenstorrent/luwen

To build static lib, use the following commands:
```
cargo build -p create-ethernet-map --release --lib
cross build --target aarch64-unknown-linux-gnu --release --lib -p create-ethernet-map
```
3 changes: 3 additions & 0 deletions device/libs/aarch64/libcreate_ethernet_map.a
Git LFS file not shown
4 changes: 4 additions & 0 deletions device/libs/create_ethernet_map.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// External function to create the cluster descriptor yaml file.
extern "C" {
int create_ethernet_map(char *file);
}
3 changes: 3 additions & 0 deletions device/libs/x86_64/libcreate_ethernet_map.a
Git LFS file not shown
20 changes: 20 additions & 0 deletions device/tt_cluster_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@


#include "tt_cluster_descriptor.h"
#include "libs/create_ethernet_map.h"

#include <fstream>
#include <memory>
Expand Down Expand Up @@ -298,6 +299,25 @@ chip_id_t tt_ClusterDescriptor::get_closest_mmio_capable_chip(const chip_id_t ch
return closest_chip;
}

std::string tt_ClusterDescriptor::get_cluster_descriptor_file_path() {
static std::string yaml_path;
static bool is_initialized = false;
if (!is_initialized){
// Cluster descriptor path will be created in the working directory.
std::filesystem::path cluster_path = std::filesystem::path("cluster_descriptor.yaml");
if (!std::filesystem::exists(cluster_path)){
auto val = system ( ("touch " + cluster_path.string()).c_str());
if(val != 0) throw std::runtime_error("Cluster Generation Failed!");
}

int val = create_ethernet_map((char*)cluster_path.string().c_str());
if(val != 0) throw std::runtime_error("Cluster Generation Failed!");
yaml_path = cluster_path.string();
is_initialized = true;
}
return yaml_path;
}

std::unique_ptr<tt_ClusterDescriptor> tt_ClusterDescriptor::create_from_yaml(const std::string &cluster_descriptor_file_path) {
std::unique_ptr<tt_ClusterDescriptor> desc = std::unique_ptr<tt_ClusterDescriptor>(new tt_ClusterDescriptor());

Expand Down
4 changes: 4 additions & 0 deletions device/tt_cluster_descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ class tt_ClusterDescriptor {
bool is_chip_remote(const chip_id_t chip_id) const;
chip_id_t get_closest_mmio_capable_chip(const chip_id_t chip);
chip_id_t get_shelf_local_physical_chip_coords(chip_id_t virtual_coord);

// TODO: These following functions will be removed, and ClusterDescriptor will be created without any parameters.
// get_cluster_descriptor_file_path will create ethernet map in the background.
static std::string get_cluster_descriptor_file_path();
static std::unique_ptr<tt_ClusterDescriptor> create_from_yaml(const std::string &cluster_descriptor_file_path);
static std::unique_ptr<tt_ClusterDescriptor> create_for_grayskull_cluster(
const std::set<chip_id_t> &logical_mmio_device_ids,
Expand Down
15 changes: 13 additions & 2 deletions tests/api/test_chip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ inline std::unique_ptr<tt_ClusterDescriptor> get_cluster_desc() {
cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path);
} else {
// TODO: remove getting manually cluster descriptor from yaml.
std::string yaml_path = test_utils::GetClusterDescYAML();
std::string yaml_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path();
cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path);
}

Expand Down Expand Up @@ -92,7 +92,7 @@ inline std::unique_ptr<Cluster> get_cluster() {
yaml_path = test_utils::GetAbsPath("blackhole_1chip_cluster.yaml");
} else {
// TODO: remove getting manually cluster descriptor from yaml.
yaml_path = test_utils::GetClusterDescYAML();
yaml_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path();
}
// TODO: Remove the need to do this, allow default constructor to construct with all chips.
std::unique_ptr<tt_ClusterDescriptor> cluster_desc = get_cluster_desc();
Expand Down Expand Up @@ -123,6 +123,11 @@ inline std::unique_ptr<Cluster> get_cluster() {
TEST(ApiChipTest, ManualTLBConfiguration) {
std::unique_ptr<Cluster> umd_cluster = get_cluster();

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

// Expect to throw for remote chip for any worker core
auto remote_chips = umd_cluster->get_target_remote_device_ids();
if (!remote_chips.empty()) {
Expand Down Expand Up @@ -177,6 +182,12 @@ TEST(ApiChipTest, ManualTLBConfiguration) {
// TODO: Move to test_chip
TEST(ApiChipTest, SimpleAPIShowcase) {
std::unique_ptr<Cluster> umd_cluster = get_cluster();

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

chip_id_t chip_id = umd_cluster->get_cluster_description()->get_chips_with_mmio().begin()->first;

// TODO: In future, will be accessed through tt::umd::Chip api.
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 @@ -66,7 +66,7 @@ inline std::unique_ptr<tt_ClusterDescriptor> get_cluster_desc() {
cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path);
} else {
// TODO: remove getting manually cluster descriptor from yaml.
std::string yaml_path = test_utils::GetClusterDescYAML();
std::string yaml_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path();
cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path);
}

Expand Down Expand Up @@ -104,7 +104,7 @@ inline std::unique_ptr<Cluster> get_cluster() {
yaml_path = test_utils::GetAbsPath("blackhole_1chip_cluster.yaml");
} else {
// TODO: remove getting manually cluster descriptor from yaml.
yaml_path = test_utils::GetClusterDescYAML();
yaml_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path();
}
// TODO: Remove the need to do this, allow default constructor to construct with all chips.
std::unique_ptr<tt_ClusterDescriptor> cluster_desc = get_cluster_desc();
Expand Down
2 changes: 1 addition & 1 deletion tests/api/test_cluster_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ inline std::unique_ptr<tt_ClusterDescriptor> get_cluster_desc() {
cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path);
} else {
// TODO: remove getting manually cluster descriptor from yaml.
std::string yaml_path = test_utils::GetClusterDescYAML();
std::string yaml_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path();
cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/blackhole/test_bh_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class BlackholeTestFixture : public ::testing::Test {
std::iota(devices.begin(), devices.end(), 0);
std::set<chip_id_t> target_devices = {devices.begin(), devices.end()};
uint32_t num_host_mem_ch_per_mmio_device = 1;
device = std::make_unique<tt_SiliconDevice>(test_utils::GetAbsPath(SOC_DESC_PATH), test_utils::GetClusterDescYAML(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true);
device = std::make_unique<tt_SiliconDevice>(test_utils::GetAbsPath(SOC_DESC_PATH), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true);
assert(device != nullptr);
assert(device->get_cluster_description()->get_number_of_chips() == get_detected_num_chips());

Expand Down
12 changes: 6 additions & 6 deletions tests/blackhole/test_silicon_driver_bh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ TEST(SiliconDriverBH, CreateDestroy) {
// std::unordered_map<chip_id_t, uint32_t> simulated_harvesting_masks = {{0, 30}, {1, 60}};

// {
// std::unique_ptr<tt_ClusterDescriptor> cluster_desc_uniq = tt_ClusterDescriptor::create_from_yaml(test_utils::GetClusterDescYAML());
// std::unique_ptr<tt_ClusterDescriptor> cluster_desc_uniq = tt_ClusterDescriptor::create_from_yaml(tt_ClusterDescriptor::get_cluster_descriptor_file_path());
// if (cluster_desc_uniq->get_number_of_chips() != target_devices.size()) {
// GTEST_SKIP() << "SiliconDriverWH.Harvesting skipped because it can only be run on a two chip nebula system";
// }
// }

// uint32_t num_host_mem_ch_per_mmio_device = 1;
// tt_SiliconDevice device = tt_SiliconDevice("./tests/soc_descs/wormhole_b0_8x10.yaml", test_utils::GetClusterDescYAML(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true, simulated_harvesting_masks);
// tt_SiliconDevice device = tt_SiliconDevice("./tests/soc_descs/wormhole_b0_8x10.yaml", tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true, simulated_harvesting_masks);
// auto sdesc_per_chip = device.get_virtual_soc_descriptors();

// ASSERT_EQ(device.using_harvested_soc_descriptors(), true) << "Expected Driver to have performed harvesting";
Expand All @@ -120,15 +120,15 @@ TEST(SiliconDriverBH, CreateDestroy) {
// std::set<chip_id_t> target_devices = {0, 1};
// std::unordered_map<chip_id_t, uint32_t> simulated_harvesting_masks = {{0, 30}, {1, 60}};
// {
// std::unique_ptr<tt_ClusterDescriptor> cluster_desc_uniq = tt_ClusterDescriptor::create_from_yaml(test_utils::GetClusterDescYAML());
// std::unique_ptr<tt_ClusterDescriptor> cluster_desc_uniq = tt_ClusterDescriptor::create_from_yaml(tt_ClusterDescriptor::get_cluster_descriptor_file_path());
// if (cluster_desc_uniq->get_number_of_chips() != target_devices.size()) {
// GTEST_SKIP() << "SiliconDriverWH.Harvesting skipped because it can only be run on a two chip nebula system";
// }
// }

// uint32_t num_host_mem_ch_per_mmio_device = 1;
// // Initialize the driver with a 1x1 descriptor and explictly do not perform harvesting
// tt_SiliconDevice device = tt_SiliconDevice("./tests/soc_descs/wormhole_b0_1x1.yaml", test_utils::GetClusterDescYAML(), target_devices, num_host_mem_ch_per_mmio_device, false, true, false, simulated_harvesting_masks);
// tt_SiliconDevice device = tt_SiliconDevice("./tests/soc_descs/wormhole_b0_1x1.yaml", tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, false, simulated_harvesting_masks);
// auto sdesc_per_chip = device.get_virtual_soc_descriptors();

// ASSERT_EQ(device.using_harvested_soc_descriptors(), false) << "SOC descriptors should not be modified when harvesting is disabled";
Expand All @@ -146,15 +146,15 @@ TEST(SiliconDriverBH, CreateDestroy) {
// std::set<chip_id_t> target_devices = {0, 1};
// std::unordered_map<chip_id_t, uint32_t> simulated_harvesting_masks = {{0, 30}, {1, 60}};
// {
// std::unique_ptr<tt_ClusterDescriptor> cluster_desc_uniq = tt_ClusterDescriptor::create_from_yaml(test_utils::GetClusterDescYAML());
// std::unique_ptr<tt_ClusterDescriptor> cluster_desc_uniq = tt_ClusterDescriptor::create_from_yaml(tt_ClusterDescriptor::get_cluster_descriptor_file_path());
// if (cluster_desc_uniq->get_number_of_chips() != target_devices.size()) {
// GTEST_SKIP() << "SiliconDriverWH.Harvesting skipped because it can only be run on a two chip nebula system";
// }
// }

// uint32_t num_host_mem_ch_per_mmio_device = 1;

// tt_SiliconDevice device = tt_SiliconDevice("./tests/soc_descs/wormhole_b0_8x10.yaml", test_utils::GetClusterDescYAML(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true, simulated_harvesting_masks);
// tt_SiliconDevice device = tt_SiliconDevice("./tests/soc_descs/wormhole_b0_8x10.yaml", tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true, simulated_harvesting_masks);
// set_params_for_remote_txn(device);
// auto mmio_devices = device.get_target_mmio_device_ids();

Expand Down
6 changes: 3 additions & 3 deletions tests/galaxy/test_umd_concurrent_threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static const std::string SOC_DESC_PATH = "tests/soc_descs/wormhole_b0_8x10.yaml"
TEST(GalaxyConcurrentThreads, WriteToAllChipsL1) {
// Galaxy Setup

std::string cluster_desc_path = test_utils::GetClusterDescYAML();
std::string cluster_desc_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path();
std::shared_ptr<tt_ClusterDescriptor> cluster_desc = tt_ClusterDescriptor::create_from_yaml(cluster_desc_path);
std::set<chip_id_t> target_devices_th1 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
std::set<chip_id_t> target_devices_th2 = {17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
Expand Down Expand Up @@ -113,7 +113,7 @@ TEST(GalaxyConcurrentThreads, WriteToAllChipsL1) {

TEST(GalaxyConcurrentThreads, WriteToAllChipsDram) {
// Galaxy Setup
std::string cluster_desc_path = test_utils::GetClusterDescYAML();
std::string cluster_desc_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path();
std::shared_ptr<tt_ClusterDescriptor> cluster_desc = tt_ClusterDescriptor::create_from_yaml(cluster_desc_path);
std::set<chip_id_t> target_devices_th1 = {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32};
std::set<chip_id_t> target_devices_th2 = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31};
Expand Down Expand Up @@ -204,7 +204,7 @@ TEST(GalaxyConcurrentThreads, WriteToAllChipsDram) {

TEST(GalaxyConcurrentThreads, PushInputsWhileSignalingCluster) {
// Galaxy Setup
std::string cluster_desc_path = test_utils::GetClusterDescYAML();
std::string cluster_desc_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path();
std::shared_ptr<tt_ClusterDescriptor> cluster_desc = tt_ClusterDescriptor::create_from_yaml(cluster_desc_path);
std::set<chip_id_t> target_devices = {0, 1, 2, 3, 4, 5, 6, 7, 8};
for (const auto& chip : target_devices) {
Expand Down
6 changes: 3 additions & 3 deletions tests/galaxy/test_umd_remote_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static const std::string SOC_DESC_PATH = "tests/soc_descs/wormhole_b0_8x10.yaml"

void run_remote_read_write_test(uint32_t vector_size, bool dram_write) {
// Galaxy Setup
std::string cluster_desc_path = test_utils::GetClusterDescYAML();
std::string cluster_desc_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path();
std::shared_ptr<tt_ClusterDescriptor> cluster_desc = tt_ClusterDescriptor::create_from_yaml(cluster_desc_path);
std::set<chip_id_t> target_devices = {};
for (const auto& chip : cluster_desc->get_all_chips()) {
Expand Down Expand Up @@ -126,7 +126,7 @@ TEST(GalaxyBasicReadWrite, LargeRemoteDramBlockReadWrite) { run_remote_read_writ
void run_data_mover_test(
uint32_t vector_size, tt_multichip_core_addr sender_core, tt_multichip_core_addr receiver_core) {
// Galaxy Setup
std::string cluster_desc_path = test_utils::GetClusterDescYAML();
std::string cluster_desc_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path();
std::shared_ptr<tt_ClusterDescriptor> cluster_desc = tt_ClusterDescriptor::create_from_yaml(cluster_desc_path);
std::set<chip_id_t> target_devices = {};
for (const auto& chip : cluster_desc->get_all_chips()) {
Expand Down Expand Up @@ -240,7 +240,7 @@ TEST(GalaxyDataMovement, TwoChipMoveData4) {
void run_data_broadcast_test(
uint32_t vector_size, tt_multichip_core_addr sender_core, std::vector<tt_multichip_core_addr> receiver_cores) {
// Galaxy Setup
std::string cluster_desc_path = test_utils::GetClusterDescYAML();
std::string cluster_desc_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path();
std::shared_ptr<tt_ClusterDescriptor> cluster_desc = tt_ClusterDescriptor::create_from_yaml(cluster_desc_path);
std::set<chip_id_t> target_devices = {};
for (const auto& chip : cluster_desc->get_all_chips()) {
Expand Down
2 changes: 1 addition & 1 deletion tests/galaxy/test_umd_remote_api_stability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class WormholeGalaxyStabilityTestFixture : public WormholeTestFixture {
static uint32_t scale_number_of_tests;

static void SetUpTestSuite() {
std::unique_ptr<tt_ClusterDescriptor> cluster_desc = tt_ClusterDescriptor::create_from_yaml(test_utils::GetClusterDescYAML());
std::unique_ptr<tt_ClusterDescriptor> cluster_desc = tt_ClusterDescriptor::create_from_yaml(tt_ClusterDescriptor::get_cluster_descriptor_file_path());
detected_num_chips = cluster_desc->get_number_of_chips();
if (detected_num_chips < EXPECTED_MIN_CHIPS) {
skip_tests = true;
Expand Down
36 changes: 0 additions & 36 deletions tests/test_utils/generate_cluster_desc.cpp

This file was deleted.

25 changes: 0 additions & 25 deletions tests/test_utils/generate_cluster_desc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,4 @@ inline std::string GetAbsPath(std::string path_){
std::filesystem::path abs_path = umd_root / path_;
return abs_path.string();
}

inline std::string GetClusterDescYAML(){
static std::string yaml_path;
static bool is_initialized = false;
if (!is_initialized){
std::filesystem::path umd_path = std::filesystem::path(test_utils::GetAbsPath(""));
std::filesystem::path cluster_path = umd_path / ".umd";
std::filesystem::create_directories( cluster_path );

cluster_path /= "cluster_desc.yaml";
if (!std::filesystem::exists(cluster_path)){
auto val = system ( ("touch " + cluster_path.string()).c_str());
if(val != 0) throw std::runtime_error("Cluster Generation Failed!");
}
// Generates the cluster descriptor in the CWD

std::filesystem::path eth_fpath = umd_path / "device/bin/silicon/x86/create-ethernet-map";
std::string cmd = fmt::format("{} {}", eth_fpath.string(), cluster_path.string());
int val = system(cmd.c_str());
if(val != 0) throw std::runtime_error("Cluster Generation Failed!");
yaml_path = cluster_path.string();
is_initialized = true;
}
return yaml_path;
}
} // namespace test_utils
Loading

0 comments on commit 718132f

Please sign in to comment.