Isolate DeepCompile list-schedule test ops - #8319
Conversation
Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f08c4c0aa4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| from deepspeed.compile.profilers import ProfilingResult | ||
| from deepspeed.compile.profilers.graph_profile import _backfill_missing_profile_metadata, is_profile_incomplete | ||
|
|
||
| _TEST_DC_NAMESPACE = "dc_list_schedule_test" |
There was a problem hiding this comment.
Add the required Signed-off-by trailer
This non-merge commit has no Signed-off-by trailer, violating the repository's mandatory commit policy and potentially failing DCO or commit-policy validation. Recreate the commit using git commit --signoff with the configured author identity.
AGENTS.md reference: AGENTS.md:L8-L8
Useful? React with 👍 / 👎.
Changes in #8033 and #8255 introduced flakiness in the modal tests.
DeepCompile's list-schedule fixture creates a Python
DEFregistration for DeepCompile’s productiondcnamespace, which conflicts with the native extension’s implicit C++DEFregistration (TORCH_LIBRARY(dc, m)) if the extension is first loaded later in the same pytest-xdist worker.Because xdist worker assignment and ordering vary, reruns may avoid placing both registrations in the same worker.
This PR defines list-schedule fake schemas in a unique test-only namespace and map
torch.ops.dcto that namespace only for the fixture lifetime. It also restores the original namespace after each test so a later native JIT load can register its operators normally.