Skip to content

Conversation

@ssnl
Copy link
Collaborator

@ssnl ssnl commented Mar 8, 2018

btrifact's info is always an IntTensor. But when printing errors, we treat it as a real tensor, causing wrong error messages.

Before:

(Pdb) torch.btrifact(torch.zeros(1,3,3).cuda())
*** RuntimeError: failed to factorize some batch elements (min info == 1435440384, max info
 == 19942608) at /home/ssnl/sftp/pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:811
(Pdb) torch.btrifact(torch.zeros(1,3,3))
*** RuntimeError: failed to factorize batch element 0 (info == 1) at /home/ssnl/sftp/pytorc
h/aten/src/TH/generic/THTensorLapack.c:1020

After:

(Pdb) torch.btrifact(torch.zeros(1,3,3).cuda())
*** RuntimeError: failed to factorize some batch elements (min info == 1, max info == 1) at
 /home/ssnl/sftp/pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:811
(Pdb) torch.btrifact(torch.zeros(1,3,3))
*** RuntimeError: failed to factorize batch element 0 (info == 1) at /home/ssnl/sftp/pytorc
h/aten/src/TH/generic/THTensorLapack.c:1020

Copy link
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@soumith soumith merged commit 8f068bd into pytorch:master Mar 9, 2018
@ssnl ssnl deleted the cuda_btrifact_info_err_msg branch March 9, 2018 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants