Skip to content

Isolate DeepCompile list-schedule test ops - #8319

Open
tohtana wants to merge 1 commit into
deepspeedai:masterfrom
tohtana:tohtana/fix-deepcompile-test-op-namespace
Open

Isolate DeepCompile list-schedule test ops#8319
tohtana wants to merge 1 commit into
deepspeedai:masterfrom
tohtana:tohtana/fix-deepcompile-test-op-namespace

Conversation

@tohtana

@tohtana tohtana commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Changes in #8033 and #8255 introduced flakiness in the modal tests.

DeepCompile's list-schedule fixture creates a Python DEF registration for DeepCompile’s production dc namespace, which conflicts with the native extension’s implicit C++ DEF registration (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.dc to 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.

Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant