# This file was generated by stubgen-pyx v0.2.6 from cuda_core/cuda/core/_utils/version.pyx

from __future__ import annotations

import functools


def _parse_version_triple(version_str: str) -> tuple[int, int, int]:
    """Parse a PEP 440 version string into a (major, minor, patch) triple.

    Strips local-version identifiers and handles pre-release suffixes such as
    ``0b1`` or ``0rc1`` by extracting only the leading integer from each
    release segment.
    """

@functools.cache
def binding_version() -> tuple[int, int, int]:
    """Return the cuda-bindings version as a (major, minor, patch) triple."""

@functools.cache
def driver_version() -> tuple[int, int, int]:
    """Return the CUDA driver version as a (major, minor, patch) triple."""