New stable abi cleanup - #46656
Conversation
f6bfd4f to
b812075
Compare
janeyx99
left a comment
There was a problem hiding this comment.
LGTM though we can do more and move headers that are used at all in libtorch_stable AND are stable themselves to libtorch_stable too right?
In other words, a file doesn't need to only be used in libtorch_stable to be migrated; it can also be used outside of libtorch_stable.
Oh, I misunderstood what you were saying in the comments on #44013, but you're right. Any header that is used to by a libtorch_stable file could be moved with little risk of regressing. I'll add a quick update to move over a few more headers. |
|
@cleonard530 If this PR is already locally validated, it's ok to land this and then move more files in a new PR too. The important thing is for the files that are migrated to truly be ABI stable. Technically they can include unstable things but if those functions/structs never get used from within the libtorch_stable extension, then the TORCH_TARGET_VERSION flag won't catch that. But your lint might! |
Sounds good, I will leave this as is then and move the other headers over in future PRs |
|
Hi @cleonard530, 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, |
|
@Harry-Chen, I checked the failure logs and they don't seem to be related to this PR. Can you rerun the failed test? |
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Chris Leonard <chleonar@redhat.com>
Signed-off-by: Chris Leonard <chleonar@redhat.com>
Signed-off-by: Chris Leonard <chleonar@redhat.com>
Signed-off-by: Chris Leonard <chleonar@redhat.com>
d0b24e7 to
acc7878
Compare
|
Hi @cleonard530, 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, |
…t to fail Signed-off-by: Chris Leonard <chleonar@redhat.com>
…_C_stable_libtorch (matches Platform.import_kernels) and importing vllm._qutlass_C (optional library). Signed-off-by: Chris Leonard <chleonar@redhat.com>
youkaichao
left a comment
There was a problem hiding this comment.
stamp on behalf of @Harry-Chen
Does this imply any potential performance improvement, or only semantics and safety guarantee? |
It would mostly be for semantics/safety. If there were any performance improvements, I think they would be negligible. |
Signed-off-by: Chris Leonard <chleonar@redhat.com>
Signed-off-by: Chris Leonard <chleonar@redhat.com>
Signed-off-by: Chris Leonard <chleonar@redhat.com> Signed-off-by: mayuyuace <qiming1.zhang@intel.com>
Signed-off-by: Chris Leonard <chleonar@redhat.com>
The docs referenced several paths that no longer exist: - csrc/layernorm_quant_kernels.cu and csrc/quantization/fused_kernels/fused_silu_mul_block_quant.cu moved under csrc/libtorch_stable/ in vllm-project#46656 - vllm/worker/model_runner.py was removed with the V0 core in vllm-project#25321; CUDA graph replay now happens in vllm/compilation/cuda_graph.py - vllm/entrypoints/openai/protocol.py no longer holds the transcription protocol, which lives in vllm/entrypoints/speech_to_text/transcription/protocol.py Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: ayaangazali <ayaangazali.work@gmail.com>
Signed-off-by: Chris Leonard <chleonar@redhat.com>
Signed-off-by: Chris Leonard <chleonar@redhat.com>
The docs referenced several paths that no longer exist: - csrc/layernorm_quant_kernels.cu and csrc/quantization/fused_kernels/fused_silu_mul_block_quant.cu moved under csrc/libtorch_stable/ in vllm-project#46656 - vllm/worker/model_runner.py was removed with the V0 core in vllm-project#25321; CUDA graph replay now happens in vllm/compilation/cuda_graph.py - vllm/entrypoints/openai/protocol.py no longer holds the transcription protocol, which lives in vllm/entrypoints/speech_to_text/transcription/protocol.py Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: ayaangazali <ayaangazali.work@gmail.com>
Signed-off-by: Chris Leonard <chleonar@redhat.com> Signed-off-by: root <root@smci355-ccs-aus-m02-09.cs-aus.dcgpu>
Purpose
This is to cleanup a bit after migrating vLLM to the libtorch stable ABI. This includes:
libtorch_stabledirectory to that directory._qutlass_Cincuda.pyOther things that could be improved that are not cleaned up here:
constare not. This PR scope is already large (50 files changed) and this update would make it a lot larger without a huge benefit, so I did not update them here.csrc/are duplicated incsrc/libtorch_stable/(e.g.dispatch_utils.handtorch_utils.h) which can cause confusion when importing. For instance, a file incsrc/libtorch_stable/with#include "torch_utils.h"will includecsrc/libtorch_stable/torch_utils.h, but if it was in any other directory it would includecsrc/torch_utils.h. This should be resolved when we move the CPU and ROCm builds to the stable ABI as well.cc @Harry-Chen @janeyx99
Test Plan
The changes are small but it covers a lot of files so the test plan is broad.
pytest tests/kernels/core
pytest tests/kernels/moe
pytest tests/kernels/quantization
pytest tests/kernels/test_top_k_per_row.py
pytest tests/kernels/test_fp32_router_gemm.py
pytest tests/kernels/test_fused_minimax_m3_qknorm_rope_kv_insert.py
Test Result
16,824 Test Executed
The same failures also failed on the
mainbranch.Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.