{"id":1591,"library":"nvidia-cufile","title":"NVIDIA cuFile","description":"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.","status":"active","version":"1.17.0.44","language":"en","source_language":"en","source_url":"https://docs.nvidia.com/gpudirect-storage/","tags":["GPU","storage","I/O","CUDA","NVIDIA","GPUDirect","system-library"],"install":[{"cmd":"pip install nvidia-cufile","lang":"bash","label":"Install `nvidia-cufile`"},{"cmd":"pip install pygds # This will install nvidia-cufile as a dependency","lang":"bash","label":"Install `pygds` (includes `nvidia-cufile`)"}],"dependencies":[],"imports":[{"note":"The `nvidia-cufile` package provides `libcufile` shared libraries and headers. It does not expose a direct Python module for user-level imports. Python applications interact with these libraries via dedicated bindings like `pygds`.","symbol":"No direct Python API","correct":"This package distributes C libraries; use `pygds` for Python bindings."}],"quickstart":{"code":"import pygds\n\n# The 'nvidia-cufile' package itself doesn't offer a direct Python API.\n# It provides the underlying C libraries for GPUDirect Storage.\n# Python bindings like 'pygds' utilize these libraries.\n\ntry:\n    # Initialize GPUDirect Storage through its Python bindings\n    pygds.init()\n    print(f\"GPUDirect Storage (via pygds) initialized successfully.\")\n    print(f\"Is GPUDirect Storage enabled: {pygds.is_enabled()}\")\n    print(f\"Is GPUDirect Storage initialized: {pygds.is_initialized()}\")\n    \n    # To actually perform I/O, you would use functions like pygds.open\n    # on a GDS-enabled file system.\n    print(\"\\n`nvidia-cufile` is installed as the backend for `pygds`.\")\n    print(\"For actual GPUDirect Storage file operations, refer to `pygds` documentation.\")\nexcept ImportError:\n    print(\"Error: `pygds` not found. Install it with `pip install pygds` \"\n          \"to use the `nvidia-cufile` backend.\")\nexcept Exception as e:\n    print(f\"An error occurred during pygds initialization: {e}\")","lang":"python","description":"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."},"warnings":[{"fix":"Use a Python binding library such as `pygds` to access GPUDirect Storage capabilities.","message":"The `nvidia-cufile` package primarily distributes the low-level C libraries for GPUDirect Storage (`libcufile`). It does not provide a direct Python API for user interaction. Python developers should typically use higher-level binding libraries like `pygds` (`pip install pygds`) to leverage GDS functionality.","severity":"gotcha","affected_versions":"All"},{"fix":"Verify that your hardware and software environment, including GPU, drivers, and CUDA Toolkit, are fully compatible with GPUDirect Storage requirements as specified by NVIDIA documentation.","message":"Requires an NVIDIA GPU with GPUDirect Storage support, compatible NVIDIA drivers, and a CUDA Toolkit installation. Ensure your system meets these hardware and software prerequisites for GDS functionality to work correctly.","severity":"gotcha","affected_versions":"All"},{"fix":"Consult NVIDIA GPUDirect Storage documentation to ensure your storage infrastructure is configured with a GDS-enabled file system and that necessary kernel modules are loaded.","message":"GPUDirect Storage requires specific file systems (e.g., Lustre, BeeGFS, GPFS, WekaIO) and kernel modules to be properly configured and mounted on the host system. Without this specialized storage setup, GDS operations will fail or fall back to slower, non-GDS paths.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}