torch-einops-utils 0.0.25__tar.gz → 0.0.26__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.
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/PKG-INFO +1 -1
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/pyproject.toml +1 -1
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/torch_einops_utils/device.py +12 -0
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/.github/workflows/python-publish.yml +0 -0
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/.github/workflows/test.yml +0 -0
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/.gitignore +0 -0
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/LICENSE +0 -0
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/README.md +0 -0
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/tests/test_device.py +0 -0
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/tests/test_save_load.py +0 -0
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/tests/test_utils.py +0 -0
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/torch_einops_utils/__init__.py +0 -0
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/torch_einops_utils/save_load.py +0 -0
- {torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/torch_einops_utils/torch_einops_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: torch-einops-utils
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.26
|
|
4
4
|
Summary: Personal utility functions
|
|
5
5
|
Project-URL: Homepage, https://pypi.org/project/torch-einops-utils/
|
|
6
6
|
Project-URL: Repository, https://github.com/lucidrains/torch-einops-utils
|
|
@@ -36,3 +36,15 @@ def move_inputs_to_device(device):
|
|
|
36
36
|
return inner
|
|
37
37
|
|
|
38
38
|
return decorator
|
|
39
|
+
|
|
40
|
+
def move_inputs_to_module_device(fn):
|
|
41
|
+
|
|
42
|
+
@wraps(fn)
|
|
43
|
+
def inner(self, *args, **kwargs):
|
|
44
|
+
device = module_device(self)
|
|
45
|
+
|
|
46
|
+
args, kwargs = tree_map_tensor(lambda t: t.to(device), (args, kwargs))
|
|
47
|
+
|
|
48
|
+
return fn(*args, **kwargs)
|
|
49
|
+
|
|
50
|
+
return inner
|
{torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/.github/workflows/python-publish.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{torch_einops_utils-0.0.25 → torch_einops_utils-0.0.26}/torch_einops_utils/torch_einops_utils.py
RENAMED
|
File without changes
|