dora-rs 0.3.8rc0__cp37-abi3-musllinux_1_2_aarch64.whl → 0.3.9rc2__cp37-abi3-musllinux_1_2_aarch64.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.
Potentially problematic release.
This version of dora-rs might be problematic. Click here for more details.
dora/__init__.py
CHANGED
|
@@ -10,30 +10,31 @@ pip install dora-rs
|
|
|
10
10
|
from enum import Enum
|
|
11
11
|
|
|
12
12
|
from .dora import *
|
|
13
|
-
|
|
14
13
|
from .dora import (
|
|
15
14
|
Node,
|
|
16
15
|
Ros2Context,
|
|
16
|
+
Ros2Durability,
|
|
17
|
+
Ros2Liveliness,
|
|
17
18
|
Ros2Node,
|
|
18
19
|
Ros2NodeOptions,
|
|
19
|
-
Ros2Topic,
|
|
20
20
|
Ros2Publisher,
|
|
21
|
+
Ros2QosPolicies,
|
|
21
22
|
Ros2Subscription,
|
|
22
|
-
|
|
23
|
-
__version__,
|
|
23
|
+
Ros2Topic,
|
|
24
24
|
__author__,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Ros2Liveliness,
|
|
25
|
+
__version__,
|
|
26
|
+
start_runtime,
|
|
28
27
|
)
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
class DoraStatus(Enum):
|
|
32
31
|
"""Dora status to indicate if operator `on_input` loop
|
|
33
32
|
should be stopped.
|
|
33
|
+
|
|
34
34
|
Args:
|
|
35
35
|
Enum (u8): Status signaling to dora operator to
|
|
36
36
|
stop or continue the operator.
|
|
37
|
+
|
|
37
38
|
"""
|
|
38
39
|
|
|
39
40
|
CONTINUE = 0
|
dora/cuda.py
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import pyarrow as pa
|
|
2
2
|
|
|
3
|
-
# To install pyarrow.cuda, run `conda install pyarrow "arrow-cpp-proc=*=cuda" -c conda-forge`
|
|
4
|
-
import pyarrow.cuda as cuda
|
|
5
|
-
|
|
6
3
|
# Make sure to install torch with cuda
|
|
7
4
|
import torch
|
|
5
|
+
from numba.cuda import to_device
|
|
8
6
|
|
|
9
7
|
# Make sure to install numba with cuda
|
|
10
8
|
from numba.cuda.cudadrv.devicearray import DeviceNDArray
|
|
11
|
-
|
|
9
|
+
|
|
10
|
+
# To install pyarrow.cuda, run `conda install pyarrow "arrow-cpp-proc=*=cuda" -c conda-forge`
|
|
11
|
+
from pyarrow import cuda
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def torch_to_ipc_buffer(tensor: torch.TensorType) -> tuple[pa.array, dict]:
|
|
15
|
-
"""
|
|
16
|
-
Converts a Pytorch tensor into a pyarrow buffer containing the IPC handle and its metadata.
|
|
15
|
+
"""Converts a Pytorch tensor into a pyarrow buffer containing the IPC handle and its metadata.
|
|
17
16
|
|
|
18
17
|
Example Use:
|
|
19
18
|
```python
|
|
@@ -34,8 +33,7 @@ def torch_to_ipc_buffer(tensor: torch.TensorType) -> tuple[pa.array, dict]:
|
|
|
34
33
|
|
|
35
34
|
|
|
36
35
|
def ipc_buffer_to_ipc_handle(handle_buffer: pa.array) -> cuda.IpcMemHandle:
|
|
37
|
-
"""
|
|
38
|
-
Converts a buffer containing a serialized handler into cuda IPC MemHandle.
|
|
36
|
+
"""Converts a buffer containing a serialized handler into cuda IPC MemHandle.
|
|
39
37
|
|
|
40
38
|
example use:
|
|
41
39
|
```python
|
|
@@ -57,8 +55,7 @@ def ipc_buffer_to_ipc_handle(handle_buffer: pa.array) -> cuda.IpcMemHandle:
|
|
|
57
55
|
|
|
58
56
|
|
|
59
57
|
def cudabuffer_to_numba(buffer: cuda.CudaBuffer, metadata: dict) -> DeviceNDArray:
|
|
60
|
-
"""
|
|
61
|
-
Converts a pyarrow CUDA buffer to numba.
|
|
58
|
+
"""Converts a pyarrow CUDA buffer to numba.
|
|
62
59
|
|
|
63
60
|
example use:
|
|
64
61
|
```python
|
|
@@ -74,7 +71,6 @@ def cudabuffer_to_numba(buffer: cuda.CudaBuffer, metadata: dict) -> DeviceNDArra
|
|
|
74
71
|
numba_tensor = cudabuffer_to_numbda(cudabuffer, event["metadata"])
|
|
75
72
|
```
|
|
76
73
|
"""
|
|
77
|
-
|
|
78
74
|
shape = metadata["shape"]
|
|
79
75
|
strides = metadata["strides"]
|
|
80
76
|
dtype = metadata["dtype"]
|
|
@@ -83,8 +79,7 @@ def cudabuffer_to_numba(buffer: cuda.CudaBuffer, metadata: dict) -> DeviceNDArra
|
|
|
83
79
|
|
|
84
80
|
|
|
85
81
|
def cudabuffer_to_torch(buffer: cuda.CudaBuffer, metadata: dict) -> torch.Tensor:
|
|
86
|
-
"""
|
|
87
|
-
Converts a pyarrow CUDA buffer to a torch tensor.
|
|
82
|
+
"""Converts a pyarrow CUDA buffer to a torch tensor.
|
|
88
83
|
|
|
89
84
|
example use:
|
|
90
85
|
```python
|
|
@@ -100,7 +95,6 @@ def cudabuffer_to_torch(buffer: cuda.CudaBuffer, metadata: dict) -> torch.Tensor
|
|
|
100
95
|
torch_tensor = cudabuffer_to_torch(cudabuffer, event["metadata"]) # on cuda
|
|
101
96
|
```
|
|
102
97
|
"""
|
|
103
|
-
|
|
104
98
|
device_arr = cudabuffer_to_numba(buffer, metadata)
|
|
105
99
|
torch_tensor = torch.as_tensor(device_arr, device="cuda")
|
|
106
100
|
return torch_tensor
|
dora/dora.abi3.so
CHANGED
|
Binary file
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dora-rs
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.9rc2
|
|
4
4
|
Requires-Dist: pyarrow
|
|
5
5
|
Summary: `dora` goal is to be a low latency, composable, and distributed data flow.
|
|
6
|
-
License:
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.7
|
|
7
8
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
8
9
|
Project-URL: Source Code, https://github.com/dora-rs/dora/
|
|
9
10
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
dora_rs-0.3.9rc2.dist-info/METADATA,sha256=4aDA44TmaXVAckYLSoztWKfjJtjue7vcoC9RWTnXLhg,665
|
|
2
|
+
dora_rs-0.3.9rc2.dist-info/WHEEL,sha256=pzxMpxC6rRxS4fcpqnxRFC5wxjf-tVfQc3Mv--2ug1E,106
|
|
3
|
+
dora.libs/libgcc_s-e52197c3.so.1,sha256=vkPW1Auw6CH9Bjk7frmX3hry_1H9c0tRI0Ncyg71WUI,724137
|
|
4
|
+
dora/__init__.py,sha256=x3SdgwncpcHNnvLdsSc8Jrj1BBEC2uZVOCMYULyTrvo,711
|
|
5
|
+
dora/__init__.pyi,sha256=MZfafEGo1F_Al2RLrD36_cGRfFgOYY8Qa1_14bFYcf0,8342
|
|
6
|
+
dora/cuda.py,sha256=KuB-J8cykDkcbLjeSYWt4oz5lbkrKOUycUh3o1hfJRA,3161
|
|
7
|
+
dora/dora.abi3.so,sha256=2VeVq8l0w75OQA_Oh-i2vHuREe53cAXxwtvWEGviVI8,23466089
|
|
8
|
+
dora_rs-0.3.9rc2.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
dora_rs-0.3.8rc0.dist-info/METADATA,sha256=BcyQcCQtCRJygU_O9gYJn0uonR2d0eAEfl1fl83LAt0,649
|
|
2
|
-
dora_rs-0.3.8rc0.dist-info/WHEEL,sha256=l9crye_NlJFBlc2WYAd7c3ZOuwFSXNaToLetMJnqfL0,106
|
|
3
|
-
dora.libs/libgcc_s-e52197c3.so.1,sha256=vkPW1Auw6CH9Bjk7frmX3hry_1H9c0tRI0Ncyg71WUI,724137
|
|
4
|
-
dora/__init__.py,sha256=cmZ5rB848800jqu5QCP0kvipTpNHwhvknzVVrfWR5-Q,710
|
|
5
|
-
dora/__init__.pyi,sha256=MZfafEGo1F_Al2RLrD36_cGRfFgOYY8Qa1_14bFYcf0,8342
|
|
6
|
-
dora/cuda.py,sha256=jC8zPIobrUhVbduKCZlHCgKqQj05jIpt1_weRNe6TJU,3186
|
|
7
|
-
dora/dora.abi3.so,sha256=dYGeC5oMPs6QGXdUvGwcsKpMf5_A2CcspDlJao2IFmk,23400569
|
|
8
|
-
dora_rs-0.3.8rc0.dist-info/RECORD,,
|