Skip to content

Fix aten::any.dim truthiness for numeric tensors#4353

Open
fallintoplace wants to merge 1 commit into
pytorch:mainfrom
fallintoplace:fix-any-dim-numeric-truthiness
Open

Fix aten::any.dim truthiness for numeric tensors#4353
fallintoplace wants to merge 1 commit into
pytorch:mainfrom
fallintoplace:fix-any-dim-numeric-truthiness

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

  • Convert numeric aten::any.dim inputs into an explicit nonzero mask before reducing.
  • Keep bool inputs on the existing bool-to-int reduction path.
  • Add deterministic regression tests for cancelling numeric values and negative nonzero values.

Testing

  • git diff --check
  • bazelisk test //tests/core/conversion/converters:test_reduce was attempted locally. The first run was blocked by missing PyTorch; after installing PyTorch in a local venv and setting TORCH_PATH, Bazel stayed in analysis for several minutes on this local machine and was interrupted before running tests.

@meta-cla meta-cla Bot added the cla signed label Jun 20, 2026
@github-actions github-actions Bot added component: tests Issues re: Tests component: conversion Issues re: Conversion stage component: core Issues re: The core compiler component: converters Issues re: Specific op converters labels Jun 20, 2026
@github-actions github-actions Bot requested a review from zewenli98 June 20, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: core Issues re: The core compiler component: tests Issues re: Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant