ROCm / HIP-Examples

Examples for HIP
199 stars 90 forks source link

rtm8 example question #16

Closed jinz2014 closed 2 months ago

jinz2014 commented 4 years ago

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 }

ppanchad-amd commented 2 months ago

@jinz2014 Apologies for the lack of response. Closing this ticket since this repository is being replaced by ROCm-examples. Thanks!