fix: protect dependency headers and align stable ABI versions - #96
Merged
yeahdongcn merged 6 commits intoAug 3, 2026
Merged
Conversation
WindDaoist
force-pushed
the
fix/protect-dependency-porting
branch
from
July 29, 2026 06:48
8f79b0a to
9346f0b
Compare
yeahdongcn
reviewed
Jul 29, 2026
WindDaoist
force-pushed
the
fix/protect-dependency-porting
branch
from
July 29, 2026 08:30
2f5c290 to
4834445
Compare
yeahdongcn
reviewed
Jul 29, 2026
WindDaoist
force-pushed
the
fix/protect-dependency-porting
branch
from
July 29, 2026 08:41
4834445 to
085a2b5
Compare
WindDaoist
force-pushed
the
fix/protect-dependency-porting
branch
from
August 3, 2026 07:04
822ed01 to
85f6c67
Compare
Collaborator
|
@Joey-gvwal Please take a look. Thanks! |
Joey-gvwal
reviewed
Aug 3, 2026
WindDaoist
force-pushed
the
fix/protect-dependency-porting
branch
from
August 3, 2026 09:44
15b775c to
eb3638c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TORCHADA_EXCLUDE_DIRS, accepting paths or complete directory names such astorch_musa; explicitly supplied source directories remain portable.weak_ref_tensorsurface and version-specific backport/native assertions.Motivation
Editable dependencies such as
/home/torch_musacan appear in downstream extension include paths.TORCHADA_EXCLUDE_DIRS=torch_musakeeps those dependency headers available for compilation without treating the checkout as aSimplePortingsource root.The stable header backport is required by the supported torch 2.9 line. Torch 2.11 provides the stable ABI natively, so torchada detects
torch.__version__and skips the on-disk header backport on torch 2.11 and newer. The build remains automatic for downstream extensions; no per-extension opt-in is introduced.Tests
Targeted unit coverage:
PYTHONPATH=src python -m pytest -q \ tests/test_cpp_extension.py \ tests/test_inplace_porting.py \ tests/test_cuda_patching.py \ -k 'stable or dependency or inplace' \ tests/test_stable_abi_mappings.pyEnd-to-end stable-ABI matrix on one MTT S5000 with MUSA driver/runtime 5.2.0:
The same vLLM-derived
weak_ref_tensoroperation is compiled and executed in both environments. The torch 2.9 case asserts that the compatibility backport runs; the torch 2.11 case fails if torchada attempts the backport and compiles without torchada's stable compatibility include or force-included boxer header.Full torchada pytest suite on commit
2b846dd, using the same MTT S5000 and upgrading torch/torch_musa in place between runs:The additional warnings on torch 2.11 are profiler and TorchScript deprecation warnings; both runs completed without test failures. Downstream vLLM-MUSA build and serving validation is intentionally left to a separate integration effort.