discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] What's VOLK (and why is it cool that we got it)? (was


From: CEL
Subject: [Discuss-gnuradio] What's VOLK (and why is it cool that we got it)? (was: VOLK v1.3.1 and v1.4)
Date: Tue, 27 Mar 2018 08:15:40 +0000

It's worth noting that Nathan really did wonders here to make these
releases possible on short notice – so, this is a big "thank you" in
his direction.

I think once in a while it's worth introducing the fauna of our SDR
ecosystem:

VOLK is the "Vector Optimized Library of Kernels"[1].
GNU Radio has a lot of blocks that do math on a lot of data at once –
and it's generally a good idea to accelerate that by employing the
ability of modern CPUs to do SIMD – Single Instruction, Multiple Data. 

For example, you can add two streams of numbers simply by adding them
in a for loop, and compile that for loop into valid i386 assembler.
That would work on any PC that could possibly run a Windows or Linux
for x86, and it would get two numbers from RAM into registers, add
them, write the result from a register into RAM, get the next two
numbers, rinse, repeat.

SIMD instructions give processors the ability to be told things like
"here's four floating point numbers in memory, load them into a four-
float-register" and "here's two four-float-registers, add all four
pairs of floats". That often speeds up computation significantly. We
have these for MMX, S[S]SE{2,3,4,4.2}, AVX, NEON…

Of course, things like addition were the very first ones to be
accelerated by hand-coding them for the different SIMD instruction set
extensions. On the other hand, loops like 

for(unsigned i = 0; i < len; ++i) {
   a[i] += b[i]
}

are easy for compilers to optimize themselves. Thus, current VOLK
kernels can be dauntingly complex. One of these is the polarbutterfly
kernel – it's a core component for the Polar codes of rate-achieving
fame, implemented by Johannes Demel. Sadly, fixing a bug in that
required a release 1.4 in the end – which really put Nathan to work to
gather all goodness and bring it into releasable shape in fantastic
time.

So, if you're doing things with a lot of data, linear in RAM – take a
look at the VOLK project and its many existing kernels. We've got basic
arithmetics, trigonometrics, fast exp and logs, converters, byte
shufflers, detectors and bit-wise ops, and quite a bit more in stock
for the OP/s-hungry programmer[2].

Hope this inspires some appetite to make use of hand-optimized code, or
 to try one's own hand to use VOLK's infrastructure for selecting the
appropriate implementation on each machine.

Best regards,
Marcus


[1] http://libvolk.org
[2] http://libvolk.org/doxygen/kernels.html
On Mon, 2018-03-26 at 21:05 -0400, West, Nathan wrote:
> Hi all,
> 
> After a long time, new Volk releases are out. Release notes and downloads are 
> in the normal places on libvolk.org with md5sums and signatures signed by me 
> (address@hidden).
> 
> v1.3.1 is a support release with bug fixes. I've switched to the "merge back" 
> model for this release where everything goes in to master and I cherry-pick 
> commits back to a support branch. I think this makes it easier to keep all of 
> the changes in one place-- but I'd like to know what kind of support users 
> would like. If you care about stable APIs for a long time I'd like to hear 
> about it so that I can develop a sense of how long or how many "stable" 
> branches I should keep around.
> 
> v1.4 has a ton of new stuff... It builds with python3, has new kernels, new 
> protokernels with lots of AVX support, and some added NEON support. I'm 
> pretty excited about this release since it adds a good bit of fast code!
> 
> Call for development:
> v1.5 is not out yet (or started), but I imagine that it will add support for 
> AVX512 and purge boost (that might make it in to a v1.4.1) as a dependency 
> and maybe replace some verbose support code with c++11. Right now there are 2 
> remaining lines that require boost. If you care about that kind of thing 
> check out the boost::filesystem use in volk_profile. I have heard of someone 
> adding AVX512 support, but I don't have a machine that supports it-- continue 
> down that path if you have a machine with support!
> 
> Cheers,
> Nathan
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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