kernels-data 0.14.0.dev1__cp313-cp313t-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ from .kernels_data import *
2
+
3
+ __doc__ = kernels_data.__doc__
4
+ if hasattr(kernels_data, "__all__"):
5
+ __all__ = kernels_data.__all__
@@ -0,0 +1,125 @@
1
+ """Type stubs for kernels_data module."""
2
+
3
+ import os
4
+ from enum import Enum
5
+ from typing import Optional, final
6
+
7
+ __all__ = ["Backend", "BackendInfo", "KernelName", "Metadata", "Version", "__version__"]
8
+
9
+ __version__: str
10
+
11
+ @final
12
+ class Backend(Enum):
13
+ """Kernel backend (hardware target)."""
14
+
15
+ CANN = "CANN"
16
+ CPU = "CPU"
17
+ CUDA = "CUDA"
18
+ Metal = "Metal"
19
+ Neuron = "Neuron"
20
+ ROCm = "ROCm"
21
+ XPU = "XPU"
22
+
23
+ @staticmethod
24
+ def from_str(s: str) -> "Backend":
25
+ """Parse a backend name.
26
+
27
+ Args:
28
+ s: One of ``"cann"``, ``"cpu"``, ``"cuda"``, ``"metal"``,
29
+ ``"neuron"``, ``"rocm"``, ``"xpu"``.
30
+
31
+ Raises:
32
+ ValueError: If the backend name is unknown.
33
+ """
34
+ ...
35
+
36
+ def __str__(self) -> str: ...
37
+ def __repr__(self) -> str: ...
38
+
39
+ @final
40
+ class BackendInfo:
41
+ """Backend information."""
42
+
43
+ @property
44
+ def backend_type(self) -> Backend:
45
+ """Return the backend type."""
46
+ ...
47
+
48
+ @property
49
+ def archs(self) -> Optional[list[str]]:
50
+ """Optional list of target architectures."""
51
+ ...
52
+
53
+ def __repr__(self) -> str: ...
54
+
55
+ @final
56
+ class Version:
57
+ """A dotted numeric version (e.g. ``12.8.0``).
58
+
59
+ Trailing zeros are stripped during normalization.
60
+ """
61
+
62
+ @staticmethod
63
+ def from_str(s: str) -> "Version":
64
+ """Parse a version string of the form ``X``, ``X.Y``, ``X.Y.Z``, ...
65
+
66
+ Raises:
67
+ ValueError: If the string is empty or contains non-numeric parts.
68
+ """
69
+ ...
70
+
71
+ def __str__(self) -> str: ...
72
+ def __repr__(self) -> str: ...
73
+ def __eq__(self, value: object, /) -> bool: ...
74
+ def __lt__(self, value: "Version", /) -> bool: ...
75
+ def __le__(self, value: "Version", /) -> bool: ...
76
+ def __gt__(self, value: "Version", /) -> bool: ...
77
+ def __ge__(self, value: "Version", /) -> bool: ...
78
+ def __hash__(self) -> int: ...
79
+
80
+ @final
81
+ class KernelName:
82
+ """A validated kernel name matching ``^[a-z][-a-z0-9]*[a-z0-9]$``."""
83
+
84
+ def __new__(cls, name: str) -> "KernelName":
85
+ """Create a new ``KernelName``.
86
+
87
+ Raises:
88
+ ValueError: If the name does not match the required pattern.
89
+ """
90
+ ...
91
+
92
+ @property
93
+ def python_name(self) -> str:
94
+ """The name with dashes replaced by underscores."""
95
+ ...
96
+
97
+ def __str__(self) -> str: ...
98
+ def __repr__(self) -> str: ...
99
+ def __eq__(self, value: object, /) -> bool: ...
100
+ def __hash__(self) -> int: ...
101
+
102
+ @final
103
+ class Metadata:
104
+ """Parsed ``metadata.json`` for a kernel build variant."""
105
+
106
+ @staticmethod
107
+ def load(metadata_path: os.PathLike[str] | str) -> "Metadata":
108
+ """Parse ``metadata.json`` at the given path.
109
+
110
+ Raises:
111
+ ValueError: On any I/O or parse error.
112
+ """
113
+ ...
114
+
115
+ @property
116
+ def version(self) -> Optional[int]: ...
117
+ @property
118
+ def license(self) -> Optional[str]: ...
119
+ @property
120
+ def upstream(self) -> Optional[str]: ...
121
+ @property
122
+ def python_depends(self) -> list[str]: ...
123
+ @property
124
+ def backend(self) -> BackendInfo: ...
125
+ def __repr__(self) -> str: ...
kernels_data/py.typed ADDED
File without changes
@@ -0,0 +1,8 @@
1
+ Metadata-Version: 2.4
2
+ Name: kernels-data
3
+ Version: 0.14.0.dev1
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Summary: Kernels data structures (Python bindings)
7
+ Home-Page: https://github.com/huggingface/kernels
8
+ Requires-Python: >=3.8
@@ -0,0 +1,8 @@
1
+ kernels_data/__init__.py,sha256=8ScqcBxuAjovkwPaNrXDOwxQlTt5Qtp7DqeBfWRQ3sA,131
2
+ kernels_data/__init__.pyi,sha256=q8EVUffwqH9PoDaXPybFXge7V0tQuJNtG3ko4yNEm1M,3260
3
+ kernels_data/kernels_data.cp313t-win32.pyd,sha256=cZZrLLkFa4J6zNgA5FTQ0sWWQQwFFsbpO8mJOAhHnSw,1819648
4
+ kernels_data/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ kernels_data-0.14.0.dev1.dist-info/METADATA,sha256=DIGgnA7jEFGujeRSBnyX-ITVZTIP447BGoOo7ulBhjw,299
6
+ kernels_data-0.14.0.dev1.dist-info/WHEEL,sha256=IkYF_AWwxG3zQ03QAvULBqeI7Ck4_Q4cqzBoXf-4aqM,94
7
+ kernels_data-0.14.0.dev1.dist-info/sboms/kernels-data-python.cyclonedx.json,sha256=G33OIikpEs0G4UWrybHNCOzyrQVoNiwyfX52JoGfQUA,79749
8
+ kernels_data-0.14.0.dev1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.13.1)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-cp313t-win32