Merge branch 'ROCm:develop' into active_set_APIs

This commit is contained in:
avinashkethineedi
2024-11-05 00:29:18 +00:00
10 changed files with 5 additions and 85 deletions
-8
View File
@@ -32,10 +32,6 @@
#include "ipc_context_proxy.hpp"
#include "../ipc_policy.hpp"
#ifndef USE_COOPERATIVE_GROUPS
#include "../memory/notifier.hpp"
#endif /* NOT DEFINED: USE_COOPERATIVE_GROUPS */
namespace rocshmem {
class IPCBackend : public Backend {
@@ -172,10 +168,6 @@ class IPCBackend : public Backend {
*/
int *fence_pool{nullptr};
#ifndef USE_COOPERATIVE_GROUPS
NotifierProxy<HIPAllocator, detail::atomic::memory_scope_agent> notifier_{};
#endif /* NOT DEFINED: USE_COOPERATIVE_GROUPS */
protected:
/**
* @copydoc Backend::dump_backend_stats()
-4
View File
@@ -51,10 +51,6 @@ __host__ IPCContext::IPCContext(Backend *b)
Wrk_Sync_buffer_bases_ = backend->get_wrk_sync_bases();
orders_.store = detail::atomic::rocshmem_memory_order::memory_order_seq_cst;
#ifndef USE_COOPERATIVE_GROUPS
notifier_ = backend->notifier_.get();
#endif /* NOT DEFINED: USE_COOPERATIVE_GROUPS */
}
__device__ void IPCContext::threadfence_system() {
-11
View File
@@ -27,13 +27,6 @@
#include "../atomic.hpp"
#include "../team.hpp"
#ifdef USE_COOPERATIVE_GROUPS
#include <hip/hip_cooperative_groups.h>
namespace cg = cooperative_groups;
#else
#include "../memory/notifier.hpp"
#endif /* USE_COOPERATIVE_GROUPS */
namespace rocshmem {
class IPCContext : public Context {
@@ -273,10 +266,6 @@ class IPCContext : public Context {
//Temporary scratchpad memory used by internal barrier algorithms.
int64_t *barrier_sync{nullptr};
#ifndef USE_COOPERATIVE_GROUPS
Notifier<detail::atomic::memory_scope_agent> *notifier_{nullptr};
#endif /* NOT DEFINED: USE_COOPERATIVE_GROUPS */
//Struct defining memory ordering for atomic operations.
detail::atomic::rocshmem_memory_orders orders_{};
+3 -15
View File
@@ -87,27 +87,15 @@ __device__ void IPCContext::internal_atomic_barrier(int pe, int PE_start,
// Uses PE values that are relative to world
__device__ void IPCContext::internal_sync(int pe, int PE_start, int stride,
int PE_size, int64_t *pSync) {
#ifdef USE_COOPERATIVE_GROUPS
cg::grid_group grid = cg::this_grid();
grid.sync();
if (0 == grid.thread_rank())
#else
notifier_->sync();
if (0 == get_flat_id())
#endif /* USE_COOPERATIVE_GROUPS */
{
__syncthreads();
if (is_thread_zero_in_block()) {
if (PE_size < 64) {
internal_direct_barrier(pe, PE_start, stride, PE_size, pSync);
} else {
internal_atomic_barrier(pe, PE_start, stride, PE_size, pSync);
}
}
__threadfence();
#ifdef USE_COOPERATIVE_GROUPS
grid.sync();
#else
notifier_->sync();
#endif /* USE_COOPERATIVE_GROUPS */
__syncthreads();
}
__device__ void IPCContext::sync(roc_shmem_team_t team) {