Skip to content

GPU acceleration for sparse block matrix operations.

License

Notifications You must be signed in to change notification settings

sfu-rsl/compute-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compute Engine

This is a work-in-progress library which implements sparse matrix-matrix and matrix-vector operations to compute the Schur complement for visual and visual-inertial bundle adjustment using Vulkan compute shaders. Please see the main project or our paper for more information.

Note: Please see this branch for the experimental SYCL backend.

Hardware Requirements

  • A GPU which supports Vulkan 1.2 and double-precision floats in shaders

Building

Dependencies:

  • Vulkan 1.2 (may require Vulkan 1.3 SDK/headers)
  • Modified Kompute Library (submodule)
  • Eigen 3.1
  • Google Test
  • Google Benchmark
  • robin_hood unordered_map (included)
  • glslangValidator (needs to support --target-env vulkan1.1 flag)
    • This is available from the Ubuntu vulkan-tools package or can also be built manually for a more up-to-date version.
  • Python 3
# Clone
git clone https://github.com/sfu-rsl/compute-engine.git --recursive

# After cloning
mkdir build
cd build

# Build
cmake /path/to/repo
make -j

# Run tests
./tests

Locking the GPU Frequencies

GPU frequency scaling may affect the performance, especially for small workloads. For NVIDIA GPUs on Linux, the following commands can be used to lock the frequencies, but be sure to check for specific instructions for your OS, GPU, and driver version.

# Setting PowerMizer mode to prefer maximum performance
nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=1"


# Enable persistent mode
sudo nvidia-smi -pm 1 

# Query clocks
nvidia-smi -q -d SUPPORTED_CLOCKS

# Set clocks to max supported
sudo nvidia-smi -lgc <max graphics clock>
sudo nvidia-smi -lmc <max memory clock>


# To reset once done
sudo nvidia-smi -rgc
sudo nvidia-smi -rmc

Examples

Please see the tests for example usage.

About

GPU acceleration for sparse block matrix operations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published