Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/195663
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 3165cb2 with merge base 29343e7 ( GREEN LIGHT - PR approved to be merged without human review:
reason: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Collaborator
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Sanskaaar1
pushed a commit
to Sanskaaar1/pytorch
that referenced
this pull request
Sep 8, 2026
…ch#195663) Forward fix for D117882973 (pytorch#189692), which broke `fbcode//caffe2/test/inductor:codegen_triton` at listing time. That diff added a new helper module `triton_constexpr_configs.py` next to `test_codegen_triton.py` and imported it with two OSS-only fallbacks: ``` try: from triton_constexpr_configs import ... # test/inductor on sys.path except ImportError: from test.inductor.triton_constexpr_configs import ... # pytorch repo root on sys.path ``` The file itself is packaged fine internally -- `:inductor_test_lib` uses `srcs = glob(["*.py"])`, so no BUCK change is needed -- but inside the PAR it resolves under the fbcode base module as `caffe2.test.inductor.triton_constexpr_configs`. Neither branch matches, so both raised `ModuleNotFoundError` and the whole module failed to import, taking down all 22 tests in the suite, not just the new ones: ``` ModuleNotFoundError: No module named 'triton_constexpr_configs' During handling of the above exception, another exception occurred: ModuleNotFoundError: No module named 'test.inductor' ``` Switch to the relative-first pattern already used elsewhere in this directory (`test_codecache.py`, `test_ck_backend.py`). The relative import resolves against whatever package the test module actually lives in, so it covers all three run modes: the fbcode PAR (`caffe2.test.inductor`), OSS pytest from the repo root (`test.inductor`), and `python test/inductor/test_codegen_triton.py` (no package, falls through to the bare import). This also matters beyond the import statement itself. The new `get_importable_constexpr_types` emits `from {type.__module__} import ...` into the generated Triton kernel source, so the helper module has to be reachable under its real package name for `test_user_defined_triton_kernel_non_builtin_constexpr` to compile and run. `xplat/caffe2` is updated to keep it in sync with `fbcode/caffe2`. Differential Revision: [D118378564](https://our.internmc.facebook.com/intern/diff/D118378564/) Pull Request resolved: pytorch#195663 Approved by: https://github.com/pytorchgreenlight
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.
Stack from ghstack (oldest at bottom):
Forward fix for D117882973 (#189692), which broke
fbcode//caffe2/test/inductor:codegen_tritonat listing time.That diff added a new helper module
triton_constexpr_configs.pynext totest_codegen_triton.pyand imported it with two OSS-only fallbacks:The file itself is packaged fine internally --
:inductor_test_libusessrcs = glob(["*.py"]), so no BUCK change is needed -- but inside the PAR itresolves under the fbcode base module as
caffe2.test.inductor.triton_constexpr_configs. Neither branch matches, soboth raised
ModuleNotFoundErrorand the whole module failed to import,taking down all 22 tests in the suite, not just the new ones:
Switch to the relative-first pattern already used elsewhere in this directory
(
test_codecache.py,test_ck_backend.py). The relative import resolvesagainst whatever package the test module actually lives in, so it covers all
three run modes: the fbcode PAR (
caffe2.test.inductor), OSS pytest from therepo root (
test.inductor), andpython test/inductor/test_codegen_triton.py(no package, falls through to the bare import).
This also matters beyond the import statement itself. The new
get_importable_constexpr_typesemitsfrom {type.__module__} import ...into the generated Triton kernel source, so the helper module has to be
reachable under its real package name for
test_user_defined_triton_kernel_non_builtin_constexprto compile and run.xplat/caffe2is updated to keep it in sync withfbcode/caffe2.Differential Revision: D118378564
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo