Workflow, submodules, and thread info Updates (#352)
* Update CI workflows - use node20 workflow packages * Update tests/source/CMakeLists.txt - Use OMNITRACE_TRACE and OMNTRACE_PROFILE instead of perfetto/timemory * Update timemory submodule - argparse: requires -> required - parse callbacks * Update thread_info.cpp - fix causal::delay::get_local usage * Update timemory submodule * Update kokkos submodule - release 3.7.02 * Revert opensuse.yml and ubuntu-bionic.yml to use node16 workflows * Update docs.yml
This commit is contained in:
committed by
GitHub
parent
f8d52a6dbf
commit
219b2e988e
@@ -870,7 +870,7 @@ add_core_arguments(parser_t& _parser, parser_data& _data)
|
||||
.min_count(1)
|
||||
.max_count(3)
|
||||
.dtype("string")
|
||||
.requires({ "profile|flat-profile" })
|
||||
.required({ "profile|flat-profile" })
|
||||
.choices({ "text", "json", "console" })
|
||||
.action([&](parser_t& p) {
|
||||
auto _v = p.get<strset_t>("profile-format");
|
||||
@@ -976,7 +976,7 @@ add_core_arguments(parser_t& _parser, parser_data& _data)
|
||||
{ "--cpus" },
|
||||
"CPU IDs for frequency sampling. Supports integers and/or ranges")
|
||||
.dtype("int and/or range")
|
||||
.requires({ "host" })
|
||||
.required({ "host" })
|
||||
.action([&](parser_t& p) {
|
||||
update_env(_data, "OMNITRACE_SAMPLING_CPUS",
|
||||
join(array_config_t{ "," }, p.get<strvec_t>("cpus")));
|
||||
@@ -992,7 +992,7 @@ add_core_arguments(parser_t& _parser, parser_data& _data)
|
||||
.add_argument({ "--gpus" },
|
||||
"GPU IDs for SMI queries. Supports integers and/or ranges")
|
||||
.dtype("int and/or range")
|
||||
.requires({ "device" })
|
||||
.required({ "device" })
|
||||
.action([&](parser_t& p) {
|
||||
update_env(_data, "OMNITRACE_SAMPLING_GPUS",
|
||||
join(array_config_t{ "," }, p.get<strvec_t>("gpus")));
|
||||
@@ -1117,7 +1117,7 @@ add_core_arguments(parser_t& _parser, parser_data& _data)
|
||||
_parser.add_argument({ "--sample-realtime" }, _realtime_desc)
|
||||
.min_count(0)
|
||||
.dtype("[freq] [delay] [tids...]")
|
||||
.requires(std::move(_realtime_reqs))
|
||||
.required(std::move(_realtime_reqs))
|
||||
.action([&](parser_t& p) {
|
||||
auto _v = p.get<std::deque<std::string>>("sample-realtime");
|
||||
update_env(_data, "OMNITRACE_SAMPLING_REALTIME", true);
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include <timemory/components/timing/backends.hpp>
|
||||
#include <timemory/process/threading.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace omnitrace
|
||||
{
|
||||
namespace
|
||||
@@ -105,8 +107,9 @@ init_index_data(int64_t _tid, bool _offset = false)
|
||||
return itr;
|
||||
}
|
||||
|
||||
const auto unknown_thread = std::optional<thread_info>{};
|
||||
int64_t peak_num_threads = max_supported_threads;
|
||||
thread_local int64_t offset_causal_count = 0;
|
||||
const auto unknown_thread = std::optional<thread_info>{};
|
||||
int64_t peak_num_threads = max_supported_threads;
|
||||
} // namespace
|
||||
|
||||
std::string
|
||||
@@ -187,8 +190,13 @@ thread_info::init(bool _offset)
|
||||
_info = thread_info{};
|
||||
_info->is_offset = threading::offset_this_id();
|
||||
_info->index_data = init_index_data(_tid, _info->is_offset);
|
||||
_info->causal_count = &causal::delay::get_local();
|
||||
_info->lifetime.first = tim::get_clock_real_now<uint64_t, std::nano>();
|
||||
|
||||
const auto _sequent_tid = _info->index_data->sequent_value;
|
||||
_info->causal_count = (!_info->is_offset && _sequent_tid < peak_num_threads)
|
||||
? &causal::delay::get_local(_sequent_tid)
|
||||
: &offset_causal_count;
|
||||
|
||||
if(_info->is_offset) set_thread_state(ThreadState::Disabled);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user