Remove SpinEBOBlockMutex usage and unit tests
[ROCm/rocshmem commit: 770890a107]
Bu işleme şunda yer alıyor:
@@ -54,45 +54,41 @@ enum class BackendType { RO_BACKEND, GPU_IB_BACKEND };
|
||||
/**
|
||||
* @brief Device static dispatch method call.
|
||||
*/
|
||||
#ifndef USE_GPU_IB
|
||||
#define DISPATCH(Func) \
|
||||
static_cast<ROContext *>(this)->Func;
|
||||
#ifdef USE_GPU_IB
|
||||
#define DISPATCH(Func) \
|
||||
static_cast<GPUIBContext *>(this)->Func;
|
||||
#else
|
||||
#define DISPATCH(Func) \
|
||||
dev_mtx_.lock(); \
|
||||
static_cast<GPUIBContext *>(this)->Func; \
|
||||
dev_mtx_.unlock();
|
||||
static_cast<ROContext *>(this)->Func;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Device static dispatch method call with a return value.
|
||||
*/
|
||||
#ifndef USE_GPU_IB
|
||||
#ifdef USE_GPU_IB
|
||||
#define DISPATCH_RET(Func) \
|
||||
auto ret_val{0}; \
|
||||
ret_val = static_cast<GPUIBContext *>(this)->Func; \
|
||||
return ret_val;
|
||||
#else
|
||||
#define DISPATCH_RET(Func) \
|
||||
auto ret_val{0}; \
|
||||
ret_val = static_cast<ROContext *>(this)->Func; \
|
||||
return ret_val;
|
||||
#else
|
||||
#define DISPATCH_RET(Func) \
|
||||
dev_mtx_.lock(); \
|
||||
auto ret_val{0}; \
|
||||
ret_val = static_cast<GPUIBContext *>(this)->Func; \
|
||||
dev_mtx_.unlock(); \
|
||||
return ret_val;
|
||||
#endif
|
||||
/**
|
||||
* @brief Device static dispatch method call with a return type of pointer.
|
||||
*/
|
||||
#ifndef USE_GPU_IB
|
||||
#define DISPATCH_RET_PTR(Func) \
|
||||
void *ret_val{nullptr}; \
|
||||
ret_val = static_cast<ROContext *>(this)->Func; \
|
||||
return ret_val;
|
||||
#else
|
||||
#ifdef USE_GPU_IB
|
||||
#define DISPATCH_RET_PTR(Func) \
|
||||
void *ret_val{nullptr}; \
|
||||
ret_val = static_cast<GPUIBContext *>(this)->Func; \
|
||||
return ret_val;
|
||||
#else
|
||||
#define DISPATCH_RET_PTR(Func) \
|
||||
void *ret_val{nullptr}; \
|
||||
ret_val = static_cast<ROContext *>(this)->Func; \
|
||||
return ret_val;
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -102,10 +98,10 @@ enum class BackendType { RO_BACKEND, GPU_IB_BACKEND };
|
||||
* MPI_THREAD_MULTIPLE (for RMA and AMO operations) and the ordering and
|
||||
* threading semantics of collectives in OpenSHMEM match those of MPI.
|
||||
*/
|
||||
#ifndef USE_GPU_IB
|
||||
#define HOST_DISPATCH(Func) static_cast<ROHostContext *>(this)->Func;
|
||||
#else
|
||||
#ifdef USE_GPU_IB
|
||||
#define HOST_DISPATCH(Func) static_cast<GPUIBHostContext *>(this)->Func;
|
||||
#else
|
||||
#define HOST_DISPATCH(Func) static_cast<ROHostContext *>(this)->Func;
|
||||
#endif
|
||||
/**
|
||||
* @brief Host static dispatch method call with return value.
|
||||
@@ -115,16 +111,16 @@ enum class BackendType { RO_BACKEND, GPU_IB_BACKEND };
|
||||
* threading semantics of collectives in OpenSHMEM match those of MPI.
|
||||
*/
|
||||
|
||||
#ifndef USE_GPU_IB
|
||||
#define HOST_DISPATCH_RET(Func) \
|
||||
auto ret_val{0}; \
|
||||
ret_val = static_cast<ROHostContext *>(this)->Func; \
|
||||
return ret_val;
|
||||
#else
|
||||
#ifdef USE_GPU_IB
|
||||
#define HOST_DISPATCH_RET(Func) \
|
||||
auto ret_val{0}; \
|
||||
ret_val = static_cast<GPUIBHostContext *>(this)->Func; \
|
||||
return ret_val;
|
||||
#else
|
||||
#define HOST_DISPATCH_RET(Func) \
|
||||
auto ret_val{0}; \
|
||||
ret_val = static_cast<ROHostContext *>(this)->Func; \
|
||||
return ret_val;
|
||||
#endif
|
||||
|
||||
} // namespace rocshmem
|
||||
|
||||
@@ -433,11 +433,6 @@ class Context {
|
||||
*/
|
||||
ROCHostStats ctxHostStats{};
|
||||
|
||||
/**
|
||||
* @brief Lock to prevent data races on shared data
|
||||
*/
|
||||
SpinEBOBlockMutex dev_mtx_{};
|
||||
|
||||
protected:
|
||||
/**************************************************************************
|
||||
***************************** POLICY MEMBERS *****************************
|
||||
|
||||
@@ -30,8 +30,7 @@ namespace rocshmem {
|
||||
__device__ Context::Context(Backend* handle, bool shareable)
|
||||
: num_pes(handle->getNumPEs()),
|
||||
my_pe(handle->getMyPE()),
|
||||
fence_(shareable),
|
||||
dev_mtx_(shareable) {
|
||||
fence_(shareable) {
|
||||
/*
|
||||
* Device-side context constructor is a work-group collective, so make
|
||||
* sure all the members have their default values before returning.
|
||||
|
||||
@@ -29,8 +29,7 @@ namespace rocshmem {
|
||||
__host__ Context::Context(Backend* handle, bool shareable)
|
||||
: num_pes(handle->getNumPEs()),
|
||||
my_pe(handle->getMyPE()),
|
||||
fence_(shareable),
|
||||
dev_mtx_(shareable) {}
|
||||
fence_(shareable) {}
|
||||
|
||||
/******************************************************************************
|
||||
********************** CONTEXT DISPATCH IMPLEMENTATIONS **********************
|
||||
|
||||
@@ -82,7 +82,7 @@ target_sources(
|
||||
pow2_bins_gtest.cpp
|
||||
remote_heap_info_gtest.cpp
|
||||
mpi_init_singleton_gtest.cpp
|
||||
spin_ebo_block_mutex_gtest.cpp
|
||||
#spin_ebo_block_mutex_gtest.cpp
|
||||
abql_block_mutex_gtest.cpp
|
||||
notifier_gtest.cpp
|
||||
forward_list_gtest.cpp
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle