Skip to content

Port ps_roi_pool (MPS) to stable ABI. - #9618

Merged
adabeyta merged 2 commits into
mainfrom
adabeyta/ps-roi-pool-mps-stable
Aug 20, 2026
Merged

adabeyta merged 2 commits into
mainfrom
adabeyta/ps-roi-pool-mps-stable

Conversation

@adabeyta

@adabeyta adabeyta commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Ports ps_roi_pool's MPS kernels to the stable ABI.

Notes

  • Shader source moves to ps_roi_pool_metal_shader.h.
  • The MPS backward accumulates with atomic_add, so it is nondeterministic and has to say so when torch.use_deterministic_algorithms(True) is set. A stable-ABI kernel cannot reach at::globalContext(), so the alert moves to the autograd wrapper in _autograd_registrations.py. Follows the roi_align port (Port roi_align (MPS) to stable ABI. #9612).

Stable-ABI audit (torch-abi-audit)

Ran torch-abi-audit. ps_roi_pool's MPS op moves into the fully-STABLE _C_stable.so and pulls in no new shim symbols. The unstable _C.so count is unchanged at 53: ps_roi_pool's MPS sources shared their unstable-API surface with the still-legacy kernels, so no symbol is uniquely removed until those migrate.

    Package: torchvision
      Torch ABI:   UNSTABLE
      CPython ABI: n/a
      Bundled libs: 3
      -- bundled libs --
        [UNSTABLE] [not-abi3] _C.so            (stable_shim=0,  unstable=53)
        [STABLE  ] [not-abi3] _C_stable.so     (stable_shim=78, unstable=0)
        [STABLE  ] [not-abi3] image_stable.so  (stable_shim=70, unstable=0)

@pytorch-bot

pytorch-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9618

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 Unclassified Failure

As of commit 64d27fd with merge base d165b02 (image):

UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the cla signed label Aug 19, 2026
@adabeyta adabeyta changed the title [Test] Port ps_roi_pool (MPS) to stable ABI. Port ps_roi_pool (MPS) to stable ABI. Aug 20, 2026
@adabeyta
adabeyta marked this pull request as ready for review August 20, 2026 12:54
@adabeyta
adabeyta requested a review from NicolasHug August 20, 2026 12:54

@NicolasHug NicolasHug left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Stamping, thanks @adabeyta !

@adabeyta
adabeyta merged commit d217000 into main Aug 20, 2026
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants