Skip to content

Commit 7e2a873

Browse files
authored
新增映射文档 (#7293)
* add some docs * update api_mappinp
1 parent cb783bb commit 7e2a873

12 files changed

+218
-19
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## [参数完全一致]torch.distributed.batch_isend_irecv
2+
3+
### [torch.distributed.batch_isend_irecv](https://pytorch.org/docs/stable/distributed.html#torch.distributed.batch_isend_irecv)
4+
5+
```python
6+
torch.distributed.batch_isend_irecv(p2p_op_list)
7+
```
8+
9+
### [paddle.distributed.batch_isend_irecv](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/distributed/communication/batch_isend_irecv.py#L134)
10+
11+
```python
12+
paddle.distributed.batch_isend_irecv(p2p_op_list)
13+
```
14+
15+
功能一致,参数完全一致,具体如下:
16+
### 参数映射
17+
18+
| PyTorch | PaddlePaddle | 备注 |
19+
| ------------- | ------------ | ------------------------------------------------------ |
20+
| p2p_op_list | p2p_op_list | p2p 操作列表。 |
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## [组合替代实现]torch.\_foreach_log10
2+
3+
### [torch.\_foreach_log10](https://pytorch.org/docs/stable/generated/torch._foreach_log10.html#torch-foreach-log10)
4+
5+
```python
6+
torch._foreach_log10(self)
7+
```
8+
9+
Paddle 无此 API,需要组合实现。
10+
11+
### 转写示例
12+
13+
```python
14+
# PyTorch 写法
15+
torch._foreach_log10(tensors)
16+
17+
# Paddle 写法
18+
[paddle.log10(x) for x in tensors]
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## [组合替代实现]torch.\_foreach_log10_
2+
3+
### [torch.\_foreach_log10_](https://pytorch.org/docs/stable/generated/torch._foreach_log10_.html#torch-foreach-log10)
4+
5+
```python
6+
torch._foreach_log10_(self)
7+
```
8+
9+
Paddle 无此 API,需要组合实现。
10+
11+
### 转写示例
12+
13+
```python
14+
# PyTorch 写法
15+
torch._foreach_log10_(tensors)
16+
17+
# Paddle 写法
18+
[paddle.log10_(x) for x in tensors]
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## [组合替代实现]torch.\_foreach_log1p
2+
3+
### [torch.\_foreach_log1p](https://pytorch.org/docs/stable/generated/torch._foreach_log1p.html#torch-foreach-log1p)
4+
5+
```python
6+
torch._foreach_log1p(self)
7+
```
8+
9+
Paddle 无此 API,需要组合实现。
10+
11+
### 转写示例
12+
13+
```python
14+
# PyTorch 写法
15+
torch._foreach_log1p(tensors)
16+
17+
# Paddle 写法
18+
[paddle.log1p(x) for x in tensors]
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## [组合替代实现]torch.\_foreach_log1p_
2+
3+
### [torch.\_foreach_log1p_](https://pytorch.org/docs/stable/generated/torch._foreach_log1p_.html#torch-foreach-log1p)
4+
5+
```python
6+
torch._foreach_log1p_(self)
7+
```
8+
9+
Paddle 无此 API,需要组合实现。
10+
11+
### 转写示例
12+
13+
```python
14+
# PyTorch 写法
15+
torch._foreach_log1p_(tensors)
16+
17+
# Paddle 写法
18+
[paddle.log1p_(x) for x in tensors]
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## [组合替代实现]torch.\_foreach_log2
2+
3+
### [torch.\_foreach_log2](https://pytorch.org/docs/stable/generated/torch._foreach_log2.html#torch-foreach-log2)
4+
5+
```python
6+
torch._foreach_log2(self)
7+
```
8+
9+
Paddle 无此 API,需要组合实现。
10+
11+
### 转写示例
12+
13+
```python
14+
# PyTorch 写法
15+
torch._foreach_log2(tensors)
16+
17+
# Paddle 写法
18+
[paddle.log2(x) for x in tensors]
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## [组合替代实现]torch.\_foreach_log2_
2+
3+
### [torch.\_foreach_log2_](https://pytorch.org/docs/stable/generated/torch._foreach_log2_.html#torch-foreach-log2)
4+
5+
```python
6+
torch._foreach_log2_(self)
7+
```
8+
9+
Paddle 无此 API,需要组合实现。
10+
11+
### 转写示例
12+
13+
```python
14+
# PyTorch 写法
15+
torch._foreach_log2_(tensors)
16+
17+
# Paddle 写法
18+
[paddle.log2_(x) for x in tensors]
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## [组合替代实现]torch.\_foreach_neg
2+
3+
### [torch.\_foreach_neg](https://pytorch.org/docs/stable/generated/torch._foreach_neg.html#torch-foreach-neg)
4+
5+
```python
6+
torch._foreach_neg(self)
7+
```
8+
9+
Paddle 无此 API,需要组合实现。
10+
11+
### 转写示例
12+
13+
```python
14+
# PyTorch 写法
15+
torch._foreach_neg(tensors)
16+
17+
# Paddle 写法
18+
[paddle.neg(x) for x in tensors]
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## [组合替代实现]torch.\_foreach_neg_
2+
3+
### [torch.\_foreach_neg_](https://pytorch.org/docs/stable/generated/torch._foreach_neg_.html#torch-foreach-neg)
4+
5+
```python
6+
torch._foreach_neg_(self)
7+
```
8+
9+
Paddle 无此 API,需要组合实现。
10+
11+
### 转写示例
12+
13+
```python
14+
# PyTorch 写法
15+
torch._foreach_neg_(tensors)
16+
17+
# Paddle 写法
18+
[paddle.neg_(x) for x in tensors]
19+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## [组合替代实现]torch.\_foreach_tan
2+
3+
### [torch.\_foreach_tan](https://pytorch.org/docs/stable/generated/torch._foreach_tan.html#torch-foreach-tan)
4+
5+
```python
6+
torch._foreach_tan(self)
7+
```
8+
9+
Paddle 无此 API,需要组合实现。
10+
11+
### 转写示例
12+
13+
```python
14+
# PyTorch 写法
15+
torch._foreach_tan(tensors)
16+
17+
# Paddle 写法
18+
[paddle.tan(x) for x in tensors]
19+
```

0 commit comments

Comments
 (0)