Skip to content

Commit

Permalink
fix (#6030)
Browse files Browse the repository at this point in the history
  • Loading branch information
enkilee authored Jul 18, 2023
1 parent 9bddee8 commit a5df168
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## [ 仅参数名不一致 ]torch.from_dlpack

### [torch.from_dlpack](https://pytorch.org/docs/2.0/generated/torch.from_dlpack.html?highlight=from_dlpack#torch.from_dlpack)

```python
torch.from_dlpack(ext_tensor)
```

### [paddle.utils.dlpack.from_dlpack](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/utils/dlpack/from_dlpack_cn.html)

```python
paddle.utils.dlpack.from_dlpack(dlpack)
```

两者功能一致且参数用法一致,仅参数名不同,具体如下:
### 参数映射
| PyTorch | PaddlePaddle | 备注 |
| ------------- | ------------ | ------------------------------------------------------ |
| ext_tensor | dlpack | 表示输入的带有 dltensor 的 PyCapsule 对象,仅参数名不一致。 |

0 comments on commit a5df168

Please sign in to comment.