Skip to content

Multiply a bfloat16 tensor with a double tensor leads to RuntimeError #40580

@xuhdev

Description

@xuhdev

🐛 Bug

To Reproduce

Steps to reproduce the behavior:

import torch
torch.tensor(1, dtype=torch.bfloat16) * torch.tensor(1, dtype=torch.double)

Error message

RuntimeError: common_dtype_ != ScalarType::Undefined INTERNAL ASSERT FAILED at "/pytorch/aten/src/ATen/native/TensorIterator.cpp":89, please report a bug to PyTorch.

Expected behavior

No RuntimeError should be raised.

Environment

PyTorch version: 1.6.0.dev20200625+cu101
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Debian GNU/Linux 10 (buster)
GCC version: (Debian 8.3.0-6) 8.3.0
CMake version: version 3.16.3

Python version: 3.7
Is CUDA available: No
CUDA runtime version: 10.1.243
GPU models and configuration: GPU 0: Quadro P400
Nvidia driver version: 440.82
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.17.2
[pip3] torch==1.6.0.dev20200625+cu101
[conda] Could not collect

cc @mruberry

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: bfloat16triagedThis 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