[dynamo] Fix is_from_source to match at intermediate chain levels#176452
[dynamo] Fix is_from_source to match at intermediate chain levels#176452anijain2305 wants to merge 5 commits intogh/anijain2305/1052/basefrom
Conversation
is_from_source(source, target) previously only compared at the root of the ChainedSource hierarchy. This meant that is_from_source(AttrSource(X, 'c'), X) returned False when X was itself a ChainedSource (e.g. UnspecializedNNModuleSource(GlobalSource(...))), because the function walked past X all the way to the root before comparing. Check source == target at each level before recursing so that intermediate sources are correctly recognized as ancestors. Authored with Claude. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/176452
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Unrelated FailureAs of commit 64d7e2f with merge base bdbf4a1 ( NEW FAILURES - The following jobs have failed:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
… levels" is_from_source(source, target) previously only compared at the root of the ChainedSource hierarchy. This meant that is_from_source(AttrSource(X, 'c'), X) returned False when X was itself a ChainedSource (e.g. UnspecializedNNModuleSource(GlobalSource(...))), because the function walked past X all the way to the root before comparing. Check source == target at each level before recursing so that intermediate sources are correctly recognized as ancestors. Authored with Claude. [ghstack-poisoned]
… levels" is_from_source(source, target) previously only compared at the root of the ChainedSource hierarchy. This meant that is_from_source(AttrSource(X, 'c'), X) returned False when X was itself a ChainedSource (e.g. UnspecializedNNModuleSource(GlobalSource(...))), because the function walked past X all the way to the root before comparing. Check source == target at each level before recursing so that intermediate sources are correctly recognized as ancestors. Authored with Claude. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
… levels" is_from_source(source, target) previously only compared at the root of the ChainedSource hierarchy. This meant that is_from_source(AttrSource(X, 'c'), X) returned False when X was itself a ChainedSource (e.g. UnspecializedNNModuleSource(GlobalSource(...))), because the function walked past X all the way to the root before comparing. Check source == target at each level before recursing so that intermediate sources are correctly recognized as ancestors. Authored with Claude. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
… levels" is_from_source(source, target) previously only compared at the root of the ChainedSource hierarchy. This meant that is_from_source(AttrSource(X, 'c'), X) returned False when X was itself a ChainedSource (e.g. UnspecializedNNModuleSource(GlobalSource(...))), because the function walked past X all the way to the root before comparing. Check source == target at each level before recursing so that intermediate sources are correctly recognized as ancestors. Authored with Claude. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo [ghstack-poisoned]
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 2 checks: trunk / macos-py3-arm64 / test (default, 1, 3, macos-m1-stable), inductor / inductor-cpu-test / test (cpu_inductor_torchbench, 1, 2, linux.2xlarge.amx, unstable) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: inductor / unit-test / inductor-test / test (inductor_cpp_wrapper, 1, 2, linux.g5.4xlarge.nvidia.gpu) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 3 checks: trunk / macos-py3-arm64 / test (default, 1, 3, macos-m1-stable), inductor / inductor-cpu-test / test (cpu_inductor_torchbench, 1, 2, linux.2xlarge.amx, unstable), inductor / unit-test / inductor-test / test (inductor_cpp_wrapper, 1, 2, linux.g5.4xlarge.nvidia.gpu) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
is_from_source(source, target) previously only compared at the root of the ChainedSource hierarchy. This meant that is_from_source(AttrSource(X, 'c'), X) returned False when X was itself a ChainedSource (e.g. UnspecializedNNModuleSource(GlobalSource(...))), because the function walked past X all the way to the root before comparing. Check source == target at each level before recursing so that intermediate sources are correctly recognized as ancestors. Authored with Claude. ghstack-source-id: fc1b178 Pull Request resolved: pytorch/pytorch#176452
is_from_source(source, target) previously only compared at the root of the ChainedSource hierarchy. This meant that is_from_source(AttrSource(X, 'c'), X) returned False when X was itself a ChainedSource (e.g. UnspecializedNNModuleSource(GlobalSource(...))), because the function walked past X all the way to the root before comparing. Check source == target at each level before recursing so that intermediate sources are correctly recognized as ancestors. Authored with Claude. ghstack-source-id: d89323e Pull Request resolved: pytorch/pytorch#176452
is_from_source(source, target) previously only compared at the root of the ChainedSource hierarchy. This meant that is_from_source(AttrSource(X, 'c'), X) returned False when X was itself a ChainedSource (e.g. UnspecializedNNModuleSource(GlobalSource(...))), because the function walked past X all the way to the root before comparing. Check source == target at each level before recursing so that intermediate sources are correctly recognized as ancestors. Authored with Claude. ghstack-source-id: d8c0b4b Pull Request resolved: pytorch/pytorch#176452
Stack from ghstack (oldest at bottom):
is_from_source(source, target) previously only compared at the root of
the ChainedSource hierarchy. This meant that
is_from_source(AttrSource(X, 'c'), X) returned False when X was itself
a ChainedSource (e.g. UnspecializedNNModuleSource(GlobalSource(...))),
because the function walked past X all the way to the root before
comparing.
Check source == target at each level before recursing so that
intermediate sources are correctly recognized as ancestors.
Authored with Claude.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @Lucaskabela @jataylo