In the RTM8 example, is it right that dim3(gridSize) should be something like dim3(nx, ny, nz) ?
In addition, is the function indexTo1D implemented incorrectly ?
Thanks
int gridSize = 256x256;
int groupSize = 256;
for (int t = 0; t < nt; t++) {
//Launch the HIP kernel
hipLaunchKernelGGL(rtm8, dim3(gridSize), dim3(groupSize), 0, 0, (float)vsq_d, (float)current_s_d, (
float)next_s_d, (float)current_r_d,(float)next_r_d, (float)image_d, (float*)a_d, ArraySize);
inline int indexTo1D(int x, int y, int z){
return x + y ny + z ny nz; // should be x + y nx + z ny nx
}
In the RTM8 example, is it right that dim3(gridSize) should be something like dim3(nx, ny, nz) ?
In addition, is the function indexTo1D implemented incorrectly ?
Thanks
int gridSize = 256x256; int groupSize = 256; for (int t = 0; t < nt; t++) { //Launch the HIP kernel hipLaunchKernelGGL(rtm8, dim3(gridSize), dim3(groupSize), 0, 0, (float)vsq_d, (float)current_s_d, ( float)next_s_d, (float)current_r_d,(float)next_r_d, (float)image_d, (float*)a_d, ArraySize);
inline int indexTo1D(int x, int y, int z){
return x + y ny + z ny nz; // should be x + y nx + z ny nx }