NVIDIA cuFile

1.17.0.44 · active · verified Thu Apr 09

The `nvidia-cufile` package distributes the NVIDIA GPUDirect Storage (GDS) C libraries (`libcufile`), which enable direct data transfer between storage and GPU memory. It is a foundational component for GPU-accelerated I/O, typically consumed by higher-level Python bindings like `pygds` or other GPU-aware data libraries. As of version 1.17.0.44, it primarily serves as a backend dependency, providing the necessary low-level C components.

Warnings

Install

Imports

Quickstart

The `nvidia-cufile` package primarily provides the underlying `libcufile` libraries. To interact with GPUDirect Storage from Python, you typically use a binding library like `pygds`. This quickstart demonstrates `pygds` initialization, which implicitly relies on `nvidia-cufile` being installed and properly configured on the system.

import pygds

# The 'nvidia-cufile' package itself doesn't offer a direct Python API.
# It provides the underlying C libraries for GPUDirect Storage.
# Python bindings like 'pygds' utilize these libraries.

try:
    # Initialize GPUDirect Storage through its Python bindings
    pygds.init()
    print(f"GPUDirect Storage (via pygds) initialized successfully.")
    print(f"Is GPUDirect Storage enabled: {pygds.is_enabled()}")
    print(f"Is GPUDirect Storage initialized: {pygds.is_initialized()}")
    
    # To actually perform I/O, you would use functions like pygds.open
    # on a GDS-enabled file system.
    print("\n`nvidia-cufile` is installed as the backend for `pygds`.")
    print("For actual GPUDirect Storage file operations, refer to `pygds` documentation.")
except ImportError:
    print("Error: `pygds` not found. Install it with `pip install pygds` "
          "to use the `nvidia-cufile` backend.")
except Exception as e:
    print(f"An error occurred during pygds initialization: {e}")

view raw JSON →