/pyculib_sorting

Sorting libraries for pyculib

Primary LanguageCudaBSD 2-Clause "Simplified" LicenseBSD-2-Clause

Pyculib_sorting

Pyculib_sorting provides simplified interfaces to CUDA sorting libraries. At present it contains a wrapper around:

  • A radix sort implementation from CUB.
  • A segmented sort implementation from ModernGPU

Pyculib_sorting is predominantly used by Pyculib to provide sorting routines.

Requirements

Pyculib_sorting requires the following programs to build and test:

  • Python
  • NVIDIA's nvcc compiler

and the following Python packages

  • pytest
  • Numba

Obtaining the source code

Pyculib_sorting relies on git submodules to access the CUB and ModernGPU source code, to obtain a code base suitable for building the libraries run:

#> git clone https://github.com/numba/pyculib_sorting.git

#> cd pyculib_sorting

#> git submodule update --init

the URL above may be adjusted to use ssh based git@github.com:numba/pyculib_sorting.git as desired.

Building the libraries

To build the libraries run:

#> python build_sorting_libs.py

Testing

Testing uses pytest and is simply invoked with:

#> pytest

Conda build

To create a conda package of Pyculib_sorting, assuming conda-build is installed, run:

#> conda build condarecipe

from the root directory of Pyculib_sorting.