phyelds-gpu 10.2.0__py3-none-any.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.
- phyelds/gpu/__init__.py +26 -0
- phyelds/gpu/engine.py +405 -0
- phyelds/gpu/fields.py +430 -0
- phyelds/gpu/runtime.py +58 -0
- phyelds/gpu/tensors.py +78 -0
- phyelds/gpu/topology.py +296 -0
- phyelds/gpu/wavefront.py +381 -0
- phyelds_gpu-10.2.0.dist-info/METADATA +48 -0
- phyelds_gpu-10.2.0.dist-info/RECORD +10 -0
- phyelds_gpu-10.2.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: phyelds-gpu
|
|
3
|
+
Version: 10.2.0
|
|
4
|
+
Summary: PyTorch backend for phyelds: aggregate programs on batches of devices, on CPU or GPU
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Author: Gianluca Aguzzi
|
|
7
|
+
Author-email: gianluca.aguzzi@unibo.it
|
|
8
|
+
Requires-Python: >=3.12,<3.15
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
+
Requires-Dist: phyelds (>=10.2.0,<11.0.0)
|
|
17
|
+
Requires-Dist: torch (>=2.4.0)
|
|
18
|
+
Project-URL: Homepage, https://github.com/phyelds/phyelds
|
|
19
|
+
Project-URL: Repository, https://github.com/phyelds/phyelds
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# phyelds-gpu
|
|
23
|
+
|
|
24
|
+
PyTorch backend for [phyelds](https://github.com/phyelds/phyelds): the devices of an aggregate
|
|
25
|
+
system as tensors, on CPU or GPU.
|
|
26
|
+
|
|
27
|
+
`BatchSynchronousRuntime` runs an unmodified `@aggregate` program on every device at once, one
|
|
28
|
+
synchronous round at a time, with the results of phyelds' own `SynchronousRuntime`;
|
|
29
|
+
`BatchWavefrontRuntime` runs it in wavefronts of devices with clocks of their own, over a
|
|
30
|
+
channel with delays and losses. See [the documentation](https://phyelds.github.io/phyelds/integration/gpu/).
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
import torch
|
|
35
|
+
from phyelds.calculus import aggregate
|
|
36
|
+
from phyelds.libraries.device import sense
|
|
37
|
+
from phyelds.libraries.spreading import distance_to
|
|
38
|
+
from phyelds.gpu import BatchSynchronousRuntime, radius_topology
|
|
39
|
+
|
|
40
|
+
@aggregate
|
|
41
|
+
def gradient():
|
|
42
|
+
return distance_to(sense("source"))
|
|
43
|
+
|
|
44
|
+
positions = torch.rand(100_000, 2, dtype=torch.float64) * 200
|
|
45
|
+
runtime = BatchSynchronousRuntime(gradient, radius_topology(positions, 1.0))
|
|
46
|
+
distances = runtime.run_round({"source": torch.arange(100_000) == 0}) # one per device
|
|
47
|
+
```
|
|
48
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
phyelds/gpu/__init__.py,sha256=cL1kuPKuQAU_wKhz19KuvVNoL_2HW7Kvxj84rE-1gM0,1042
|
|
2
|
+
phyelds/gpu/engine.py,sha256=8bpC7hYe70HOSZt_fFGr0ZfF9fss5q9GUYpXDYiNys4,16124
|
|
3
|
+
phyelds/gpu/fields.py,sha256=BlKReSHyhQudTgqQMQnDqb1mtz5nrJ8Exjn52FnabeY,18647
|
|
4
|
+
phyelds/gpu/runtime.py,sha256=waGEmcuoHUmtQPsXhSd8_w2KAdpdrAJOQg1KouYMXgs,2389
|
|
5
|
+
phyelds/gpu/tensors.py,sha256=jP9FFgttypNrSZ9IU3RtTWpXHqz3s61FEOxVKxdsRy4,2984
|
|
6
|
+
phyelds/gpu/topology.py,sha256=JWNAX2y9nFdEYCbIOCB2HIaeaG4Nq9_L1IlKFZiJCCQ,13026
|
|
7
|
+
phyelds/gpu/wavefront.py,sha256=sTDTp866LZBhTMXkBjVenqHzIqpFTXJobC0U1Ute5qE,16524
|
|
8
|
+
phyelds_gpu-10.2.0.dist-info/METADATA,sha256=WFxT4WNIkiiA9CZvA2TjfsT0XzKhhmyb77GZS6w4_mc,1927
|
|
9
|
+
phyelds_gpu-10.2.0.dist-info/WHEEL,sha256=EGEvSphFYqXKs23-kQBeyNoJP1nrT8ZJKQoi5p5DYL8,88
|
|
10
|
+
phyelds_gpu-10.2.0.dist-info/RECORD,,
|