Skip to content

[MLX] Add leaky_relu op handler#20305

Open
devin-lai wants to merge 1 commit into
pytorch:mainfrom
devin-lai:mlx-leaky-relu-handler
Open

[MLX] Add leaky_relu op handler#20305
devin-lai wants to merge 1 commit into
pytorch:mainfrom
devin-lai:mlx-leaky-relu-handler

Conversation

@devin-lai

@devin-lai devin-lai commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • Add MLX lowering for aten.leaky_relu.default using existing GreaterEqual, Multiply, and Where nodes.
  • Add focused MLX op tests for custom negative_slope values, including a slope above 1.

Test Plan:

  • python -m py_compile backends/mlx/ops.py backends/mlx/test/test_ops.py
  • git diff --check HEAD^..HEAD
  • PATH="$PWD/.venv-mlx/bin:$PATH" .venv-mlx/bin/lintrunner backends/mlx/ops.py backends/mlx/test/test_ops.py
  • .venv-mlx/bin/python -m executorch.backends.mlx.test.run_all_tests leaky_relu --timeout 180

Lower aten.leaky_relu.default with existing MLX graph nodes and add focused op tests for custom slopes, including slopes above 1.
@pytorch-bot

pytorch-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20305

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

⚠️ 13 Awaiting Approval, 1 Pending

As of commit 58efda7 with merge base e28ef13 (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 16, 2026
@devin-lai

Copy link
Copy Markdown
Contributor Author

@pytorchbot label "release notes: apple"

@pytorch-bot pytorch-bot Bot added the release notes: apple Changes to the Apple backend delegate label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: apple Changes to the Apple backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants