-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.h
31 lines (23 loc) · 801 Bytes
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef COMMON_H
#define COMMON_H
#include "hip/hip_runtime.h"
#define NUM_PROCS 8
#define HIP_IPC_HANDLE_SIZE_RCCL 64
#define HIPCHECK(cmd) do { \
hipError_t e = cmd; \
if( e != hipSuccess ) { \
printf("Test HIP failure %s:%d '%s'\n", \
__FILE__,__LINE__,hipGetErrorString(e)); \
return 1; \
} \
} while(0)
__global__ void setData(int* data, int targetRank, size_t N)
{
size_t idx = blockDim.x * blockIdx.x + threadIdx.x;
if (idx < N)
data[idx] = targetRank;
}
static unsigned int numElements = 1024;
const char* smHandlesName = "prototype";
const int NUM_HANDLES_TOTAL = NUM_PROCS * 2;
#endif