Code Monkey home page Code Monkey logo

cuda_functions's Introduction

PyPI version Build Status

CUDA functions

This is a collection of python functions written with CUDA, using cuFFT and cuBLAS libraries. The interface with Python is written using the Python C API.

These functions intend to mimic the behavior of numpy functions: fft and correlate using the power of GPU.

Included functions

  1. Fast Fourier transform 1D (Complex-to-complex)
  • cuda_fft (single/double precision Fourier transfom)
  • cuda_ifft (single/double precision inverse Fourier transfom)
  1. Autocorrelation functions (Real-to-real and complex-to-complex)
  • cuda_acorrelate (single/double precision autocorrelation function)

Installation

  1. Requirements
  1. Run setup.py script to compile only (testing)
    python setup.py build_ext --inplace

  2. To install the module on your system use distutils setup.py as usual:
    python setup.py install --user

  3. Now module is available on PyPI
    pip install cuda_functions

  4. Run and check included python scripts as example

Contact info

Abel Carreras
[email protected]

Donostia International Physics Center (DIPC)
Donostia-San Sebastian (Spain)

cuda_functions's People

Contributors

abelcarreras avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cuda_functions's Issues

Future: Implement direct calculation of power spectrum calculation

Use cuFFT (complex -> real) function to calculate the Fourier transform of the autocorrelation function (power spectrum). The autocorrelation is a Hermitian function and therefore its Fourier transform is guaranteed to be real.
A small increase in efficiency is expected.

pip install cuda_functions has problem

when i tried this ' pip install cuda_functions' in my gpu
got error

/usr/local/cuda-9.0/bin/nvcc -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/cuda-9.0/include -I/usr/include/python2.7 -c src/cuFFT.cu -o build/temp.linux-aarch64-2.7/src/cuFFT.o -arch=sm_20 -Ddoubleprecisioncomplex=gpu_fft_dpc --ptxas-options=-v -c --compiler-options '-fPIC'
nvcc fatal : Value 'sm_20' is not defined for option 'gpu-architecture'
error: command '/usr/local/cuda-9.0/bin/nvcc' failed with exit status 1

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.