Registry / data / libkvikio-cu12

libkvikio-cu12

JSON →
library26.6.0pypypi✓ verified 83d ago

KvikIO is a Python and C++ library designed for high-performance file I/O, providing Python and C++ bindings to cuFile, which enables GPUDirect Storage (GDS). As part of the RAPIDS suite, it efficiently handles both host and device (GPU) memory I/O. The library is actively maintained with frequent, typically monthly or bi-monthly, releases aligned with the broader RAPIDS ecosystem. The current version is 26.4.0.

pip install libkvikio-cu12
INSTALL
IMPORT
SIG · LIBKVIKIO-CU12
L
libkvikio-cu12
datapythonv26.6.0
Install
1.8s avg
Import
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v24.10.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.5MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.8s · import 0.000s · 25MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

load
from libkvikio import load
import kvikio
load_library
from libkvikio import load_library
import kvikio

This quickstart demonstrates how to write a CuPy array (GPU memory) to a file and read it back using KvikIO's CuFile API. It mimics Python's built-in `open()` and file operations, but operates on GPU device memory directly, leveraging GPUDirect Storage if available.

import os import cupy from kvikio.cufile import CuFile # Ensure a temporary file path is available file_path = os.environ.get('KVIKIO_TEST_FILE_PATH', '/tmp/kvikio-example-data.bin') # Create a CuPy array on the GPU a = cupy.arange(100, dtype=cupy.int64) print(f"Writing CuPy array to {file_path} using KvikIO...") # Write the array to a file using KvikIO with CuFile(file_path, 'w') as f: f.write(a) print(f"Reading data from {file_path} back into a CuPy array...") # Read data back into a new CuPy array b = cupy.empty_like(a) with CuFile(file_path, 'r') as f: f.read(b) # Verify the data assert cupy.array_equal(a, b) print("Data written and read successfully, and arrays match!") # Clean up the test file if os.path.exists(file_path): os.remove(file_path) print(f"Cleaned up {file_path}")
Debug
Known issues
breakingKvikIO versions 25.12.00 and newer (including 26.x.x) no longer support building or running without a CUDA installation. A working CUDA 12 Toolkit is a hard requirement for `libkvikio-cu12`.
fix
Ensure a compatible NVIDIA GPU and CUDA Toolkit (12.x) are installed and properly configured in your environment.
affects: >=25.12.00
breakingStarting with version 25.10.00, Python nvCOMP bindings and direct Zarr 2 support have been removed. Users relying on these specific features for compression or Zarr 2 may need to adjust their workflows or use older KvikIO versions.
fix
Migrate to Zarr 3 where possible or implement compression/decompression outside of KvikIO. Check the KvikIO documentation for updated Zarr integration patterns.
affects: >=25.10.00
breakingVersion 25.08.00 removed CUDA 11 from its supported dependencies. Users on older CUDA environments (e.g., CUDA 11) must use KvikIO versions prior to 25.08.00 or upgrade their CUDA environment to 12.x.
fix
Upgrade your CUDA installation to version 12.x or downgrade `libkvikio-cu12` to a version compatible with your CUDA environment (e.g., <25.08.00).
affects: >=25.08.00
gotchaFor optimal performance with GPUDirect Storage, I/O operations (reads/writes) should be aligned to a GPU page boundary (typically 4KB). Unaligned operations may still work but KvikIO has to split them, which can reduce performance.
fix
Ensure file offsets and buffer offsets are multiples of 4096 bytes when performing I/O for maximum efficiency. Use `file.align_offset(offset)` if available or manage offsets manually.
affects: All versions
breakingIn version 24.12.00, KvikIO shifted to being built as a shared library and introduced a new 'AUTO' compatibility mode. This may affect linking for C++ users and change default fallback behavior for Python users when GDS is unavailable.
fix
C++ users should adjust their build systems to link against the shared library. Python users experiencing unexpected I/O behavior can explicitly set the `KVIKIO_COMPAT_MODE` environment variable (e.g., `OFF` for enforced cuFile, `ON` for POSIX fallback) to manage compatibility mode.
affects: >=24.12.00
Upgrade
Version history
26.6.0latest on PyPI · released Jun 9, 2026
Audit
Dependencies
cupy-cuda12xrequiredRequired for GPU array operations and integration with KvikIO's device memory handling.
numpyrequiredStandard array library, often used in conjunction with CuPy.
zarroptionalOptional backend for reading and writing Zarr arrays directly to GPU memory.
CUDA Toolkit (12.x)requiredUnderlying NVIDIA CUDA libraries are essential for GPU acceleration and GPUDirect Storage functionality. Not a Python package, but a system dependency.
Agent activity
1 hits · last 30 days
Meta
1
Resources
libkvikio-cu12 — pip install libkvikio-cu12 · libregistry