Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joelsmithTT committed Oct 17, 2024
1 parent ae3d9c1 commit 626cbc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion device/pcie/pci_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ static semver_t read_kmd_version() {
std::ifstream file(path);

if (!file.is_open()) {
TT_THROW("Failed to open: {}; could not determine tenstorrent driver version", path);
log_warning(LogSiliconDriver, "Failed to open file: {}", path);
return semver_t{0, 0, 0};
}

std::string version_str;
Expand Down
4 changes: 3 additions & 1 deletion device/pcie/pci_device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include "device/architecture_implementation.h"
#include "device/tt_cluster_descriptor_types.h"

#include "fmt/format.h"

// TODO: this is used up in tt_silicon_driver.cpp but that logic ought to be
// lowered into the PCIDevice class since it is specific to PCIe cards.
// See /vendor_ip/synopsys/052021/bh_pcie_ctl_gen5/export/configuration/DWC_pcie_ctl.h
Expand Down Expand Up @@ -83,7 +85,7 @@ struct semver_t {
}

std::string to_string() const {
return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(patch);
return fmt::format("{}.{}.{}", major, minor, patch);
}
};

Expand Down

0 comments on commit 626cbc2

Please sign in to comment.