Skip to main content

cufile-python

A basic Python wrapper for the NVidia cuFile API

Installation

pip install cufile-python

Usage

Basic usage with the CuFile context manager:

from cufile import CuFile
import torch
import ctypes

# allocate an empty buffer in VRAM
t = torch.empty((1024, 1024, 16), dtype=torch.float32, device="cuda")
with CuFile("test.bin", "r") as f:
    f.read(ctypes.c_void_p(t.data_ptr()), t.nbytes)

Alternatively one could import cufile.bindings and use it as if calling libcufile from C++.

Development

To set up the development environment:

  1. Clone the repository:
git clone https://github.com/yanok/cufile-python.git
cd cufile-python
  1. Install development dependencies:
pip install -r requirements.txt
  1. Run tests:
python -m pytest tests/

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for cufile-python 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cufile-python 0.2.0
File Size Uploaded Provenance Actions
cufile_python-0.2.0.tar.gz 4.4 kB Without provenance Details for cufile_python-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cufile-python 0.2.0
File Interpreter ABI Platform Actions
cufile_python-0.2.0-py3-none-any.whl Python 3 none any Details for cufile_python-0.2.0-py3-none-any.whl

Total release size: 9.7 kB

Release files / cufile_python-0.2.0.tar.gz

Download URL cufile_python-0.2.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
13455ff4df789ce623ced2cffb3c84671a47c99fd9ee737399e524a3d0aeb3f3
BLAKE2b-256 checksum
How to use checksums
b86fd2db22da38c41c3e37e12b2ed2edd251bd20f5d861f50cb39e70524b98b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / cufile_python-0.2.0-py3-none-any.whl

Download URL cufile_python-0.2.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f19a67b32f11ffdde35d0a62f44ca196f51463a106dd54b30e1f4c5c4577cb19
BLAKE2b-256 checksum
How to use checksums
99ce14f95b3176ef603921e0583c72f6d909c75a7b2cce34b4918ef05d633af0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for cufile-python 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page