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:
committato da
GitHub
parent
f8d52a6dbf
commit
219b2e988e
@@ -49,7 +49,7 @@ jobs:
|
|||||||
conda activate omnitrace-docs
|
conda activate omnitrace-docs
|
||||||
./update-docs.sh
|
./update-docs.sh
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v1
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: ./docs
|
path: ./docs
|
||||||
|
|
||||||
@@ -67,4 +67,4 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v1
|
uses: actions/deploy-pages@v4
|
||||||
|
|||||||
esterno
+1
-1
Submodule examples/lulesh/external/kokkos updated: 698a67731a...1a0c2ff6da
esterno
+1
-1
Submodule external/timemory updated: 2a1bcba0ca...693746c156
@@ -562,7 +562,7 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
|
|||||||
parser.add_argument({ "--profile-format" }, "Data formats for profiling results")
|
parser.add_argument({ "--profile-format" }, "Data formats for profiling results")
|
||||||
.min_count(1)
|
.min_count(1)
|
||||||
.max_count(3)
|
.max_count(3)
|
||||||
.requires({ "profile|flat-profile" })
|
.required({ "profile|flat-profile" })
|
||||||
.choices({ "text", "json", "console" })
|
.choices({ "text", "json", "console" })
|
||||||
.action([&](parser_t& p) {
|
.action([&](parser_t& p) {
|
||||||
auto _v = p.get<std::set<std::string>>("profile");
|
auto _v = p.get<std::set<std::string>>("profile");
|
||||||
@@ -624,7 +624,7 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
|
|||||||
.add_argument({ "--cpus" },
|
.add_argument({ "--cpus" },
|
||||||
"CPU IDs for frequency sampling. Supports integers and/or ranges")
|
"CPU IDs for frequency sampling. Supports integers and/or ranges")
|
||||||
.dtype("int or range")
|
.dtype("int or range")
|
||||||
.requires({ "host" })
|
.required({ "host" })
|
||||||
.action([&](parser_t& p) {
|
.action([&](parser_t& p) {
|
||||||
update_env(
|
update_env(
|
||||||
_env, "OMNITRACE_SAMPLING_CPUS",
|
_env, "OMNITRACE_SAMPLING_CPUS",
|
||||||
@@ -634,7 +634,7 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
|
|||||||
.add_argument({ "--gpus" },
|
.add_argument({ "--gpus" },
|
||||||
"GPU IDs for SMI queries. Supports integers and/or ranges")
|
"GPU IDs for SMI queries. Supports integers and/or ranges")
|
||||||
.dtype("int or range")
|
.dtype("int or range")
|
||||||
.requires({ "device" })
|
.required({ "device" })
|
||||||
.action([&](parser_t& p) {
|
.action([&](parser_t& p) {
|
||||||
update_env(
|
update_env(
|
||||||
_env, "OMNITRACE_SAMPLING_GPUS",
|
_env, "OMNITRACE_SAMPLING_GPUS",
|
||||||
@@ -709,7 +709,7 @@ parse_args(int argc, char** argv, std::vector<char*>& _env)
|
|||||||
|
|
||||||
parser.add_argument({ "--realtime" }, _realtime_desc)
|
parser.add_argument({ "--realtime" }, _realtime_desc)
|
||||||
.min_count(0)
|
.min_count(0)
|
||||||
.requires(std::move(_realtime_reqs))
|
.required(std::move(_realtime_reqs))
|
||||||
.action([&](parser_t& p) {
|
.action([&](parser_t& p) {
|
||||||
auto _v = p.get<std::deque<std::string>>("realtime");
|
auto _v = p.get<std::deque<std::string>>("realtime");
|
||||||
update_env(_env, "OMNITRACE_SAMPLING_REALTIME", true);
|
update_env(_env, "OMNITRACE_SAMPLING_REALTIME", true);
|
||||||
|
|||||||
@@ -870,7 +870,7 @@ add_core_arguments(parser_t& _parser, parser_data& _data)
|
|||||||
.min_count(1)
|
.min_count(1)
|
||||||
.max_count(3)
|
.max_count(3)
|
||||||
.dtype("string")
|
.dtype("string")
|
||||||
.requires({ "profile|flat-profile" })
|
.required({ "profile|flat-profile" })
|
||||||
.choices({ "text", "json", "console" })
|
.choices({ "text", "json", "console" })
|
||||||
.action([&](parser_t& p) {
|
.action([&](parser_t& p) {
|
||||||
auto _v = p.get<strset_t>("profile-format");
|
auto _v = p.get<strset_t>("profile-format");
|
||||||
@@ -976,7 +976,7 @@ add_core_arguments(parser_t& _parser, parser_data& _data)
|
|||||||
{ "--cpus" },
|
{ "--cpus" },
|
||||||
"CPU IDs for frequency sampling. Supports integers and/or ranges")
|
"CPU IDs for frequency sampling. Supports integers and/or ranges")
|
||||||
.dtype("int and/or range")
|
.dtype("int and/or range")
|
||||||
.requires({ "host" })
|
.required({ "host" })
|
||||||
.action([&](parser_t& p) {
|
.action([&](parser_t& p) {
|
||||||
update_env(_data, "OMNITRACE_SAMPLING_CPUS",
|
update_env(_data, "OMNITRACE_SAMPLING_CPUS",
|
||||||
join(array_config_t{ "," }, p.get<strvec_t>("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" },
|
.add_argument({ "--gpus" },
|
||||||
"GPU IDs for SMI queries. Supports integers and/or ranges")
|
"GPU IDs for SMI queries. Supports integers and/or ranges")
|
||||||
.dtype("int and/or range")
|
.dtype("int and/or range")
|
||||||
.requires({ "device" })
|
.required({ "device" })
|
||||||
.action([&](parser_t& p) {
|
.action([&](parser_t& p) {
|
||||||
update_env(_data, "OMNITRACE_SAMPLING_GPUS",
|
update_env(_data, "OMNITRACE_SAMPLING_GPUS",
|
||||||
join(array_config_t{ "," }, p.get<strvec_t>("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)
|
_parser.add_argument({ "--sample-realtime" }, _realtime_desc)
|
||||||
.min_count(0)
|
.min_count(0)
|
||||||
.dtype("[freq] [delay] [tids...]")
|
.dtype("[freq] [delay] [tids...]")
|
||||||
.requires(std::move(_realtime_reqs))
|
.required(std::move(_realtime_reqs))
|
||||||
.action([&](parser_t& p) {
|
.action([&](parser_t& p) {
|
||||||
auto _v = p.get<std::deque<std::string>>("sample-realtime");
|
auto _v = p.get<std::deque<std::string>>("sample-realtime");
|
||||||
update_env(_data, "OMNITRACE_SAMPLING_REALTIME", true);
|
update_env(_data, "OMNITRACE_SAMPLING_REALTIME", true);
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
#include <timemory/components/timing/backends.hpp>
|
#include <timemory/components/timing/backends.hpp>
|
||||||
#include <timemory/process/threading.hpp>
|
#include <timemory/process/threading.hpp>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
namespace omnitrace
|
namespace omnitrace
|
||||||
{
|
{
|
||||||
namespace
|
namespace
|
||||||
@@ -105,8 +107,9 @@ init_index_data(int64_t _tid, bool _offset = false)
|
|||||||
return itr;
|
return itr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto unknown_thread = std::optional<thread_info>{};
|
thread_local int64_t offset_causal_count = 0;
|
||||||
int64_t peak_num_threads = max_supported_threads;
|
const auto unknown_thread = std::optional<thread_info>{};
|
||||||
|
int64_t peak_num_threads = max_supported_threads;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
@@ -187,8 +190,13 @@ thread_info::init(bool _offset)
|
|||||||
_info = thread_info{};
|
_info = thread_info{};
|
||||||
_info->is_offset = threading::offset_this_id();
|
_info->is_offset = threading::offset_this_id();
|
||||||
_info->index_data = init_index_data(_tid, _info->is_offset);
|
_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>();
|
_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);
|
if(_info->is_offset) set_thread_state(ThreadState::Disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ target_compile_definitions(thread-limit PRIVATE MAX_THREADS=${OMNITRACE_MAX_THRE
|
|||||||
target_link_libraries(thread-limit PRIVATE Threads::Threads tests-compile-options)
|
target_link_libraries(thread-limit PRIVATE Threads::Threads tests-compile-options)
|
||||||
|
|
||||||
set(_thread_limit_environment
|
set(_thread_limit_environment
|
||||||
"${_base_environment}" "OMNITRACE_USE_PERFETTO=ON" "OMNITRACE_USE_TIMEMORY=ON"
|
"${_base_environment}" "OMNITRACE_TRACE=ON" "OMNITRACE_PROFILE=ON"
|
||||||
"OMNITRACE_COUT_OUTPUT=ON" "OMNITRACE_USE_SAMPLING=ON" "OMNITRACE_SAMPLING_FREQ=250"
|
"OMNITRACE_COUT_OUTPUT=ON" "OMNITRACE_USE_SAMPLING=ON" "OMNITRACE_SAMPLING_FREQ=250"
|
||||||
"OMNITRACE_VERBOSE=2" "OMNITRACE_TIMEMORY_COMPONENTS=wall_clock,peak_rss,page_rss")
|
"OMNITRACE_VERBOSE=2" "OMNITRACE_TIMEMORY_COMPONENTS=wall_clock,peak_rss,page_rss")
|
||||||
|
|
||||||
|
|||||||
Fai riferimento in un nuovo problema
Block a user