8000 [regression] int_tensor.mean(dtype=float32) should work · Issue #76430 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content
[regression] int_tensor.mean(dtype=float32) should work #76430
@ssnl

Description

@ssnl

🐛 Describe the bug

#61643 broke the originally working case non_fp_tensor.mean(dtype=fp_dtype).

Original code checks

ScalarType scalarType = opt_dtype.has_value() ? opt_dtype.value() : self.scalar_type();

but the new code doesn't consider opt_dtype in checking:

at::isFloatingType(self_dtype) || at::isComplexType(self_dtype),

CC @ysiraichi who authored the PR, and @ezyang who merged it.

Versions

1.10+

Metadata

Metadata

Assignees

No one assigned

    Labels

    has workaroundmodule: reductionstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0