Skip to content

Conversation

@angelayi
Copy link
Contributor

Differential Revision: D87577206

Copilot AI review requested due to automatic review settings November 20, 2025 23:22
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 20, 2025

🔗 Helpful Links

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

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

❌ 2 New Failures

As of commit d1e0727 with merge base 33ec615 (image):

NEW FAILURES - The following jobs have failed:

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 Nov 20, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 20, 2025

@angelayi has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87577206.

@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the fake mode detection in the lift_constant_tensor_pass function by using the more robust _detect_fake_mode_from_gm utility function instead of directly accessing the fake mode from the first node's metadata. This addresses a known issue where the first node may not always have the expected metadata structure, particularly when the first node is a scalar.

  • Replaces brittle metadata access with a dedicated utility function
  • Imports _detect_fake_mode_from_gm from torch._export.utils
  • Adds a blank line for better code formatting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Summary:

it's not necessarily true that the 0th placeholder's meta["val"] contains a tensor. replaced this with _detect_fake_mode_from_gm which is safer

Reviewed By: cccclai

Differential Revision: D87577206
Copilot AI review requested due to automatic review settings December 2, 2025 21:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@meta-codesync meta-codesync bot merged commit 93bf861 into pytorch:main Dec 3, 2025
147 of 149 checks passed
@zingo
Copy link
Collaborator

zingo commented Dec 4, 2025

Hi this might have broken something in the Cortex-M backend.
https://hud.pytorch.org/hud/pytorch/executorch/main/1?per_page=50&name_filter=cortex-m
@oscarandersson8218 has a fix ongoing that will remove the Cortex-M scalar tests from add and mul ops as they don't make sense.

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. fb-exported meta-exported topic: not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants