[MLX] Add aten.bitwise_or op handler#19869
Conversation
Add MLX delegate support for aten.bitwise_or Tensor and Scalar overloads, following the existing bitwise_and path through the FlatBuffer schema, Python op handler, C++ interpreter, and tests. Fixes pytorch#18926.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19869
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Cancelled Job, 2 Unrelated FailuresAs of commit ab83bbb with merge base 37effad ( CANCELLED JOB - The following job was cancelled. Please retry:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "release notes: apple" |
|
@claude review |
|
Claude finished @nil-is-all's task in 2m 43s —— View job Code Review: [MLX] Add aten.bitwise_or op handler
Verdict: Looks good. This is a clean, well-structured addition that follows the exact same pattern as the existing DetailsSchema (
Runtime (
Python ops (
Tests (
No correctness, performance, or compatibility concerns. The implementation correctly leverages MLX's native |
|
LGTM...let's see what CI says |
|
|
|
@devin-lai it looks like [MLX / backend-tester (models) / test-mlx-backend-models (push)] is failing. Can you have a look at why? |
ok. I checked the logs for the failing push run. The job failed because the MLX model suite allows up to 3 failures, but this run had 4 The 3 failures that also appear in the passing PR-triggered run are:
The extra failure in the push run is:
That one failed with a numerical output mismatch, not with a missing op, serialization issue, or anything obviously related to the bitwise_or change. The same SHA passed the PR-triggered MLX backend-models job with exactly 3 failures, and the MLX operator job passed. This looks like a flaky/threshold-sensitive MLX model-suite failure rather than a regression from this PR. I tried to rerun the failed push job directly, but GitHub requires admin rights on pytorch/executorch. Could someone with permission rerun the failed job/run? If it reproduces, I can help look into the Inception V3 dynamic-shape case separately |
Re-running CI. Let's see if it passes now. |
|
Looks like it passes now. Thanks for the contribution @devin-lai! |
Summary:
aten.bitwise_orTensor and Scalar overloads.bitwise_orin the runtime interpreter.Fixes #18926.
Testing:
cmake --build cmake-out-mlx --target op_test_runner -j2PATH="$PWD/.venv-mlx/bin:$PATH" .venv-mlx/bin/python -m executorch.backends.mlx.test.run_all_tests bitwise_or_bool bitwise_or_int bitwise_or_scalar --timeout 180cmake --build cmake-out-mlx --target strict_compile_test -j2git diff --checkpy_compileon changed Python fileslintrunner --take FLAKE8,CLANGFORMAT,NEWLINE,ETCAPITAL,LICENSELINTon touched filescc @metascroy