eval() for gfor possible ?

19 views
Skip to first unread message

Maksim Piriyev

unread,
Feb 21, 2025, 8:23:02 AMFeb 21
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 ?
Reply all
Reply to author
Forward
0 new messages