fix: accept PyTorch 2.11 extension path query arguments - #110
Draft
yeahdongcn wants to merge 1 commit into
Draft
Conversation
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
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
Support modern PyTorch extension path discovery without dropping legacy CUDA-call compatibility:
include_paths(device_type, torch_include_dirs).library_paths(device_type, torch_include_dirs, cross_target_platform)including keyword calls.(cuda_bool, device_name),cuda=..., device-name precedence and the legacy default CPU library result.This fixes a real Inductor CPU-helper compilation failure during regional MUSA Graph bring-up:
include_paths("cpu", False)was bound to(cuda, device_type), causingFalse.lower().Tests
2.11.0.post1+musa5.2.0: pass using the full-Torch CPU helper ABI.The runtime test applied only these path-helper definitions to the existing torchada 0.1.83 image, preserving its other patches and tuning configs. The test used a fresh
TORCHINDUCTOR_CACHE_DIR.Scope / remaining validation
The tested MUSA build still emits the full Torch CPU prefix, so its first-build smoke requires
torch._inductor.config.aot_inductor.link_libtorch = Nonebefore compilation. The default header-only mode exposed a separate missing-header issue after this signature error was fixed. This PR does not change that provider/compiler behavior or claim the default header-only mode now works.Full MAGI-2 MUSA Graph validation is ongoing. No attention, MoE kernel, model quantization, or serving parallelism changes are included here.