v0.2
Pre-release
Pre-release
bnmf-algs v0.2
In this release we make major changes to library layout. In addition, parallel and much more efficient implementations of certain BLD algorithms and functions are provided.
Highlights
- OpenMP and CUDA support on certain algorithms. When possible, parallelizations are performed by using Eigen devices. In other cases, parallel implementations are written manually. All the CUDA kernel sources are in cuda_src directory.
- Time complexity of sampling a matrix without replacement is decreased from O(sum x MN) to O(sum x log(MN)) using a heap-based systematic sampling technique with beta-sampled intervals where (M, N) is the shape of the matrix. This makes all the sampling-based BLD algorithms (seq_greedy_bld, collapsed_gibbs, collapsed_icm) much faster.
- An approximation to digamma function using its Taylor Expansion that runs twice as fast as GSL implementation and provides 10 digits of precision up to 1e-5 and much higher precision for inputs greater than 1.
- bnmf-algs is now header-only except CUDA and benchmark parts. This allows the library to be used with arbitrary floating-point types instead of enforcing the double type as matrix elements. Additionally, this makes using the library in other projects simpler. One needs to add the library path to include directories and link the project against GSL to build the library (if not using CUDA)
- Two example projects are provided. These example projects demonstrate how to build the library with/without CUDA support.
- A new CUDA implementation of bld_mult algorithm called bld_mult_cuda is provided. All the O(N^3) operations are performed on the GPU where faster O(N^2) updates are performed on the CPU. Additionally, CPU and GPU updates are interleaved, i.e. they update the matrices/tensors at the same time. This version provides a near 20% speed-up on a GeForce GT550M which is a very old and slow GPU.
- A CUDA implementation of summing a tensor along its axes in cuda::tensor_sums. Since this operation is used by many BLD algorihtms, performing it on the GPU may help many of the upcoming CUDA BLD implementations.
- CUDA memory helper classes that simplify CUDA copying and memory operations. These classes and functions provide the infrastructure to implement CUDA-based algorithms more easily and will be used in the upcoming CUDA BLD implementations.
Testing
- Since we can't use GPUs on Travis, CUDA implementations are tested only locally.
- All the OpenMP implementations are tested on Travis.