A basic Python wrapper for the NVidia cuFile API
Project description
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:
- Clone the repository:
git clone https://github.com/yanok/cufile-python.git
cd cufile-python
- Install development dependencies:
pip install -r requirements.txt
- Run tests:
python -m pytest tests/
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cufile_python-0.2.0.tar.gz.
File metadata
- Download URL: cufile_python-0.2.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13455ff4df789ce623ced2cffb3c84671a47c99fd9ee737399e524a3d0aeb3f3
|
|
| MD5 |
e14005c6e67583654de2e03b3545f646
|
|
| BLAKE2b-256 |
b86fd2db22da38c41c3e37e12b2ed2edd251bd20f5d861f50cb39e70524b98b8
|
File details
Details for the file cufile_python-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cufile_python-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f19a67b32f11ffdde35d0a62f44ca196f51463a106dd54b30e1f4c5c4577cb19
|
|
| MD5 |
8ac00a7132b761a5ea304beea787d73a
|
|
| BLAKE2b-256 |
99ce14f95b3176ef603921e0583c72f6d909c75a7b2cce34b4918ef05d633af0
|