Skip to content

Conversation

@YufengShi-dudu
Copy link
Collaborator

@YufengShi-dudu YufengShi-dudu commented May 15, 2025

  • Casting to floating-point dtypes should be rejected for delegation. Class ToCopySupported should guarantee this. However, the shallow copy used in func _merge_supported_types will modify the dict SUPPORTED_INT_TYPES unintentionally, merging the dict SUPPORTED_FLOAT_TYPES into SUPPORTED_INT_TYPES. Therefore, casting to floating-point dtypes can also pass the check under BI profile.
  • Fix it by using deepcopy.
  • Add unittest in test_to_copy.py to check the castings to FP dtypes are not delegated.

Change-Id: Ia5fce0c0284aa35fcd5a482fe11985573a00db8b

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218

- Casting to floating-point dtypes should be rejected for delegation.
  Class ToCopySupported should guarantee this. However, the shallow
  copy used in func _merge_supported_types will modify the dict
  SUPPORTED_INT_TYPES unintentionally, merging the dict
  SUPPORTED_FLOAT_TYPES into SUPPORTED_INT_TYPES.
  Therefore, casting to floating-point dtypes can also pass the check
  under BI profile.
- Fix it by using deepcopy.
- Add unittest in test_to_copy.py to check the castings to FP dtypes
  are not delegated.

Change-Id: Ia5fce0c0284aa35fcd5a482fe11985573a00db8b
Signed-off-by: Yufeng Shi <[email protected]>
@YufengShi-dudu YufengShi-dudu added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk topic: not user facing labels May 15, 2025
@pytorch-bot
Copy link

pytorch-bot bot commented May 15, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure, 1 Pending, 1 Unrelated Failure

As of commit b78b885 with merge base d069d65 (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@facebook-github-bot facebook-github-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 May 15, 2025
@YufengShi-dudu
Copy link
Collaborator Author

Unstable/Flaky tests:

-pull / unittest-arm-backend-with-no-fvp (test_pytest_ops) / linux-job (pull_request)
test_native_layer_norm_tosa_BI[randn_last_three_dims_no_bias]

-trunk / test-arm-backend (test_pytest_ops_ethosu_fvp) / linux-job (push)
backends/arm/test/ops/test_mul.py::test_mul_tensor_tosa_BI[op_mul_rank2_rand]

@zingo
Copy link
Collaborator

zingo commented May 15, 2025

I rebased it to trigger a test re-run to see if we can get the Arm tests green

@zingo
Copy link
Collaborator

zingo commented May 16, 2025

That worked, Arm tests are OK and other are as you mention unrelated

@zingo zingo added the release notes: none Do not include this in the release notes label May 16, 2025
@zingo zingo merged commit 4b67dc9 into pytorch:main May 16, 2025
180 of 182 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes topic: not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants