Registry / data / cufile-python

cufile-python

JSON →
library0.2.0pypypiunverified

cufile-python is a basic Python wrapper for the NVIDIA cuFile API, enabling Python programs to leverage GPUDirect Storage for high-performance I/O directly from GPU memory. The current version is 0.2.0. The project appears to be unmaintained, with its last release in 2021, meaning new features or bug fixes are unlikely.

pip install cufile-python
INSTALL
IMPORT
SIG · CUFILE-PYTHON
C
cufile-python
datapythonv0.2.0
Install
1.7s avg
Import
—
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.2.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.10–3.915 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.10–3.915 runs
installs and imports cleanly · install 1.7s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

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

cufile
✓ import cufile
✗ import cufile

This quickstart demonstrates the essential steps for interacting with cufile-python: initializing the driver, opening a file with a cuFile descriptor, and deinitializing. It highlights the use of `cufile.lib.cuFileDriver` and the requirement for `bytes` filenames. Actual GPU-direct I/O operations involving data transfer are more complex and would typically follow this setup.

import cufile.lib as lib import os # --- Prerequisites: NVIDIA GPU, CUDA Toolkit, and cuFile library must be installed --- # This example assumes cuFile is correctly set up and discoverable in the system's library path. # Ensure a dummy file exists for I/O operations filename = "/tmp/test_cufile.txt" with open(filename, "w") as f: f.write("Hello, cuFile GPU-Direct Storage!") try: # Initialize cuFile library lib.cuFileDriver.init() print("cuFile driver initialized successfully.") # Open file with cuFile. Note: Filename must be encoded to bytes. # os.O_RDWR is a standard file access flag. fd = lib.cuFileDriver.open(filename.encode('utf-8'), os.O_RDWR) print(f"Opened file '{filename}' with cuFile descriptor: {fd}") # In a real application, you would now perform GPU-direct I/O operations # using this file descriptor and GPU memory buffers. # For this quickstart, we just demonstrate the basic open/close workflow. # Close file lib.cuFileDriver.close(fd) print(f"Closed cuFile descriptor: {fd}") except RuntimeError as e: print(f"Error during cuFile operation: {e}\n") print("HINT: Ensure NVIDIA cuFile library is correctly installed, and your GPU is configured.") except Exception as e: print(f"An unexpected error occurred: {e}") finally: # Deinitialize cuFile library try: lib.cuFileDriver.fini() print("cuFile driver deinitialized.") except Exception as e: # Fini might fail if init failed or was never called successfully print(f"Warning: Error during cuFile deinitialization: {e}") # Clean up the dummy file if os.path.exists(filename): os.remove(filename) print(f"Cleaned up temporary file: {filename}")
Debug
Known issues
gotchaThis library is a Python wrapper for the NVIDIA cuFile C library. It absolutely requires an NVIDIA GPU, a compatible CUDA Toolkit installation, and the cuFile library components to be correctly installed and configured on the system. Installing `cufile-python` via pip alone is insufficient for functionality.
fix
Verify that your system meets all NVIDIA hardware and software prerequisites for cuFile (GPU, NVIDIA drivers, CUDA Toolkit, cuFile library) and that the cuFile library is discoverable by the Python wrapper (e.g., via `LD_LIBRARY_PATH` on Linux).
affects: 0.1.0, 0.2.0
deprecatedThe cufile-python project appears to be unmaintained. The last commit and PyPI release were in October 2021. Users should be aware that there is no active development, bug fixes, or official support, which introduces risks for long-term projects or compatibility with newer CUDA/Python versions.
fix
Evaluate the long-term implications before integrating this library into critical projects. Consider if its current functionality is sufficient without requiring future updates or support, or explore alternative GPU-accelerated I/O solutions.
affects: All versions (0.1.0, 0.2.0)
gotchaMany low-level functions within cufile-python that accept file paths or data buffers expect them to be `bytes` objects, not standard Python `str`. Providing `str` directly will result in a `TypeError`.
fix
Always encode string paths and data to bytes (e.g., `filename.encode('utf-8')`) before passing them to cuFile functions like `cuFileDriver.open` or `cuFileDriver.read`.
affects: 0.1.0, 0.2.0
Upgrade
Version history
0.2.0latest on PyPI · released Oct 13, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
32
OpenAI (training)
1
Resources
cufile-python — pip install cufile-python · libregistry