Skip to content

Commit

Permalink
Improved calibration cache read message
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrusbehr committed Jul 18, 2023
1 parent 4e1e763 commit 7ce49f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,11 +600,12 @@ bool Int8EntropyCalibrator2::getBatch(void **bindings, const char **names, int32
}

void const *Int8EntropyCalibrator2::readCalibrationCache(size_t &length) noexcept {
std::cout << "Reading calibration cache: " << m_calibTableName << std::endl;
std::cout << "Searching for calibration cache: " << m_calibTableName << std::endl;
m_calibCache.clear();
std::ifstream input(m_calibTableName, std::ios::binary);
input >> std::noskipws;
if (m_readCache && input.good()) {
std::cout << "Reading calibration cache: " << m_calibTableName << std::endl;
std::copy(std::istream_iterator<char>(input), std::istream_iterator<char>(), std::back_inserter(m_calibCache));
}
length = m_calibCache.size();
Expand Down

0 comments on commit 7ce49f8

Please sign in to comment.