discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Fw: Re: Problem with volk and fftw memory alignment


From: djch-gnuradio
Subject: [Discuss-gnuradio] Fw: Re: Problem with volk and fftw memory alignment
Date: Mon, 1 Jun 2015 21:07:19 +0100


Forgot to copy this to the list - I think the bug is fixed


Thanks for your help. I'm quite new to contibuting back into git-hosted 
projects, so forgive me if I've got it wrong...

The last commit I pulled from github/gnuradio is 
fb064e3c69cc7618da5c3d9c0dba2fecd84f1323

The place the problem occurs is in fft_filter.cc - line 319 onwards
          gr_complex *a = d_fwdfft->get_outbuf();
          gr_complex *b = d_xformed_taps;
          gr_complex *c = d_invfft->get_inbuf();

          volk_32fc_x2_multiply_32fc_a(c, a, b, d_fftsize);

where we call a volk routine on the outbuf and inbuf of a fft_complex instance

I think the cleanest way is to fix fft.cc to use volk_malloc - I also made it 
use its own alloc routines so there's only one set of calls to volk_malloc(). 
Patch attached

It seems to work - the code that previously sometimes crashed hasn't done yet - 
but that's not quite proof the bug is fixed

Best wishes

--David


On Sat, 30 May 2015 18:34:32 -0400
Tom Rondeau <address@hidden> wrote:


> Yes, this is absolutely a problem with using the fftw_malloc functions.
> Unless told, FFTW doesn't build AVX support, which means that it can return
> vectors that are not AVX-aligned, and the code is calling the _a kernel and
> so requires it to be appropriately aligned.
> 
> Can you change and fftw_malloc'd arrays used in volk calls to volk_malloc
> and a) make sure that works and b) submit a patch with where you're running
> into this? I thought we had fixed these already (also, what version are you
> running?).
> 
> Tom


-- 
 G8SQH
<address@hidden>


-- 
 G8SQH
<address@hidden>

Attachment: fix_fft_alignment
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]