Skip to content

Commit

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

Test Plan: Please see GitHub Actions

Fix: #105243

Differential Revision: D47506482

Pull Request resolved: #105309
Approved by: https://github.com/IvanYashchuk
  • Loading branch information
isdanni authored and pytorchmergebot committed Jul 17, 2023
1 parent 8c479d3 commit 7f84d55
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 7f84d55

Please sign in to comment.