Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

映射文档 No. 141/142 #6027

Merged
merged 3 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## [无参数]torch.cuda.nvtx.range_pop

### [torch.cuda.nvtx.range_pop](https://pytorch.org/docs/1.13/generated/torch.cuda.nvtx.range_pop.html#torch.cuda.nvtx.range_pop)

```python
torch.cuda.nvtx.range_pop()
```

### [paddle.fluid.core.nvprof_nvtx_pop](https://github.com/PaddlePaddle/Paddle/blob/f00a06d817b97bde23e013c2fb0cd1a6c9c1076b/paddle/fluid/pybind/pybind.cc#L2264)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个官网没有API,fluid也要被清理掉,这样写不知道有没有问题:joy: @zhwesky2010

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先这样写吧,后面需要把这个API暴露到更好的module下


```python
paddle.fluid.core.nvprof_nvtx_pop()
```

功能一致,无参数。
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## [仅参数名不一致]torch.cuda.nvtx.range_push

### [torch.cuda.nvtx.range_push](https://pytorch.org/docs/1.13/generated/torch.cuda.nvtx.range_push.html#torch.cuda.nvtx.range_push)

```python
torch.cuda.nvtx.range_push(msg)
```

### [paddle.fluid.core.nvprof_nvtx_push](https://github.com/PaddlePaddle/Paddle/blob/f00a06d817b97bde23e013c2fb0cd1a6c9c1076b/paddle/fluid/pybind/pybind.cc#L2261)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个官网没有API,fluid也要被清理掉,这样写不知道有没有问题:joy: @zhwesky2010


```python
paddle.fluid.core.nvprof_nvtx_push(name)
```

两者功能一致且参数用法一致,仅参数名不一致,具体如下:

### 参数映射

| PyTorch | PaddlePaddle | 备注 |
| ------- | ------------ | ------------------------------------------ |
| msg | name | 关联 range 的 ASCII 消息,仅参数名不一致。 |