ymd-h / vulkpy

GPGPU array on Vulkan
https://ymd-h.github.io/vulkpy/
MIT License
11 stars 1 forks source link
gpgpu python vulkan

vulkpy: GPGPU array on Vulkan

GitHub Workflow Status PyPI PyPI - License

vulkpy is a Python package providing GPGPU computation based on Vulkan.

Requirements

On Ubuntu 22.0,

wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add -
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-focal.list http://packages.lunarg.com/vulkan/lunarg-vulkan-focal.list
apt update
apt install -y libvulkan1 libvulkan-dev vulkan-headers shaderc vulkan-validationlayers

Note
vulkan-sdk cannot be installed because it requires obsolete package qt5-default.

Example

import vulkpy as vk

gpu = vk.GPU()

a = vk.Array(gpu, data=[10, 10, 10])
b = vk.Array(gpu, data=[5, 5, 5])

c = a + b
c.wait()

print(c)
# [15, 15, 15]

Features