Skip to content

Commit

Permalink
#0: Remove unnecessary using declarations (#13056)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-TT authored Sep 24, 2024
1 parent 0323442 commit 239671d
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions tt_metal/llrt/llrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,9 @@ namespace tt {
// llrt = lower-level runtime
namespace llrt {

namespace fs = std::filesystem;

using std::endl;
using std::move;
using std::string;
using std::to_string;
using std::uint16_t;
using std::uint32_t;
using std::unordered_map;
using std::vector;
using std::uint64_t;

struct HexNameToMemVectorCache {
using lock = std::unique_lock<std::mutex>;
Expand All @@ -51,18 +45,16 @@ struct HexNameToMemVectorCache {
cache_[path] = mem;
}

unordered_map<string, ll_api::memory> cache_;
std::unordered_map<std::string, ll_api::memory> cache_;
std::mutex mutex_;
};

ll_api::memory get_risc_binary(string path) {
ll_api::memory get_risc_binary(std::string path) {

if (HexNameToMemVectorCache::inst().exists(path)) {
return HexNameToMemVectorCache::inst().get(path);
}

fs::path bin_file(path);

std::ifstream hex_istream(path);
ll_api::memory mem(hex_istream);

Expand Down Expand Up @@ -139,8 +131,8 @@ void write_hex_vec_to_core(chip_id_t chip, const CoreCoord &core, const std::vec
tt::Cluster::instance().write_core(hex_vec.data(), hex_vec.size() * sizeof(uint32_t), tt_cxy_pair(chip, core), addr, small_access);
}

std::vector<std::uint32_t> read_hex_vec_from_core(chip_id_t chip, const CoreCoord &core, uint64_t addr, uint32_t sz_bytes) {
vector<std::uint32_t> read_hex_vec;
std::vector<uint32_t> read_hex_vec_from_core(chip_id_t chip, const CoreCoord &core, uint64_t addr, uint32_t sz_bytes) {
std::vector<uint32_t> read_hex_vec;
tt::Cluster::instance().read_core(read_hex_vec, sz_bytes, tt_cxy_pair(chip, core), addr);
return read_hex_vec;
}
Expand Down

0 comments on commit 239671d

Please sign in to comment.