morph-directml-vp 1.0.0__tar.gz

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,13 @@
1
+ Metadata-Version: 2.4
2
+ Name: morph-directml-vp
3
+ Version: 1.0.0
4
+ Summary: Optional DirectML (torch_directml) extra for Voluntas PyTorch packages. Install only on Windows/Python builds where wheels exist.
5
+ Author: F000NK, Voluntas Progressus
6
+ License-Expression: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Operating System :: Microsoft :: Windows
10
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
11
+ Requires-Python: <3.14,>=3.11
12
+ Requires-Dist: torch>=2.0.0
13
+ Requires-Dist: torch_directml>=0.2.5.dev240914
@@ -0,0 +1,38 @@
1
+ """Optional DirectML backend for Voluntas PyTorch packages.
2
+
3
+ Install this package when you need ``torch_directml`` on Windows. If your
4
+ Python version has no ``torch_directml`` wheel, skip this package and use
5
+ CUDA or CPU — core libraries do not depend on DirectML.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ __version__: str = "1.0.0"
11
+
12
+ from typing import Any
13
+
14
+ try:
15
+ import torch_directml as _torch_directml
16
+
17
+ _has_dml = True
18
+ except ImportError:
19
+ _torch_directml = None
20
+ _has_dml = False
21
+
22
+
23
+ def has_directml() -> bool:
24
+ """Whether ``torch_directml`` imported successfully."""
25
+ return _has_dml
26
+
27
+
28
+ def torch_directml_module() -> Any:
29
+ """Return the ``torch_directml`` module or raise if missing."""
30
+ if not _has_dml or _torch_directml is None:
31
+ msg = "torch_directml is not installed. Install: pip install morph-directml-vp"
32
+ raise RuntimeError(msg)
33
+ return _torch_directml
34
+
35
+
36
+ def device() -> Any:
37
+ """Default DirectML device (``torch_directml.device()``)."""
38
+ return torch_directml_module().device()
@@ -0,0 +1,13 @@
1
+ Metadata-Version: 2.4
2
+ Name: morph-directml-vp
3
+ Version: 1.0.0
4
+ Summary: Optional DirectML (torch_directml) extra for Voluntas PyTorch packages. Install only on Windows/Python builds where wheels exist.
5
+ Author: F000NK, Voluntas Progressus
6
+ License-Expression: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Operating System :: Microsoft :: Windows
10
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
11
+ Requires-Python: <3.14,>=3.11
12
+ Requires-Dist: torch>=2.0.0
13
+ Requires-Dist: torch_directml>=0.2.5.dev240914
@@ -0,0 +1,8 @@
1
+ pyproject.toml
2
+ morph_directml_support/__init__.py
3
+ morph_directml_support/py.typed
4
+ morph_directml_vp.egg-info/PKG-INFO
5
+ morph_directml_vp.egg-info/SOURCES.txt
6
+ morph_directml_vp.egg-info/dependency_links.txt
7
+ morph_directml_vp.egg-info/requires.txt
8
+ morph_directml_vp.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ torch>=2.0.0
2
+ torch_directml>=0.2.5.dev240914
@@ -0,0 +1 @@
1
+ morph_directml_support
@@ -0,0 +1,35 @@
1
+ [build-system]
2
+ requires = ["setuptools>=69.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "morph-directml-vp"
7
+ version = "1.0.0"
8
+ authors = [
9
+ { name = "F000NK" },
10
+ { name = "Voluntas Progressus" },
11
+ ]
12
+ description = "Optional DirectML (torch_directml) extra for Voluntas PyTorch packages. Install only on Windows/Python builds where wheels exist."
13
+ license = "MIT"
14
+ # torch_directml wheels are not available for all Python versions; narrow when needed.
15
+ requires-python = ">=3.11,<3.14"
16
+ classifiers = [
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Operating System :: Microsoft :: Windows",
20
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
21
+ ]
22
+ dependencies = [
23
+ "torch>=2.0.0",
24
+ "torch_directml>=0.2.5.dev240914",
25
+ ]
26
+
27
+ [tool.setuptools.packages.find]
28
+ include = ["morph_directml_support*"]
29
+
30
+ [tool.setuptools.package-data]
31
+ morph_directml_support = ["py.typed"]
32
+
33
+ [tool.ruff]
34
+ line-length = 120
35
+ target-version = "py311"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+