38#include <hip/hip_runtime.h>
50 void *
dr,
void *
ds,
void *
dt,
60 void *
dr,
void *
ds,
void *
dt,
62 void *
w3,
int *nel,
int *lx) {
74#define CASE_1D(LX, C) \
75 hipLaunchKernelGGL( HIP_KERNEL_NAME( \
76 cdtp_kernel_1d<real, LX, NEKO_CHUNKS(LX, C)> ), \
77 nblcks, NEKO_CHUNKS_NTHRDS(LX, C), 0, \
78 (hipStream_t) glb_cmd_queue, \
79 (real *) dtx, (real *) x, \
80 (real *) dr, (real *) ds, (real *) dt, \
81 (real *) dxt, (real *) dyt, (real *) dzt, \
83 HIP_CHECK(hipGetLastError());
86#define CASE_1D_SEL(LX, SEL) \
88 case 0: CASE_1D(LX, 0); break; \
89 case 1: CASE_1D(LX, 1); break; \
90 case 2: CASE_1D(LX, 2); break; \
91 default: CASE_1D(LX, 3); break; \
94#define CASE_KSTEP(LX, C) \
95 hipLaunchKernelGGL( HIP_KERNEL_NAME( \
96 cdtp_kernel_kstep<real, LX, NEKO_EB(LX, C)> ), \
97 NEKO_EB_NBLCKS(*nel, LX, C), NEKO_EB_NTHRDS(LX, C), 0, \
98 (hipStream_t) glb_cmd_queue, \
99 (real *) dtx, (real *) x, \
100 (real *) dr, (real *) ds, (real *) dt, \
101 (real *) dxt, (real *) dyt, (real *) dzt, \
102 (real *) w3, *nel); \
103 HIP_CHECK(hipGetLastError());
106#define CASE_KSTEP_SEL(LX, SEL) \
108 case 0: CASE_KSTEP(LX, 0); break; \
109 case 1: CASE_KSTEP(LX, 1); break; \
110 default: CASE_KSTEP(LX, 2); break; \
115 if(autotune[LX] == 0 ) { \
116 autotune[LX]=tune_cdtp<LX>(dtx, x, \
119 w3, nel, lx, &autotune_eb[LX], \
121 } else if (autotune[LX] == 1 ) { \
122 CASE_1D_SEL(LX, autotune_ch[LX]); \
123 } else if (autotune[LX] == 2 ) { \
124 CASE_KSTEP_SEL(LX, autotune_eb[LX]); \
128#define CASE_LARGE(LX) \
170template < const
int LX >
172 void *
dr,
void *
ds,
void *
dt,
250 for (
int r = 0; r <
rounds; r++) {
__global__ void ale_add_kinematics_kernel(const int n, T *__restrict__ wx, T *__restrict__ wy, T *__restrict__ wz, const T *__restrict__ x_ref, const T *__restrict__ y_ref, const T *__restrict__ z_ref, const T *__restrict__ phi, const T *__restrict__ x, const T *__restrict__ y, const T *__restrict__ z, const kinematics_params_t kin_params)
__global__ void const T *__restrict__ const T *__restrict__ dr
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ ds
__global__ void const T *__restrict__ x
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dt
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ w3
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dzt
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dyt
__global__ void const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ dxt
#define NEKO_CHUNKS_CANDIDATES
#define NEKO_EB_CANDIDATES
#define NEKO_EB_SEL(LX, SEL)
#define NEKO_CHUNKS_SEL(LX, SEL)
#define NEKO_TUNE_TIME(T, LAUNCH, LX, C, ITERS)
static int neko_tune_rounds()
#define NEKO_TUNE_LOG(LX, T1, T2)
#define NEKO_TUNE_BEST(T, BEST, N)
static int neko_tune_iters()
static int neko_chunks_env()
static int neko_eb_sweep()
void log_error(char *msg)
void log_message(char *msg)
void log_section(char *msg)
int tune_cdtp(void *dtx, void *x, void *dr, void *ds, void *dt, void *dxt, void *dyt, void *dzt, void *w3, int *nel, int *lx, int *eb_sel, int *ch_sel)
#define CASE_KSTEP_SEL(LX, SEL)
#define CASE_1D_SEL(LX, SEL)
void hip_cdtp(void *dtx, void *x, void *dr, void *ds, void *dt, void *dxt, void *dyt, void *dzt, void *w3, int *nel, int *lx)
#define CASE_KSTEP(LX, C)