Commit ce61c6b
authored
Use the correct torch dtype in topk kernel assertion
Torch 2.7 doesn't define `ScalarType::Int64` but rather defines `::Long instead`: https://github.com/pytorch/pytorch/blob/release/2.7/c10/core/ScalarType.h#L67
Without this patch, it's impossible to build vllm with an error message like
```
/amd/vadim/vllm/build/temp.linux-x86_64-cpython-310/csrc/moe/topk_softmax_kernels.hip
/home/amd/vadim/vllm/build/temp.linux-x86_64-cpython-310/csrc/moe/topk_softmax_kernels.hip:535:62: error: no member named 'Int64' in 'c10::ScalarType'
535 | assert(topk_indices.scalar_type() == at::ScalarType::Int64);
| ~~~~~~~~~~~~~~~~^
/usr/include/assert.h:93:27: note: expanded from macro 'assert'
93 | (static_cast <bool> (expr) \
| ^~~~
1 error generated when compiling for gfx942.
```1 parent 9b43d47 commit ce61c6b
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
| 533 | + | |
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| |||
0 commit comments