-
While doing some basic performance testing I noticed that initialising an Array on the GPU is much faster if you either used arrayfire::info or arrayfire::set_device before. For me using either one decreased the time from about 1.5s to about 350ms. Is this intended, especially for arrayfire::info ? use arrayfire::{Array, Dim4, pow, set_device, info};
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The device warmup does take time depending the backend. How much time should be considered okay really depends on what other processes are running on the system and how long the the corresponding device initialisation takes place. By calling, info or set_device ahead of timing section of code you are taking care of the warmup separately so it doesn't show up later. Basically, init is run by whichever function you call later if it isn't done already. This is not bug. |
Beta Was this translation helpful? Give feedback.
-
Alright thanks for the clarification. |
Beta Was this translation helpful? Give feedback.
The device warmup does take time depending the backend. How much time should be considered okay really depends on what other processes are running on the system and how long the the corresponding device initialisation takes place.
By calling, info or set_device ahead of timing section of code you are taking care of the warmup separately so it doesn't show up later. Basically, init is run by whichever function you call later if it isn't done already.
This is not bug.