Commit badbe46
authored
fix(dipu): avoid infinite recursion in
* fix(dipu): avoid infinite recursion in `dumpArg()`
This happens when DIPU_DUMP_OP_ARGS is set to 3, and the tensor is copied from device to CPU before dumping the tensor.
This patch uses a function previously used in auto_compare (renamed to `toCpuTensorWithoutDiopiCopy()`) to avoid the infinite recursion.
* style(cpp): clang-format the codedumpArg() (#752)1 parent 115eb8d commit badbe46
File tree
2 files changed
+27
-18
lines changed- dipu/torch_dipu/csrc_dipu/aten/ops
2 files changed
+27
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
13 | | - | |
14 | | - | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 23 | | |
34 | 24 | | |
35 | 25 | | |
| |||
91 | 81 | | |
92 | 82 | | |
93 | 83 | | |
94 | | - | |
| 84 | + | |
95 | 85 | | |
96 | 86 | | |
97 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
32 | 51 | | |
33 | 52 | | |
34 | 53 | | |
| |||
114 | 133 | | |
115 | 134 | | |
116 | 135 | | |
117 | | - | |
| 136 | + | |
118 | 137 | | |
119 | 138 | | |
120 | 139 | | |
| |||
0 commit comments