Commit 735c128
zhangyue
refactor(data_type): pin
The `AscendC` custom kernels forward `static_cast<int64_t>(input.dtype())`
to their `aclrtlaunch_*` entry points and dispatch on the same enum —
making `DataType`'s integer values part of a host↔device ABI.
Assign explicit values (`kInt8 = 0, …, kFloat64 = 11`) to pin that ABI:
reordering or inserting entries above existing ones would silently
change the integers seen by device code. No behaviour change at call
sites (the enum is still accessed by symbolic name everywhere except
the `int64_t` cast).DataType enum values explicitly1 parent 77300e4 commit 735c128
1 file changed
Lines changed: 19 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
14 | 21 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
0 commit comments