converted roc_shmemx to roc_shmem
Этот коммит содержится в:
@@ -54,16 +54,16 @@ __global__ void ExtendedPrimitiveTest(int loop, int skip, uint64_t *timer,
|
||||
|
||||
switch (type) {
|
||||
case WGGetTestType:
|
||||
roc_shmemx_ctx_getmem_wg(ctx, r_buf, s_buf, size, 1);
|
||||
roc_shmem_ctx_getmem_wg(ctx, r_buf, s_buf, size, 1);
|
||||
break;
|
||||
case WGGetNBITestType:
|
||||
roc_shmemx_ctx_getmem_nbi_wg(ctx, r_buf, s_buf, size, 1);
|
||||
roc_shmem_ctx_getmem_nbi_wg(ctx, r_buf, s_buf, size, 1);
|
||||
break;
|
||||
case WGPutTestType:
|
||||
roc_shmemx_ctx_putmem_wg(ctx, r_buf, s_buf, size, 1);
|
||||
roc_shmem_ctx_putmem_wg(ctx, r_buf, s_buf, size, 1);
|
||||
break;
|
||||
case WGPutNBITestType:
|
||||
roc_shmemx_ctx_putmem_nbi_wg(ctx, r_buf, s_buf, size, 1);
|
||||
roc_shmem_ctx_putmem_nbi_wg(ctx, r_buf, s_buf, size, 1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -56,16 +56,16 @@ __global__ void WaveLevelPrimitiveTest(int loop, int skip, uint64_t *timer,
|
||||
|
||||
switch (type) {
|
||||
case WAVEGetTestType:
|
||||
roc_shmemx_ctx_getmem_wave(ctx, r_buf, s_buf, size, 1);
|
||||
roc_shmem_ctx_getmem_wave(ctx, r_buf, s_buf, size, 1);
|
||||
break;
|
||||
case WAVEGetNBITestType:
|
||||
roc_shmemx_ctx_getmem_nbi_wave(ctx, r_buf, s_buf, size, 1);
|
||||
roc_shmem_ctx_getmem_nbi_wave(ctx, r_buf, s_buf, size, 1);
|
||||
break;
|
||||
case WAVEPutTestType:
|
||||
roc_shmemx_ctx_putmem_wave(ctx, r_buf, s_buf, size, 1);
|
||||
roc_shmem_ctx_putmem_wave(ctx, r_buf, s_buf, size, 1);
|
||||
break;
|
||||
case WAVEPutNBITestType:
|
||||
roc_shmemx_ctx_putmem_nbi_wave(ctx, r_buf, s_buf, size, 1);
|
||||
roc_shmem_ctx_putmem_nbi_wave(ctx, r_buf, s_buf, size, 1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -45,7 +45,7 @@ using namespace rocshmem;
|
||||
static int atoi_scaled(char *s);
|
||||
static void usage(char *pgm);
|
||||
|
||||
static double shmemx_wtime(void) {
|
||||
static double shmem_wtime(void) {
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
return (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0;
|
||||
@@ -154,14 +154,14 @@ int main(int argc, char **argv) {
|
||||
roc_shmem_barrier_all();
|
||||
|
||||
for (time_taken = 0.0, ps = i = 0; i < loops; i++) {
|
||||
start_time = shmemx_wtime();
|
||||
start_time = shmem_wtime();
|
||||
|
||||
roc_shmem_ctx_int_broadcast(ROC_SHMEM_CTX_DEFAULT, target, source, elements,
|
||||
0, 0, 0, npes, &pSync[ps]);
|
||||
|
||||
if (Serialize) roc_shmem_barrier_all();
|
||||
|
||||
time_taken += (shmemx_wtime() - start_time);
|
||||
time_taken += (shmem_wtime() - start_time);
|
||||
|
||||
if (ps_cnt > 1) {
|
||||
ps += ROC_SHMEM_BCAST_SYNC_SIZE;
|
||||
|
||||
@@ -83,7 +83,7 @@ static void usage(char *pgm) {
|
||||
pgm, NUM_ELEMENTS, DFLT_LOOPS);
|
||||
}
|
||||
|
||||
static inline double shmemx_wtime(void) {
|
||||
static inline double shmem_wtime(void) {
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, 0);
|
||||
return (double)((tv.tv_usec / 1000000.0) + tv.tv_sec);
|
||||
@@ -186,11 +186,11 @@ int main(int argc, char **argv) {
|
||||
roc_shmem_barrier_all();
|
||||
|
||||
for (i = 0; i < loops; i++) {
|
||||
start_time = shmemx_wtime();
|
||||
start_time = shmem_wtime();
|
||||
|
||||
roc_shmem_int_get(Target, Source, elements, target_pe);
|
||||
|
||||
time_taken += shmemx_wtime() - start_time;
|
||||
time_taken += shmem_wtime() - start_time;
|
||||
|
||||
if (me == 0) {
|
||||
if (Track && i > 0 && ((i % 200) == 0)) fprintf(stderr, ".%d", i);
|
||||
|
||||
@@ -83,7 +83,7 @@ static void usage(char *pgm) {
|
||||
pgm, NUM_ELEMENTS, DFLT_LOOPS);
|
||||
}
|
||||
|
||||
static inline double shmemx_wtime(void) {
|
||||
static inline double shmem_wtime(void) {
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, 0);
|
||||
return (double)((tv.tv_usec / 1000000.0) + tv.tv_sec);
|
||||
@@ -214,11 +214,11 @@ int main(int argc, char **argv) {
|
||||
roc_shmem_barrier_all();
|
||||
|
||||
for (i = 0; i < loops; i++) {
|
||||
start_time = shmemx_wtime();
|
||||
start_time = shmem_wtime();
|
||||
|
||||
roc_shmem_int_put(Target, Source, elements, target_PE);
|
||||
|
||||
time_taken += (shmemx_wtime() - start_time);
|
||||
time_taken += (shmem_wtime() - start_time);
|
||||
|
||||
if (me == 0) {
|
||||
if (Track && i > 0 && ((i % 200) == 0)) fprintf(stderr, ".%d", i);
|
||||
|
||||
@@ -44,7 +44,7 @@ using namespace rocshmem;
|
||||
|
||||
#define LOOPS 25000
|
||||
|
||||
static double shmemx_wtime(void) {
|
||||
static double shmem_wtime(void) {
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
return (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0;
|
||||
@@ -86,11 +86,11 @@ int main(int argc, char *argv[]) {
|
||||
roc_shmem_barrier_all();
|
||||
|
||||
neighbor = (my_pe + 1) % npes;
|
||||
start_time = shmemx_wtime();
|
||||
start_time = shmem_wtime();
|
||||
for (j = 0, elapsed = 0.0; j < loops; j++) {
|
||||
start_time = shmemx_wtime();
|
||||
start_time = shmem_wtime();
|
||||
lval = roc_shmem_int64_atomic_fetch_inc((int64_t *)&data[1], neighbor);
|
||||
elapsed += shmemx_wtime() - start_time;
|
||||
elapsed += shmem_wtime() - start_time;
|
||||
if (lval != (long)j) {
|
||||
fprintf(stderr, "[%d] Test: FAIL previous val %ld != %d Exit.\n", my_pe,
|
||||
lval, j);
|
||||
|
||||
Ссылка в новой задаче
Block a user