Skip to content

Commit

Permalink
Update accelerate_pytorch.md
Browse files Browse the repository at this point in the history
Minor format updates.
  • Loading branch information
writinwaters authored Sep 20, 2022
1 parent d727a8d commit 6d6bfc9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/lang/articles/get-started/accelerate_pytorch.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ As the following table shows, the PyTorch kernel takes 30.392 ms[1] to complete

`torch_pad()` launches 58 CUDA kernels, whilst Taichi compiles all computation into one CUDA kernel. The fewer the CUDA kernels, the less GPU launch overhead is incurred. Moreover, the Taichi kernel manages to save a lot more redundant memory operations than the PyTorch kernel. The GPU launch overhead and the redundant memory operations are the potential source for optimization and acceleration.

| Kernel function | Average time (ms) | CUDA kernels launched (number) |
| --------------- | ----------------- | ------------------------------ |
| `torch_pad()` | 30.392 | 58 |
| `ti_pad()` | 0.267 | 1 |
| Kernel function | Average time (ms) | CUDA kernels launched (number) |
| :--------------- | :----------------- | :------------------------------ |
| `torch_pad()` | 30.392 | 58 |
| `ti_pad()` | 0.267 | 1 |

> - GPU: RTX3090
> - PyTorch version: v1.12.1; Taichi version: v1.1.0
Expand Down

0 comments on commit 6d6bfc9

Please sign in to comment.