Maksim Piriyev
unread,Feb 21, 2025, 8:23:02 AMFeb 21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ArrayFire Users
Trying to measure fft performance with gfor as below
```
const auto n_items = n_frames * FrameItemSize;
auto iq_buf = randu(n_frames, FrameItemSize, c32);
auto result = constant((0, 0), n_frames, FrameItemSize, c32);
eval(iq_buf, result);
af::sync();
for (auto _ : state) {
auto start = timer::start();
gfor(seq i, n_frames) {
result(i) = fft(iq_buf(i));
}
// result(0) = result(0) * 1;
eval(result);
af::sync();
auto time = timer::stop(start);
state.SetIterationTime(time);
}
```
I believe the eval() call does not send it to the GPU
how does one call eval the gfor ?