|
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}; |
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. |
|
Alright thanks for the clarification. |
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.