Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

compushady

Latest version: v1.0.0a1

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
PyPI package Publisher: rdeioris
76 Stars
12 Forks
1 Versions
31.1K Downloads
C++ Repo language

Scan summary

compushady was last scanned on 28 Nov 2026 at version 1.0.0a1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 28 Nov 2026.
  • Findings: No rules fired in version 1.0.0a1.
  • Downloads: 31,076 downloads.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.0a1 LATEST 28 Nov 2026 No rules fired

No rules fired in 1.0.0a1

Findings

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.

README

The publisher’s own README, as collected from the registry.

compushady

Run GPU compute shaders (and graphics, mesh and ray tracing pipelines) from Python, Rust or the browser, with a tiny API.

compushadyMandlebrot

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

Features

  • Four GPU backends: d3d12 (Windows), vulkan (Windows, Linux, Android, and macOS through MoltenVK), metal (macOS, iOS) and wgpu (everywhere wgpu runs, plus WebGPU in browsers).
  • Shaders in HLSL, WGSL or GLSL, compiled for the current backend: DXIL, SPIR-V, MSL or WGSL. HLSL goes through Microsoft's DXC, which ships inside the wheels. WGSL and GLSL go through naga, and MSL comes from SPIRV-Cross. You can also hand in precompiled SPIR-V, DXIL or MSL.
  • Resources: buffers (raw, structured and typed), 1D/2D/3D textures with array slices and mip chains, samplers, and explicit memory heaps.
  • Sparse (tiled) resources for virtual texturing and megatextures (D3D12 and Vulkan).
  • Compute pipelines with direct and indirect dispatches and push constants.
  • Graphics pipelines (Rasterizer): vertex/pixel shaders, render targets, depth, wireframe, and indirect draws with GPU-side draw counts.
  • Mesh shaders, with optional amplification shaders, and indirect mesh dispatches (D3D12, Vulkan, Metal 3).
  • Ray tracing (RayTracer, BLAS, TLAS): raygen, miss, closest hit, any hit, intersection (procedural AABBs) and callable shaders.
    • Native on D3D12 (DXR) and Vulkan (VK_KHR_ray_tracing_pipeline).
    • Emulated with inline ray queries on Metal.
    • RayQuery works in compute shaders as well.
  • Bindless resources, in two flavours:
    • per pipeline (bindless=True);
    • an application-owned DescriptorHeap, read through Shader Model 6.6 ResourceDescriptorHeap[i] / SamplerDescriptorHeap[i].
  • Binding resources by name (bindings={"target": texture}), using shader reflection.
  • Asynchronous work: every operation has a *_submit() variant returning a Fence, and an *_async() variant for asyncio.
  • Presentation:
    • swapchains for Win32, X11, Wayland, AppKit/UIKit (Metal layers), Android, and HTML canvases;
    • DRM/KMS to present straight to a display from a Linux console, with no X11 or Wayland.
  • Multithreading: the GIL is released while the GPU works.
  • Python 3.6+, through ctypes: one wheel per platform serves every Python version. No compiler and no numpy needed.
  • Rust crate (compushady) and JavaScript/WebAssembly package (see js/), sharing the same core.
Backend support
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.

Quickstart

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.

Enumerate compute devices
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))
Upload data to a Texture

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)
Reading back from GPU memory to system memory

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))
Your first compute shader

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))

API

This section covers the compushady API in detail, class by class. The examples/ folder has a runnable script for nearly every feature.

Backends and devices

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 build
  • compushady.get_backend(): the backend module in use (.name)
  • compushady.config.set_debug(True): enables the validation layers and prints their messages at exit
compushady.Device

This 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 description
  • backend: the name of the backend driving it
  • dedicated_video_memory: the amount (in bytes) of on-board (GPU) memory
  • dedicated_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 code
  • device_id: an integer representing the device id code
  • is_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 shaders

compushady.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
compushady.Buffer

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 memory
  • HEAP_UPLOAD: system memory optimized for writing
  • HEAP_READBACK: system memory optimized for reading
import 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)
  • Buffers created with HEAP_UPLOAD expose:
    • 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 element
  • Buffers created with HEAP_READBACK expose:
    • readback(size=0, offset=0): returns bytes
    • readback(bytearray_or_memoryview, offset=0): fills an existing buffer
    • readback2d(pitch, width, height, bytes_per_pixel)
  • Every buffer exposes the 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)
compushady.Texture2D

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.

compushady.Texture1D and compushady.Texture3D

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, depth
  • row_pitch: bytes per line in a staging/readback buffer
  • size: the texture's size in bytes in a staging/readback buffer
  • slices: array slices (Texture1D and Texture2D)
  • mips: mip levels
Texture arrays and mips

OX Radar and Response Center

Find 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.

Where it’s listed

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).

  • pypi-releases compushady

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229