KEMBAR78
The results of masked.log_softmax on MPS are inconsistent with those on CPU · Issue #111416 · pytorch/pytorch · GitHub
Skip to content

The results of masked.log_softmax on MPS are inconsistent with those on CPU #111416

@CaoE

Description

@CaoE

🐛 Describe the bug

The output of masked.log_softmax on CPU with inputs of cpu_args: [tensor(-8.4844, dtype=torch.float16, requires_grad=True), 0] and cpu_kwargs: {'mask': tensor(False)}, i.e., the masked element, is nan. While the result on MPS is 0. https://github.com/pytorch/pytorch/actions/runs/6542102776/job/17764726988.
masked.softmax and masked.softmin should have the same issue.

Versions

PyTorch: main branch.

cc @jbschlosser @bhosmer @cpuhrsch @erichan1 @drisspg @mikaylagawarecki @kulinseth @albanD @malfet @DenisVieriu97 @razarmehr @abhudev @ezyang @gchanan @zou3519 @kadeng

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: correctness (silent)issue that returns an incorrect result silentlymodule: mpsRelated to Apple Metal Performance Shaders frameworktriagedThis 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