Skip to content

Legendre transforms#4

Merged
dagss merged 5 commits intomasterfrom
legtrans
Apr 24, 2015
Merged

Legendre transforms#4
dagss merged 5 commits intomasterfrom
legtrans

Conversation

@dagss
Copy link
Copy Markdown
Collaborator

@dagss dagss commented Apr 22, 2015

Legendre transforms copied from the Commander 2 project, then modified to use Libsharp's vecsupport.h.

I've added some extra functions in vecsupport, in particular loadu for vector loads, and single precision versions of the functions I needed.

The Makefile now depends on md5sum and cut to verify that legendre_transform.c.in hasn't changed. If it does change, a Python installation with Jinja is needed to build.

I've also added a very small Python wrapper for Legendre transforms, which I used to write the test suite. Like the Fortran wrapper it doesn't affect the rest, just lies there, except make pytest will build it and run tests.

It's tested on VLEN=1,2,4 and USE_FMA=0,1. It is not tested on MIC. Currently building on MIC will fail; we could change this to exclude the Legendre transforms, or Martin tests this on MIC..

There's three new compilation flags:

  • -DVLEN=2: Override detection by defining a vector length (in order to test VLEN 2 and 1 on an AVX machine)
  • -DUSE_FMA4=0 To turn off FMA4 on a machine supporting it
  • -DNO_LEGENDRE=1 To turn off Legendre transforms. This is currently needed to build on MIC until the feature is tested...
  • -DSHARP_LEGENDRE_CS=4 How many vectors to put in CPU pipeline at the time; I once benchmarked 4 to be best and simply default to this rather than tune for now.

Tested cases:

  • VLEN=1
  • VLEN=2
  • VLEN=4 with FMA
  • [x ] VLEN=4 without FMA
  • VLEN=8

To test

make && make pytest

@dagss dagss force-pushed the legtrans branch 3 times, most recently from 44b1a19 to 85d17e1 Compare April 23, 2015 13:04
vbroadcast didn't work properly for some reason, vload does..
dagss pushed a commit that referenced this pull request Apr 24, 2015
@dagss dagss merged commit bd52e32 into master Apr 24, 2015
@dagss dagss deleted the legtrans branch April 24, 2015 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant