[SWDEV-513658] Force HSA_AMD_MEMORY_POOL_EXECUTABLE_FLAG value to be used with HSA calls (#192)

* Force HSA_AMD_MEMORY_POOL_EXECUTABLE_FLAG  value to be used with HSA calls

Fix for CI

* More tweaks

* Increase reproducible-runtime kernel sleep granularity

* Fix data race in synchronous device counter collection sample

* Update device counting service

- add get_active_context function

---------

Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
This commit is contained in:
Welton, Benjamin
2025-02-10 09:34:26 -08:00
committed by GitHub
parent e67a4451d8
commit 080b2ba451
9 changed files with 115 additions and 42 deletions
@@ -172,6 +172,20 @@ get_active_contexts(context_filter_t filter)
return data;
}
const context*
get_active_context(rocprofiler_context_id_t id)
{
if(get_num_active_contexts().load(std::memory_order_acquire) > 0)
{
for(auto& itr : get_active_contexts_impl())
{
const auto* ctx = itr.load(std::memory_order_acquire);
if(ctx && ctx->context_idx == id.handle) return ctx;
}
}
return nullptr;
}
// set the client index needs to be called before allocate_context()
void
push_client(uint32_t value)
@@ -199,6 +199,9 @@ get_active_contexts(context_array_t& data, context_filter_t filter = default_con
context_array_t
get_active_contexts(context_filter_t filter = default_context_filter);
const context*
get_active_context(rocprofiler_context_id_t id);
/// \brief disable the contexturation.
rocprofiler_status_t
stop_client_contexts(rocprofiler_client_id_t id);