Skip to content
Snippets Groups Projects
Commit 7a6af7a6 authored by Maxence Naud's avatar Maxence Naud
Browse files

Minor updates

- Remove unused empty CMakeLists.txt in src directory
- upd: 'approxEq' logging from error to notice in case of mismatch
- do not remove spaces at the beginning of a new line in log
parent 44f252c8
No related branches found
No related tags found
2 merge requests!318[Upd] release verision 0.5.0,!315[UPD] Enforce C++ version and improve setup.py flexibility
Pipeline #63930 passed
......@@ -77,7 +77,7 @@ bool approxEq(const Tensor& t1, const Tensor& t2, float relative = 1e-5f, float
const float threshold = absolute + (relative * static_cast<float>(std::abs(val2)));
if (diff > threshold) {
Log::error("Tensor values differ at index {}: {} vs {} (diff: {}, threshold: {})\n"
Log::notice("Tensor values differ at index {}: {} vs {} (diff: {}, threshold: {})\n"
"Tensor 1:\n{}\nTensor 2:\n{}",
i, val1, val2, diff, threshold, t1, t2);
return false;
......
......@@ -140,10 +140,7 @@ void Log::log(Level level, const std::string& msg) {
wrappedLines.push_back(text.substr(start, lineEnd - start));
// Move to the next segment, skipping spaces
start = lineEnd;
while (start < text.size() && (text[start] == ' ' || text[start] == '\n')) {
++start;
}
start = ++lineEnd;
}
return wrappedLines;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment