Repository navigation
[Bugfix] [ROCm] [Critical] fallback to regular abi for ROCm - #44648
Conversation
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
|
Hi @tjtanaa, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
| TORCH_BOX(&get_cuda_view_from_cpu_tensor)); | ||
| } | ||
|
|
||
| STABLE_TORCH_LIBRARY_FRAGMENT(_C_cuda_utils, cuda_utils) { |
There was a problem hiding this comment.
The file is moved to group them together under one #ifndef USE_ROCM
| @@ -0,0 +1,60 @@ | |||
| // TODO: Remove this once ROCm upgrade to torch 2.11. | |||
There was a problem hiding this comment.
This is the old implementation of cuda_view.cu, will be removed once ROCm officially upgrade to torch 2.11.
|
The AMD CI docker image built passed https://buildkite.com/vllm/amd-ci/builds/9211/canvas?sid=019e97ac-3a86-421c-b8c9-2a9205a48ddd&tab=output |
|
Hi @tjtanaa, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
|
@tjtanaa Is there a timeline for when ROCm will be on 2.11? |
…ject#44648) Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
…ject#44648) Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
Upstream PR vllm-project#44334 migrated `get_cuda_view_from_cpu_tensor` to the torch stable ABI (csrc/libtorch_stable/cuda_view.cu), which assumes torch >= 2.11. The PPU build environment is locked to torch 2.10, whose stable from_blob() signature ends with `Layout layout = Strided` and has no deleter slot, so the migrated file cannot compile on PPU. Following the same approach as upstream PR vllm-project#44648 (ROCm fallback), let PPU CUDA also use the regular (non-stable) ABI implementation: - Delete csrc/libtorch_stable/cuda_view.cu (stable ABI version). - Restore csrc/cuda_view.cu (regular ABI implementation that uses torch::from_blob with a deleter callback). - CMakeLists.txt: * Add csrc/cuda_view.cu to VLLM_EXT_SRC for CUDA path. * Drop csrc/libtorch_stable/cuda_view.cu from STABLE_EXT_SRC. * Set TORCH_TARGET_VERSION back to 0x020A (torch 2.10) for CUDA. * Define VLLM_PPU_REGULAR_ABI_CUDA_VIEW for both _C and _C_stable_libtorch targets. - Source guards: * csrc/ops.h: declare get_cuda_view_from_cpu_tensor under `#if defined(USE_ROCM) || defined(VLLM_PPU_REGULAR_ABI_CUDA_VIEW)`. * csrc/torch_bindings.cpp: register the regular-ABI op under the same combined guard. * csrc/libtorch_stable/ops.h: skip the stable-ABI declaration when VLLM_PPU_REGULAR_ABI_CUDA_VIEW is defined. * csrc/libtorch_stable/torch_bindings.cpp: skip the stable-ABI ops.def and STABLE_TORCH_LIBRARY_IMPL(_C, CPU, ops) when VLLM_PPU_REGULAR_ABI_CUDA_VIEW is defined; keep the _C_cuda_utils library enabled for PPU CUDA. TODO: Drop this WA once PPU upgrades to torch 2.11.
Purpose
#44334 PR requires the feature from Torch 2.11 as described in issue #44641 , however ROCm currently official supports torch 2.10 which is incompatible, this causes the build failure.
Build error message
Build Failure
Test Plan
test_uva.pyTest Result
pytest -svvvvv tests/kernels/core/test_uva.pyResults:
Extra details
The
silu_and_mul_per_block_quantthat was moved into stable ABI in this PR #44334 works on ROCm.pytest tests/kernels/core/test_fused_silu_mul_block_quant.py test results:
================= 650 passed, 16 warnings in 210.44s (0:03:30) =================Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.