Skip to content

Commit

Permalink
[BE] Add actual dtype to RuntimeError in ADDMM_META()
Browse files Browse the repository at this point in the history
Summary: Include actual dtype in RuntimeError

Test Plan: Please see GitHub Actions

Differential Revision: D47506482

fbshipit-source-id: a82c03e2e6d2491d858f49dff20309aac43fc36f
  • Loading branch information
isdanni authored and facebook-github-bot committed Jul 17, 2023
1 parent 8c479d3 commit 9bb4f7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aten/src/ATen/native/LinearAlgebra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ namespace detail {
namespace meta {

#define ADDMM_META() \
TORCH_CHECK(self.scalar_type() == mat2.scalar_type(), "self and mat2 must have the same dtype"); \
TORCH_CHECK(mat1.scalar_type() == mat2.scalar_type(), "mat1 and mat2 must have the same dtype"); \
TORCH_CHECK(self.scalar_type() == mat2.scalar_type(), "self and mat2 must have the same dtype, but got ", self.scalar_type(), " and ", mat2.scalar_type()); \
TORCH_CHECK(mat1.scalar_type() == mat2.scalar_type(), "mat1 and mat2 must have the same dtype, but got ", mat1.scalar_type(), " and ", mat2.scalar_type()); \
TORCH_CHECK(mat1.dim() == 2, "mat1 must be a matrix, got ", mat1.dim(), "-D tensor"); \
TORCH_CHECK(mat2.dim() == 2, "mat2 must be a matrix, got ", mat2.dim(), "-D tensor"); \
TORCH_CHECK( \
Expand Down

0 comments on commit 9bb4f7c

Please sign in to comment.