Scan your whole stack
From OX Research Newsroom
Are you using compushady?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.0.0a1
compushady was last scanned on 28 Nov 2026 at version 1.0.0a1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.0.0a1 LATEST | 28 Nov 2026 | No rules fired |
Findings for v1.0.0a1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.0.0a1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Run GPU compute shaders (and graphics, mesh and ray tracing pipelines) from Python, Rust or the browser, with a tiny API.

The Mandelbrot animated gif above has been generated by compushady itself: examples/mandlebrot_gif.py. If you are looking for something cool, try this naive pong implementation: examples/pong.py.
Join the Discord server for support: https://discord.gg/2WvdpkYXHW
Consider sponsoring the project by becoming a patron: https://www.patreon.com/rdeioris
d3d12 (Windows), vulkan (Windows, Linux, Android, and macOS through
MoltenVK), metal (macOS, iOS) and wgpu (everywhere wgpu runs, plus WebGPU in browsers).Rasterizer): vertex/pixel shaders, render targets, depth, wireframe,
and indirect draws with GPU-side draw counts.RayTracer, BLAS, TLAS): raygen, miss, closest hit, any hit,
intersection (procedural AABBs) and callable shaders.VK_KHR_ray_tracing_pipeline).RayQuery works in compute shaders as well.bindless=True);DescriptorHeap, read through Shader Model 6.6
ResourceDescriptorHeap[i] / SamplerDescriptorHeap[i].bindings={"target": texture}), using shader reflection.*_submit() variant returning a Fence, and an
*_async() variant for asyncio.compushady) and JavaScript/WebAssembly package (see js/),
sharing the same core.| Feature | d3d12 | vulkan | metal | wgpu |
|---|---|---|---|---|
| Compute, textures, samplers, swapchain | ✅ | ✅ | ✅ | ✅ |
Typed buffers (Buffer<float4>) |
✅ | ✅ | ✅ | ✅ (emulated) |
| Heaps | ✅ | ✅ | ✅ | ❌ |
| Sparse (tiled) resources | ✅ | ✅ | ❌ | ❌ |
| Push constants | ✅ | ✅ | ✅ | ✅ (if the adapter has them; not in browsers) |
| Rasterizer | ✅ | ✅ | ✅ | ✅ |
| Indirect draws / dispatches | ✅ | ✅ | ✅ | ✅ |
GPU draw counts (count_buffer) |
✅ | ✅ (VK_KHR_draw_indirect_count) |
❌ | ❌ |
| Mesh and amplification shaders | ✅ (tier 1) | ✅ (VK_EXT_mesh_shader) |
✅ (Metal 3) | ❌ |
| Ray tracing pipelines | ✅ (DXR 1.1) | ✅ | ✅ (emulated) | ❌ |
| Per-pipeline bindless | ✅ | ✅ | ✅ | ❌ |
DescriptorHeap (SM 6.6) |
✅ (binding tier 3) | ✅ (VK_EXT_mutable_descriptor_type) |
✅ (tier 2 argument buffers) | ❌ |
| KMS presentation | ❌ | ✅ (Linux) | ❌ | ❌ |
When a device lacks a feature, compushady raises an error that names the missing feature. It
never fails silently. MoltenVK does not support mutable descriptors, so on macOS bindless needs
the metal backend.
pip install compushady
Wheels are available for Windows x64, Linux x86_64 (manylinux_2_28) and macOS 11+ (universal2: Apple Silicon and Intel). They include the native library and DXC. On other platforms pip builds from source, which needs a Rust toolchain (1.88 or newer). You obviously also need a system with at least one GPU.
import compushady
print(compushady.available_backends()) # e.g. ['d3d12', 'vulkan', 'wgpu']
for device in compushady.get_discovered_devices():
name = device.name
video_memory_in_mb = device.dedicated_video_memory // 1024 // 1024
print('Name: {0} Dedicated Memory: {1} MB'.format(name, video_memory_in_mb))
A Texture is an object available in GPU memory. To upload data into it you need a so-called "staging buffer": a block of system RAM that the GPU can map. The GPU copies the data from that buffer into the texture's memory.
To sum up: to upload data to the GPU, you first write it into a mapped memory area in RAM (a buffer), and then ask the GPU to copy it into its own memory. (This obviously assumes a discrete GPU with on-board memory.)
from compushady import Buffer, Texture2D, HEAP_UPLOAD
from compushady.formats import R8G8B8A8_UINT
# creates a 8x8 texture in GPU with the classic RGBA 8 bit format
texture = Texture2D(8, 8, R8G8B8A8_UINT)
# creates a staging buffer with the right size and in memory optimized for uploading data
staging_buffer = Buffer(texture.size, HEAP_UPLOAD)
# upload a bunch of pixels data into the staging_buffer
staging_buffer.upload(b'\xff\x00\x00\xff') # first pixel as red
# copy from the staging_buffer to the texture
staging_buffer.copy_to(texture)
Now that your data is in GPU memory, you can manipulate it with a compute shader. Before we get to that, let's see how to copy data back from texture memory to system RAM. We need a buffer again, a readback one this time:
from compushady import HEAP_READBACK, Buffer, Texture2D, HEAP_UPLOAD
from compushady.formats import R8G8B8A8_UINT
texture = Texture2D(8, 8, R8G8B8A8_UINT)
staging_buffer = Buffer(texture.size, HEAP_UPLOAD)
staging_buffer.upload(b'\xff\x00\x00\xff') # first pixel as red
staging_buffer.copy_to(texture)
# do something with the texture...
# prepare the readback buffer
readback_buffer = Buffer(texture.size, HEAP_READBACK)
# copy from texture to the readback buffer
texture.copy_to(readback_buffer)
# get the data as a python bytes object (just the first 4 bytes)
print(readback_buffer.readback(4))
We are going to run code on the GPU! We will start with simple logic: swap the red channel with the green one. To do this we write an HLSL shader that takes our texture as an input/output object:
from compushady import HEAP_READBACK, Buffer, Texture2D, HEAP_UPLOAD, Compute
from compushady.formats import R8G8B8A8_UINT
from compushady.shaders import hlsl
texture = Texture2D(8, 8, R8G8B8A8_UINT)
staging_buffer = Buffer(texture.size, HEAP_UPLOAD)
staging_buffer.upload(b'\xff\x00\x00\xff') # first pixel as red
staging_buffer.copy_to(texture)
shader = """
RWTexture2D<uint4> texture : register(u0);
[numthreads(2, 2, 1)]
void main(int3 tid : SV_DispatchThreadID)
{
uint4 color = texture[tid.xy];
uint red = color.r;
color.r = color.g;
color.g = red;
texture[tid.xy] = color;
}
"""
compute = Compute(hlsl.compile(shader), uav=[texture])
compute.dispatch(texture.width // 2, texture.height // 2, 1)
readback_buffer = Buffer(texture.size, HEAP_READBACK)
texture.copy_to(readback_buffer)
# get the data as a python bytes object (just the first 8 bytes)
print(readback_buffer.readback(8))
This section covers the compushady API in detail, class by class. The examples/ folder has a runnable script for nearly every feature.
The backend is chosen at import time: the platform default (d3d12 on Windows, metal on macOS,
vulkan elsewhere), or the one set in the COMPUSHADY_BACKEND environment variable or with
compushady.config.set_backend(name) before the first resource is created.
COMPUSHADY_BACKEND=wgpu python3 your_gpu_app.py
compushady.available_backends(): the backends compiled into this buildcompushady.get_backend(): the backend module in use (.name)compushady.config.set_debug(True): enables the validation layers and prints their messages
at exitThis class represents a compute device (generally a GPU) on your system.
A system can have multiple devices. By default compushady picks a hardware device, preferring
discrete GPUs and then the one with the most dedicated memory. You are free to pass a specific
device= whenever you create a resource or a pipeline.
You can get the list of devices with compushady.get_discovered_devices(), or retrieve the
current "best" one with compushady.get_best_device().
A compushady.Device object has the following fields:
name: a string with the device descriptionbackend: the name of the backend driving itdedicated_video_memory: the amount (in bytes) of on-board (GPU) memorydedicated_system_memory: the amount of system memory the OS has dedicated to the GPU (generally meaningful only on Windows)shared_system_memory: the amount of system memory usable by the device (GPU)vendor_id: an integer representing the vendor id codedevice_id: an integer representing the device id codeis_hardware: True if it is a hardware device (not an emulated one)is_discrete: True if it is a discrete adapter (a dedicated GPU)mesh_shader_limits: the mesh pipeline limits, or None when the device has no mesh shaderscompushady.get_current_device() returns the GPU device currently in use. You can switch it
with compushady.set_current_device(index), where index is the position of one of the
elements returned by compushady.get_discovered_devices(). You can also choose the device from
the command line with the COMPUSHADY_DEVICE environment variable:
COMPUSHADY_DEVICE=2 python3 your_gpu_app.py
This class represents a resource accessible by the GPU, living in system RAM or in dedicated GPU memory. Buffers are generic blobs of data: plain storage for your shaders, or staging/readback buffers when dealing with textures.
When you create a Buffer you specify its size in bytes and, optionally, the type of memory it uses:
HEAP_DEFAULT: GPU memoryHEAP_UPLOAD: system memory optimized for writingHEAP_READBACK: system memory optimized for readingimport compushady
buffer_in_gpu = compushady.Buffer(64)
buffer_in_gpu2 = compushady.Buffer(128, compushady.HEAP_DEFAULT)
staging_buffer = compushady.Buffer(64, compushady.HEAP_UPLOAD)
readback_buffer = compushady.Buffer(256, compushady.HEAP_READBACK)
upload(data, offset=0)upload2d(data, pitch, width, height, bytes_per_pixel)upload_chunked(data, stride, filler): appends filler after every stride bytes of
data, for example to pad float3 arrays to 16 bytes per elementreadback(size=0, offset=0): returns bytesreadback(bytearray_or_memoryview, offset=0): fills an existing bufferreadback2d(pitch, width, height, bytes_per_pixel)size property, returning its size in bytes.Buffers can also be structured or formatted (typed):
struct Data
{
uint field0;
float field1;
};
RWStructuredBuffer<Data> buffer: register(u0);
[numthreads(1, 1, 1)]
void main()
{
buffer[0].field0 = 1;
buffer[0].field1 = 2.0;
buffer[1].field0 = 4;
buffer[1].field1 = 4.0;
}
You create a "structured" buffer by passing the stride option with the size of the structure:
# will create a buffer of 16 bytes, divided in two structures of 8 bytes each (the struct Data)
structured_buffer = Buffer(size=16, stride=8)
Or you can use a typed buffer:
RWBuffer<float4> buffer: register(u0);
[numthreads(1, 1, 1)]
void main()
{
buffer[0] = float4(1, 2, 3, 4);
buffer[1] = float4(5, 6, 7, 8);
}
For which you specify the format parameter:
# will create a buffer of 32 bytes, divided in two 16 bytes blocks, each one representing 4 32bits float values
typed_buffer = Buffer(size=32, format=compushady.formats.R32G32B32A32_FLOAT)
A Texture2D object is a two-dimensional (width and height) texture living in GPU memory. You can read and write it from your shaders, render to it, or present it to a Swapchain. To create a Texture2D object you specify its width, height and pixel format:
from compushady import Texture2D
from compushady.formats import R8G8B8A8_UINT
texture = Texture2D(1024, 1024, R8G8B8A8_UINT)
Texture memory is always on the GPU, so whenever your program needs to read or write a texture's texel data, you need a staging or a readback buffer.
They work exactly like Texture2D. Texture1D is one-dimensional (height=1). Texture3D is three-dimensional: think of it as a stack of slices, each one a two-dimensional texture. For Texture3D you pass an additional parameter, the depth, which is the number of slices:
from compushady import Texture3D
from compushady.formats import R8G8B8A8_UINT
texture = Texture3D(1024, 1024, 4, R8G8B8A8_UINT) # you can see it as 4 1024x1024 textures
All the texture types expose the following properties:
width, height, depthrow_pitch: bytes per line in a staging/readback buffersize: the texture's size in bytes in a staging/readback bufferslices: array slices (Texture1D and Texture2D)mips: mip levelsFind threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.