Skip to content

Incorrect det value on CPU #34061

@Alexander-H-Liu

Description

@Alexander-H-Liu

🐛 Bug

Incorrect det value on CPU

To Reproduce

import torch

torch.manual_seed(0)

for N in [100,350,400,401]:
    W = torch.qr(torch.FloatTensor(N, N).normal_())[0]
    print('C = {}, det on cpu/gpu = {:.6f} / {:.6f}'.format(N,W.det(),W.cuda().det()))

Expected behavior

C = 100, det on cpu/gpu = -0.999999 / -0.999999
C = 350, det on cpu/gpu = -173.111664 / -1.000001
C = 400, det on cpu/gpu = -0.000000 / -1.000002
C = 401, det on cpu/gpu = 0.000000 / 1.000001

Environment

Collecting environment information...
PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Ubuntu 16.04.3 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
CMake version: version 3.5.1

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 10.1.105
GPU models and configuration: 
GPU 0: GeForce GTX 1060 6GB
GPU 1: GeForce GTX 1080 Ti

Nvidia driver version: 440.44
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5

Versions of relevant libraries:
[pip3] numpy==1.18.1
[pip3] torch==1.4.0
[pip3] torchaudio==0.5.0a0+ac5dd79
[pip3] torchvision==0.5.0
[pip3] warpctc-pytorch==0.1
[conda] Could not collect

cc @VitalyFedyunin @vishwakftw @ssnl @jianyuh

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: cpuCPU specific problem (e.g., perf, algorithm)module: linear algebraIssues related to specialized linear algebra operations in PyTorch; includes matrix multiply matmultriagedThis 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