General purpose GPU compute framework built on Vulkan to support 1000s of cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends). Blazing fast, mobile-en
General purpose GPU compute framework built on Vulkan to support 1000s of cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends). Blazing fast, mobile-en
KomputeThe general purpose GPU compute framework for cross vendor graphics cards (AMD, Qualcomm, NVIDIA & friends) |
Join the Discord & Community Calls Documentation Blog Post ⌨ Examples
Below you can find a GPU multiplication example using the C++ and Python Kompute interfaces.
You can join the Discord for questions / discussion, open a github issue, or read the documentation.
The C++ interface provides low level access to the native components of Kompute, enabling for advanced optimizations as well as extension of components.
…The Python package provides a high level interactive interface that enables for experimentation whilst ensuring high performance and fast development workflows.
…You are able to try out the interactive Colab Notebooks which allow you to use a free GPU. The available examples are the Python and C++ examples below:
Try the interactive C++ Colab from Blog Post |
Try the interactive Python Colab from Blog Post |
You can also check out the two following talks presented at the FOSDEM 2021 conference.
Both videos have timestamps which will allow you to skip to the most relevant section for you - the intro & motivations for both is almost the same so you can skip to the more specific content.
Watch the video for C++ Enthusiasts |
Watch the video for Python & Machine Learning Enthusiasts |
The core architecture of Kompute includes the following:
To see a full breakdown you can read further in the C++ Class Reference.
| Full Architecture | Simplified Kompute Components |
|---|---|
(very tiny, check the full reference diagram in docs for details) |
Kompute provides flexibility to run operations in an asynrchonous way through vk::Fences. Furthermore, Kompute enables for explicit allocation of queues, which allow for parallel execution of operations across queue families.
The image below provides an intuition on how Kompute Sequences can be allocated to different queues to enable parallel execution based on hardware. You can see the hands on example, as well as the detailed documentation page describing how it would work using an NVIDIA 1650 as an example.
Kompute has been optimized to work in mobile environments. The build system enables for dynamic loading of the Vulkan shared library for Android environments, together with a working Android NDK wrapper for the CPP headers.
|
For a full deep dive you can read the blog post "Supercharging your Mobile Apps with On-Device GPU Accelerated Machine Learning". You can also access the end-to-end example code in the repository, which can be run using android studio. |
Besides the C++ core SDK you can also use the Python package of Kompute, which exposes the same core functionality, and supports interoperability with Python objects like Lists, Numpy Arrays, etc.
The only dependencies are Python 3.5+ and Cmake 3.4.1+. You can install Kompute from the Python pypi package using the following command.
pip install kpYou can also install from master branch using:
pip install git+git://github.com/KomputeProject/kompute.git@masterFor further details you can read the Python Package documentation or the Python Class Reference documentation.
The build system provided uses cmake, which allows for cross platform builds.
The top level Makefile provides a set of optimized configurations for development as well as the docker image build, but you can start a build with the following command:
cmake -BbuildYou also are able to add Kompute in your repo with add_subdirectory - the Android example CMakeLists.txt file shows how this would be done.
For a more advanced overview of the build configuration check out the Build System Deep Dive documentation.
We appreciate PRs and Issues. If you want to contribute try checking the "Good first issue" tag, but even using Kompute and reporting issues is a great contribution!
No open issues yet, or sync has not completed.