rocprofv3: Updates to counter collection optimizations (#24)

* Updates to counter collection optimizations

* Fix logic error

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rocprofiler-sdk commit: a09eda05b2]
Этот коммит содержится в:
Madsen, JonathanиJonathan R. Madsen authored and GitHub committed 2024-12-06 23:29:12 +00:00
1 родитель 2cb3c6d84f
Коммит 0ed4441ca7
6 files changed
+103 -62

No files matched your search

+8 -2
Просмотреть файл
@@ -106,10 +106,16 @@ offload_buffer(domain_type type)
auto _lk = std::lock_guard<std::mutex>(filebuf->file.file_mutex);
[[maybe_unused]] static auto _success = filebuf->file.open();
auto& _fs = filebuf->file.stream;
filebuf->file.file_pos.emplace(_fs.tellg());
ROCP_CI_LOG_IF(WARNING, _fs.tellg() != _fs.tellp()) // this should always be true
<< "tellg=" << _fs.tellg() << ", tellp=" << _fs.tellp();
filebuf->file.file_pos.emplace(_fs.tellp());
filebuf->buffer.save(_fs);
filebuf->buffer.clear();
CHECK(filebuf->buffer.is_empty() == true);
ROCP_CI_LOG_IF(ERROR, !filebuf->buffer.is_empty())
<< "buffer is not empty after offload: count=" << filebuf->buffer.count();
}
template <typename Tp>