Skip to content

Commit

Permalink
Merge pull request #30 from lipracer/dev
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
lipracer authored Jan 2, 2024
2 parents 1a6451a + e25c4e9 commit 9fb1765
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@
- 注意要在`import torch`/`import paddle`之后`import cuda_mock; cuda_mock.xpu_initialize()`
- 使用方法:

```python
import paddle
import cuda_mock; cuda_mock.xpu_initialize() # 加入这一行
```
```python
import paddle
import cuda_mock; cuda_mock.xpu_initialize() # 加入这一行
```
- 关闭打印backtrace(获取backtrace性能下降比较严重)
```
export HOOK_DISABLE_TRACE='xpuMemcpy=0,xpuSetDevice=0'
```

### example
`python test/test_import_mock.py`
Expand Down

0 comments on commit 9fb1765

Please sign in to comment.