Is it possible to vary the tile size during execution?

Greetings!
Is it possible to somehow vary the tile size of the tile clause during runtime?
E.g.:

for(time = 0; time < timeMax; time++){
  #pragma acc parallel loop tile(tl1, tl2) present(arrA, arrB)
  for(int x = 0; x < SIZE; x++){
      for(int y = 0; y < SIZE; y++){
               //Some work   
      }
  }
   //Compute new tl1 and tl2 values for the next timestep
   tl1 = ...
   tl2 = ...

}

I initially thought this would throw an error since tl1 and tl2 are not constants, but instead the code compiled and ran smoothly. OpenACC seems to have ignored the tile clause and executed as if the tile was not being used (using Nvidia HPC 21.5).

Hi Gabriel,

Is it possible to somehow vary the tile size of the tile clause during runtime?

No, the tile size must be either a constant positive integer or an asterisk (where the compiler decides the tile size).

See section 2.9.8 of the OpenACC Standard: https://www.openacc.org/sites/default/files/inline-images/Specification/OpenACC-3.3-final.pdf

-Mat

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.