| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ||||||||||||||||||||||||||||
2 | Python Data API Specification (commit: 942c9538b0dba04fcc8ad4f8a53107de1416cc9a) | PyTorch v1.10 Implementation | Changes Needed | Related Discussion | Legend | |||||||||||||||||||||||
3 | API Specification | No | No changes needed. | |||||||||||||||||||||||||
4 | Array Object | New API | Need to add a new function or constant. | |||||||||||||||||||||||||
5 | Operators | Enhancement | Need enhancement to the existing function (add new argument, etc.). | |||||||||||||||||||||||||
6 | __lt__(x1, x2) | torch.Tensor.__lt__ | No | Enhancement with BC | Need to change signature of the existing function. (breaking change) | |||||||||||||||||||||||
7 | __le__(x1, x2) | torch.Tensor.__le__ | No | Behavior | Need to change behavior of the existing function. (breaking change) | |||||||||||||||||||||||
8 | __gt__(x1, x2) | torch.Tensor.__gt__ | No | N/A | The detailed specification is not determined yet in the Data API. | |||||||||||||||||||||||
9 | __ge__(x1, x2) | torch.Tensor.__ge__ | No | |||||||||||||||||||||||||
10 | __eq__(x1, x2) | torch.Tensor.__eq__ | No | |||||||||||||||||||||||||
11 | __ne__(x1, x2) | torch.Tensor.__ne__ | No | |||||||||||||||||||||||||
12 | __pos__(x) | torch.Tensor.__pos__ | No | |||||||||||||||||||||||||
13 | __neg__(x) | torch.Tensor.__neg__ | No | |||||||||||||||||||||||||
14 | __add__(x1, x2) | torch.Tensor.__add__ | No | |||||||||||||||||||||||||
15 | __sub__(x1, x2) | torch.Tensor.__sub__ | No | |||||||||||||||||||||||||
16 | __mul__(x1, x2) | torch.Tensor.__mul__ | No | |||||||||||||||||||||||||
17 | __truediv__(x1, x2) | torch.Tensor.__truediv__ | No | |||||||||||||||||||||||||
18 | __floordiv__(x1, x2) | torch.Tensor.__floordiv__ | Behavior | Must be changed to take floor | https://github.com/pytorch/pytorch/issues/43874 | |||||||||||||||||||||||
19 | __mod__(x1, x2) | torch.Tensor.__mod__ | No | |||||||||||||||||||||||||
20 | __pow__(x1, x2) | torch.Tensor.__pow__ | No | |||||||||||||||||||||||||
21 | __matmul__(x1, x2) | torch.Tensor.__matmul__ | No | |||||||||||||||||||||||||
22 | __invert__(x) | torch.Tensor.__invert__ | No | |||||||||||||||||||||||||
23 | __and__(x1, x2) | torch.Tensor.__and__ | No | |||||||||||||||||||||||||
24 | __or__(x1, x2) | torch.Tensor.__or__ | No | |||||||||||||||||||||||||
25 | __xor__(x1, x2) | torch.Tensor.__xor__ | No | |||||||||||||||||||||||||
26 | __lshift__(x1, x2) | torch.Tensor.__lshift__ | No | |||||||||||||||||||||||||
27 | __rshift__(x1, x2) | torch.Tensor.__rshift__ | No | |||||||||||||||||||||||||
28 | In-place Operators | |||||||||||||||||||||||||||
29 | __iadd__ | torch.Tensor.__iadd__ | No | |||||||||||||||||||||||||
30 | __isub__ | torch.Tensor.__isub__ | No | |||||||||||||||||||||||||
31 | __imul__ | torch.Tensor.__imul__ | No | |||||||||||||||||||||||||
32 | __itruediv__ | torch.Tensor.__itruediv__ | No | |||||||||||||||||||||||||
33 | __ifloordiv__ | torch.Tensor.__ifloordiv__ | Behavior | Must be changed to take floor | https://github.com/pytorch/pytorch/issues/43874 | |||||||||||||||||||||||
34 | __ipow__ | torch.Tensor.__ipow__ | No | |||||||||||||||||||||||||
35 | __imatmul__ | (not implemented) | New API | |||||||||||||||||||||||||
36 | __imod__ | (not implemented) | New API | |||||||||||||||||||||||||
37 | __iand__ | torch.Tensor.__iand__ | No | |||||||||||||||||||||||||
38 | __ior__ | torch.Tensor.__ior__ | No | |||||||||||||||||||||||||
39 | __ixor__ | torch.Tensor.__ixor__ | No | |||||||||||||||||||||||||
40 | __ilshift__ | torch.Tensor.__ilshift__ | No | |||||||||||||||||||||||||
41 | __irshift__ | torch.Tensor.__irshift__ | No | |||||||||||||||||||||||||
42 | Reflected Operators | |||||||||||||||||||||||||||
43 | __radd__ | torch.Tensor.__radd__ | No | |||||||||||||||||||||||||
44 | __rsub__ | torch.Tensor.__rsub__ | No | |||||||||||||||||||||||||
45 | __rmul__ | torch.Tensor.__rmul__ | No | |||||||||||||||||||||||||
46 | __rtruediv__ | torch.Tensor.__rtruediv__ | No | |||||||||||||||||||||||||
47 | __rfloordiv__ | torch.Tensor.__rfloordiv__ | Behavior | Must be changed to take floor | https://github.com/pytorch/pytorch/issues/43874 | |||||||||||||||||||||||
48 | __rpow__ | torch.Tensor.__rpow__ | No | |||||||||||||||||||||||||
49 | __rmatmul__ | |||||||||||||||||||||||||||
50 | __rmod__ | torch.Tensor.__rmod__ | No | |||||||||||||||||||||||||
51 | __rand__ | (not implemented) | New API | |||||||||||||||||||||||||
52 | __ror__ | (not implemented) | New API | |||||||||||||||||||||||||
53 | __rxor__ | (not implemented) | New API | |||||||||||||||||||||||||
54 | __rlshift__ | (not implemented) | New API | |||||||||||||||||||||||||
55 | __rrshift__ | (not implemented) | New API | |||||||||||||||||||||||||
56 | Attributes | |||||||||||||||||||||||||||
57 | dtype | torch.Tensor.dtype | No | |||||||||||||||||||||||||
58 | device | torch.Tensor.device | No | |||||||||||||||||||||||||
59 | ndim | torch.Tensor.ndim | No | |||||||||||||||||||||||||
60 | shape -> _Tuple[Optional[int], ...] | torch.Tensor.shape | No | |||||||||||||||||||||||||
61 | size -> _Tuple[Optional[int], ...] | torch.Tensor.size | Behavior | - PyTorch returns the shape, but number of elements must be returned. - Currently implemented as method, but must be changed to property method for attribute access | Needs discussion | |||||||||||||||||||||||
62 | T | torch.Tensor.T | No | |||||||||||||||||||||||||
63 | mT | New API | (..., M, N) -> (..., N, M) | |||||||||||||||||||||||||
64 | Methods | |||||||||||||||||||||||||||
65 | __abs__(x, /) | torch.Tensor.__abs__ | No | |||||||||||||||||||||||||
66 | __add__(x1, x2, /) | torch.Tensor.__add__ | No | |||||||||||||||||||||||||
67 | __and__(x1, x2, /) | torch.Tensor.__and__ | No | |||||||||||||||||||||||||
68 | __array_namespace__(self, /, *, api_version=None) | (not implemented) | New API | |||||||||||||||||||||||||
69 | __bool__(x, /) | torch.Tensor.__bool__ | No | |||||||||||||||||||||||||
70 | __dlpack__(/, *, stream=None) | torch.utils.dlpack.to_dlpack(tensor) → PyCapsule | New API | |||||||||||||||||||||||||
71 | __dlpack_device__() | (not implemented) | New API | |||||||||||||||||||||||||
72 | __eq__(x1, x2, /) | torch.Tensor.__eq__ | No | |||||||||||||||||||||||||
73 | __float__(x, /) | torch.Tensor.__float__ | No | |||||||||||||||||||||||||
74 | __floordiv__(x1, x2, /) | torch.Tensor.__floordiv__ | Behavior | Must be changed to take floor | https://github.com/pytorch/pytorch/issues/43874 | |||||||||||||||||||||||
75 | __ge__(x1, x2, /) | torch.Tensor.__ge__ | No | |||||||||||||||||||||||||
76 | __getitem__(x, key, /) | torch.Tensor.__getitem__ | No | |||||||||||||||||||||||||
77 | __gt__(x1, x2, /) | torch.Tensor.__gt__ | No | |||||||||||||||||||||||||
78 | __index__(self, /) | New API | ||||||||||||||||||||||||||
79 | __int__(x, /) | torch.Tensor.__int__ | No | |||||||||||||||||||||||||
80 | __invert__(x, /) | torch.Tensor.__invert__ | No | |||||||||||||||||||||||||
81 | __le__(x1, x2, /) | torch.Tensor.__le__ | No | |||||||||||||||||||||||||
82 | __len__(x, /) | torch.Tensor.__len__ | No | |||||||||||||||||||||||||
83 | __lshift__(x1, x2, /) | torch.Tensor.__lshift__ | No | |||||||||||||||||||||||||
84 | __lt__(x1, x2, /) | torch.Tensor.__lt__ | No | |||||||||||||||||||||||||
85 | __matmul__(x1, x2, /) | torch.Tensor.__matmul__ | No | |||||||||||||||||||||||||
86 | __mod__(x1, x2, /) | torch.Tensor.__mod__ | No | |||||||||||||||||||||||||
87 | __mul__(x1, x2, /) | torch.Tensor.__mul__ | No | |||||||||||||||||||||||||
88 | __ne__(x1, x2, /) | torch.Tensor.__ne__ | No | |||||||||||||||||||||||||
89 | __neg__(x, /) | torch.Tensor.__neg__ | No | |||||||||||||||||||||||||
90 | __or__(x1, x2, /) | torch.Tensor.__or__ | No | |||||||||||||||||||||||||
91 | __pos__(x, /) | torch.Tensor.__pos__ | No | |||||||||||||||||||||||||
92 | __pow__(x1, x2, /) | torch.Tensor.__pow__ | No | |||||||||||||||||||||||||
93 | __rshift__(x1, x2, /) | torch.Tensor.__rshift__ | No | |||||||||||||||||||||||||
94 | __setitem__(x, key, value, /) | torch.Tensor.__setitem__ | No | |||||||||||||||||||||||||
95 | __sub__(x1, x2, /) | torch.Tensor.__sub__ | No | |||||||||||||||||||||||||
96 | __truediv__(x1, x2, /) | torch.Tensor.__truediv__ | No | |||||||||||||||||||||||||
97 | __xor__(x1, x2, /) | torch.Tensor.__xor__ | No | |||||||||||||||||||||||||
98 | to_device(self, device, /, *, stream=None) | New API | ||||||||||||||||||||||||||
99 | Data Types | |||||||||||||||||||||||||||
100 | bool | torch.bool | No | |||||||||||||||||||||||||