Support ACTIVITY_DOMAIN_ROCTX (#87)

- New configuration variable: OMNITRACE_USE_ROCTX
- Enable support for roctxRangePushA, roctxRangePop, roctxRangeStartA, roctxRangeStop

[ROCm/rocprofiler-systems commit: d22725e830]
This commit is contained in:
Jonathan R. Madsen
2022-07-18 02:06:40 -05:00
committed by GitHub
parent 39adaaef98
commit 41b86132bb
7 changed files with 117 additions and 2 deletions
@@ -228,6 +228,11 @@ configure_settings(bool _init)
"Enable sampling GPU power, temp, utilization, and memory usage", true, "backend",
"rocm_smi", "rocm");
OMNITRACE_CONFIG_SETTING(
bool, "OMNITRACE_USE_ROCTX",
"Enable ROCtx API. Warning! Out-of-order ranges may corrupt perfetto flamegraph",
false, "backend", "roctracer", "rocm", "roctx");
OMNITRACE_CONFIG_SETTING(bool, "OMNITRACE_USE_SAMPLING",
"Enable statistical sampling of call-stack", false,
"backend", "sampling");
@@ -1198,6 +1203,17 @@ get_use_rocm_smi()
#endif
}
bool
get_use_roctx()
{
#if defined(OMNITRACE_USE_ROCTRACER) && OMNITRACE_USE_ROCTRACER > 0
static auto _v = get_config()->find("OMNITRACE_USE_ROCTX");
return static_cast<tim::tsettings<bool>&>(*_v->second).get();
#else
return false;
#endif
}
bool&
get_use_sampling()
{