skillfed

cufile-python

A basic Python wrapper for the NVidia cuFile API

cufile-python v0.2.0 108.7K downloads/30d#12,547 on PyPI3
Permissive license MIT AGING released

What it is and what it does

cufile-python is a thin Python binding to NVIDIA's cuFile API, which enables direct I/O between storage and GPU memory, bypassing the host CPU and system RAM. The package exposes both a high-level context manager interface (CuFile class) for common read/write operations and low-level bindings for direct libcufile access via ctypes.

The wrapper is minimal with no Python runtime dependencies, making installation straightforward. It targets Linux (POSIX) and supports Python 3.6 and later. Development has slowed—the last commit was 305 days ago—but the repository remains active and not archived. The codebase is small, making stability plausible for its narrow use case.

Use it for:

  • Load large tensors directly into GPU memory from disk in machine learning frameworks without copying through host RAM.
  • Implement high-throughput data pipelines where I/O is a known bottleneck.
  • Access raw GPU memory buffers from files in scientific computing or data-parallel applications.
  • Benchmark GPU-direct storage performance on systems with NVIDIA GPUs and cuFile support.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Python wrapper around the NVIDIA cuFile API to read and write files directly to and from GPU memory without staging through host RAM.

Yes, if you have NVIDIA cuFile installed and need GPU-direct file I/O in Python. The package is lightweight, permissively licensed under MIT, and solves a specific performance problem. No, if you don't have cuFile available on your system or don't need direct GPU storage access. Verify that your NVIDIA driver and cuFile version are compatible before relying on it in production.

Install

cufile-python on PyPI

pip

pip install cufile-python

uv

uv add cufile-python

poetry

poetry add cufile-python

Installing cufile-python

Before you install

Low install friction with a pure Python wheel and no runtime dependencies. Maintenance status is aging—last commit was 305 days ago with minimal repository activity (3 stars), though the repository remains active and not archived.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal legal friction.

Quickstart

pip install cufile-python

from cufile import CuFile
import ctypes

with CuFile("test.bin", "r") as f:
    f.read(ctypes.c_void_p(buffer_ptr), buffer_size)

NVIDIA cuFile library must be installed and available on the system; Linux (POSIX) only; requires Python 3.6 or later.

Verify before relying

  • Whether the underlying NVIDIA cuFile library must be installed separately on the system for this wrapper to function.
  • Whether GPU compute capability or CUDA version constraints exist beyond the Python 3.6+ requirement.
  • Actual test coverage and stability of the wrapper against different cuFile API versions.
  • Performance characteristics and real-world throughput gains compared to standard file I/O.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 305 days since the last release
Last repo commit
First released
Downloads 108,651/month — #12,547 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cufile_python-0.2.0-py3-none-any.whl

Operating System :: POSIX :: LinuxProgramming Language :: Python :: 3

Tags

gpu direct file ionvidia cufile python wrappercuda gpu memory file accessdirect gpu storage read writecuda file operations
gpu-accelerationnvidia-cudahigh-performance-io

More Scientific/Engineering packages