Giter Site home page Giter Site logo

cufinufft-bench's Introduction

cuFINUFFT-bench

Benchmarking for cuFINUFFT library

CPU code

GPU code

Installing cuFINUFFT

module load cuda/10.0.130_410.48
module load gcc/7.4.0
make lib

Installing FINUFFT

module load cuda/10.0.130_410.48
module load gcc/7.4.0
make lib

Installing CUNFFT

module load cuda/10.0.130_410.48
module load gcc/7.4.0
cd CUNFFT
cd build/  
make distclean  
cmake .. -DCUT_OFF=3 -DCUNFFT_DOUBLE_PRECISION=OFF -DMILLI_SEC=ON \
         -DMEASURED_TIMES=ON -DCUDA_CUDA_LIBRARY=/usr/lib64/libcuda.so -DPRINT_CONFIG=OFF  
make 
make install

cmake FLAG setting

  • -DCUT_OFF (the spreading width is FILTER_SIZE = (2*CUT_OFF+2), defined in cunfft_typedefs.h)
  • -DCUNFFT_DOUBLE_PRECISION
  • -DMEASURED_TIMES
  • -DCUDA_CUDA_LIBRARY
  • -DMILLI_SEC

Installing gpuNUFFT

Note: gpuNUFFT uses single precision by default.

module load cuda/10.0.130_410.48
module load gcc/7.4.0
module load matlab
cd gpuNUFFT
cd CUDA
mkdir -p build
cd build
cmake .. -DMATLAB_ROOT_DIR=/cm/shared/sw/pkg/vendor/matlab/R2020a
make

Usage

  • [Step 1] Install all the libraries
  • [Step 2] Add shared libraries path to LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/finufft/lib:~/CUNFFT/lib:~/cuFINUFFT/lib
  • [Step 3] Execute python scripts
python nuffttype1.py

Details for different libraries

Type 1 transform: nonuniform pts to uniform pts

  1. FINUFFT/cuFINUFFT:

Input:

  • x: a size M float array of x coordinates of M source points
  • y: a size M float array of y coordinates of M source points
  • z: a size M float array of z coordinates of M source points, or NULL
  • c: a size M complex float array of M strengths
  • eps: relative l2 tolerance, i.e. . The spreading width is -log_10 (eps/10)

Output:

  • f_k: a size N1xN2x...xNd complex float array of N1xN2x...xNd output modes. The modes are ordered from -N/2 to N/2-1 in each dimension and are ordered first in dimension x, then in y and last in z, i.e. in 3D, f_k[k1+k2*N1+k3*N1*N2] approximates .
  1. CUNFFT

Input:

  • x: a size dM float array of coordinates of M source points, the t-th coordinate of the j-th source point is the d*j+t entry of x.
  • c: a complex float array of M strengths

Output:

  • f_k = a size N1xN2x...xNdcomplex float array of N1xN2x...xNd modes. The modes are ordered from -N/2 to N/2-1 in each dimension. Modes are ordered first in dimension z, then in y and last in x, i.e. in 3D, f_k[k_3+k_2*N3+k_1*N3*N2] is the Fourier coefficient approximates .
  1. gpuNUFFT

Input:

  • k: a size d by M float matrix of coordinates of M source points, the t-th coordinate of the j-th source point is the (t,j) entry of k.
  • c: a complex float array of M strengths.

Output:

  • f_k = a size N1 by N2 (by N3) complex float d-dimensional array of N1xN2x...xNd modes. The modes are ordered from -N/2 to N/2-1 in each dimension. f_k(k1, k2, k3) is the Fourier coefficient approximates .

cufinufft-bench's People

Contributors

melodyshih avatar

Stargazers

Alex Barnett avatar  avatar  avatar Leighton W. Wilson avatar

Watchers

James Cloos avatar  avatar

Forkers

zoonono denisa-c

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.