Skip to content

RFC-00xx-device-scoped-inductor-operator-policies#101

Closed
peaceorwell wants to merge 1 commit into
pytorch:masterfrom
peaceorwell:codex/rfc-device-scoped-inductor-operator-policies
Closed

RFC-00xx-device-scoped-inductor-operator-policies#101
peaceorwell wants to merge 1 commit into
pytorch:masterfrom
peaceorwell:codex/rfc-device-scoped-inductor-operator-policies

Conversation

@peaceorwell

Copy link
Copy Markdown

Summary

This RFC proposes an internal, immutable, cache-aware operator policy that lets Inductor backends make device-scoped decomposition, lowering, and fallback decisions without mutating process-wide tables.

The first version is intentionally limited to one active accelerator backend (plus CPU), compile-scoped decomposition selection, per-node lowering resolution, and policy identity in both AOTAutograd and Inductor FX graph cache keys.

Why this is a draft

The design and alternatives are ready for early inspection, but two Gate 0 artifacts still need to be attached before general review:

  • a current-main prototype proving device isolation and two-level cache separation;
  • a refreshed inventory of the torch_mlu patches removed by the proposed contract.

The PR should remain draft until those artifacts and the author's final technical review are complete.

Proposed implementation sequence

  1. Immutable policy model and cache identity plumbing.
  2. Device-scoped lowering registry.
  3. Device-scoped fallback sentinel.
  4. Compile-scoped decomposition provider.
  5. Atomic validation and backend-registration integration.

AI assistance disclosure

Codex was used to restructure and edit this draft from existing design notes.

This proposal is relevant to an existing out-of-tree Inductor integration that currently carries device-specific decomposition/lowering state and manual cache-key plumbing. The document explicitly marks unverified evidence and unresolved design choices; it is not being presented as ready for implementation.

@meta-cla

meta-cla Bot commented Jul 19, 2026

Copy link
Copy Markdown

Hi @peaceorwell!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@albanD
albanD requested review from eellison and jansel July 19, 2026 11:58
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