Repository: pytorch
Issue: RuntimeError: test_autograd failed! Build success, test failed on IBM POWER9
Labels: module: autograd,triaged,module: POWER

I followed https://github.com/pytorch/pytorch#from-source and tried to compile the lastest version of pytorch from source.

The compile and install was success. But It cannot pass the test on your repo: `pytorch/test/run_test.py`.

- Target system:

```
  Operating System: Red Hat Enterprise Linux
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.6:GA:server
            Kernel: Linux 4.14.0-115.7.1.el7a.ppc64le
      Architecture: ppc64-le
```

- Build log:

[compile.log](https://github.com/Mon-ius/bluebear_hpc/blob/master/compile.log)

- Test log: 
```
python pytorch/test/run_test.py
Fail to import hypothesis in common_utils, tests are not derandomized
Test executor: ['/rds/bear-apps/2019b/EL7-power9/software/Python/3.7.4-GCCcore-8.3.0/bin/python']
Running test_autograd ... [2020-07-28 10:58:52.759418]
Fail to import hypothesis in common_utils, tests are not derandomized
..........................s....................s............test_autograd.py:396: UserWarning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the gradient for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch/pull/30531 for more informations.
  self.assertIsNone(x.grad)
..test_autograd.py:448: UserWarning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the gradient for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch/pull/30531 for more informations.
  self.assertIsNone(x_list[0].grad)
test_autograd.py:455: UserWarning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the gradient for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch/pull/30531 for more informations.
  self.assertIsNone(x_list[i].grad)
...........................Running CPU test
---------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Name                         Self CPU total %  Self CPU total   CPU total %      CPU total        CPU time avg     CPU Mem          Self CPU Mem     CUDA Mem         Self CUDA Mem    Number of Calls  Input Shapes
---------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
aten::empty                  7.88%            13.728us         7.88%            13.728us         4.576us          1.19 Kb          1.19 Kb          0 b              0 b              3                [[], [], [], [], [], []]
test_user_scope_alloc        70.20%           122.282us        89.88%           156.549us        156.549us        800 b            -208 b           0 b              0 b              1                []
aten::rand                   7.26%            12.639us         15.85%           27.611us         27.611us         800 b            0 b              0 b              0 b              1                [[], [], [], [], []]
aten::uniform_               6.51%            11.345us         6.51%            11.345us         11.345us         0 b              0 b              0 b              0 b              1                [[10, 10], [], [], []]
test_user_scope_dealloc      8.14%            14.185us         10.12%           17.630us         17.630us         -800 b           -1008 b          0 b              0 b              1                []
---------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Self CPU time total: 174.179us

Running CUDA test
---------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Name                         Self CPU total %  Self CPU total   CPU total %      CPU total        CPU time avg     CPU Mem          Self CPU Mem     CUDA Mem         Self CUDA Mem    Number of Calls  Input Shapes
---------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
test_user_scope_alloc        1.36%            30.986us         99.27%           2.266ms          2.266ms          0 b              -1008 b          1.00 Kb          0 b              1                []
aten::to                     0.45%            10.166us         97.11%           2.216ms          2.216ms          0 b              0 b              1.00 Kb          0 b              1                [[10, 10], [], [], [], [], [], [], []]
aten::empty_strided          0.54%            12.428us         0.54%            12.428us         12.428us         0 b              0 b              1.00 Kb          1.00 Kb          1                [[], [], [], [], [], []]
aten::empty                  0.40%            9.124us          0.40%            9.124us          3.041us          1.19 Kb          1.19 Kb          0 b              0 b              3                [[], [], [], [], [], []]
aten::rand                   0.32%            7.415us          0.65%            14.765us         14.765us         800 b            0 b              0 b              0 b              1                [[], [], [], [], []]
aten::uniform_               0.20%            4.615us          0.20%            4.615us          4.615us          0 b              0 b              0 b              0 b              1                [[10, 10], [], [], []]
aten::copy_                  96.12%           2.194ms          96.12%           2.194ms          2.194ms          0 b              0 b              0 b              0 b              1                [[10, 10], [10, 10], []]
test_user_scope_dealloc      0.60%            13.704us         0.73%            16.710us         16.710us         0 b              -208 b           -1.00 Kb         -1.00 Kb         1                []
---------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Self CPU time total: 2.282ms

.....x......../castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/nn/functional.py:1940: UserWarning: Argument order of nn.functional.embedding_bag was changed. Usage `embedding_bag(weight, input, ...)` is deprecated, and should now be `embedding_bag(input, weight, ...)`.
  warnings.warn("Argument order of nn.functional.embedding_bag was changed. "
................
==================================================================================================================================================================================
TEST
-----------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Name                           Self CPU total %  Self CPU total   CPU total %      CPU total        CPU time avg     Number of Calls  Input Shapes
-----------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
aten::sigmoid_                 0.67%            660.535us        0.68%            665.068us        665.068us        1                [[3, 20]]
aten::lstm                     0.61%            601.319us        5.73%            5.614ms          5.614ms          1                [[5, 3, 10], [], [], [], [], [], [], [], []]
aten::lstm                     0.56%            543.996us        5.73%            5.614ms          5.614ms          1                [[5, 3, 10], [], [], [], [], [], [], [], []]
aten::lstm                     0.55%            543.607us        5.61%            5.498ms          5.498ms          1                [[5, 3, 10], [], [], [], [], [], [], [], []]
aten::lstm                     0.55%            535.678us        5.50%            5.392ms          5.392ms          1                [[5, 3, 10], [], [], [], [], [], [], [], []]
aten::lstm                     0.54%            526.055us        5.43%            5.321ms          5.321ms          1                [[5, 3, 10], [], [], [], [], [], [], [], []]
aten::lstm                     0.49%            483.094us        5.32%            5.213ms          5.213ms          1                [[5, 3, 10], [], [], [], [], [], [], [], []]
aten::lstm                     0.48%            473.716us        4.95%            4.848ms          4.848ms          1                [[5, 3, 10], [], [], [], [], [], [], [], []]
aten::lstm                     0.48%            468.542us        4.76%            4.666ms          4.666ms          1                [[5, 3, 10], [], [], [], [], [], [], [], []]
aten::lstm                     0.46%            446.778us        4.61%            4.520ms          4.520ms          1                [[5, 3, 10], [], [], [], [], [], [], [], []]
-----------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Self CPU time total: 97.990ms

-----------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Name                           Self CPU total %  Self CPU total   CPU total %      CPU total        CPU time avg     Number of Calls  Input Shapes
-----------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
aten::mul                      12.27%           12.027ms         13.79%           13.510ms         22.517us         600              [[3, 20], [3, 20]]
aten::lstm                     9.42%            9.229ms          98.03%           96.058ms         4.803ms          20               [[5, 3, 10], [], [], [], [], [], [], [], []]
aten::sigmoid_                 7.94%            7.784ms          10.75%           10.536ms         17.560us         600              [[3, 20]]
aten::addmm                    6.86%            6.725ms          10.79%           10.569ms         52.845us         200              [[80], [3, 20], [20, 80], [], []]
aten::slice                    4.91%            4.808ms          6.12%            5.996ms          7.495us          800              [[3, 80], [], [], [], []]
aten::unsafe_split             4.68%            4.585ms          13.71%           13.432ms         67.162us         200              [[3, 80], [], []]
aten::tanh                     3.32%            3.252ms          6.26%            6.133ms          30.665us         200              [[3, 20]]
aten::empty                    3.03%            2.965ms          3.03%            2.965ms          2.512us          1180             [[], [], [], [], [], []]
aten::narrow                   2.91%            2.851ms          9.03%            8.847ms          11.059us         800              [[3, 80], [], [], []]
aten::sigmoid                  2.81%            2.752ms          2.81%            2.752ms          4.586us          600              [[3, 20], [3, 20]]
-----------------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Self CPU time total: 97.990ms

Total time based on python measurements:  101.534ms
CPU time measurement python side overhead: 3.62%
....
--------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Name                  Self CPU total %  Self CPU total   CPU total %      CPU total        CPU time avg     Number of Calls  Input Shapes
--------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
aten::t               14.26%           22.876us         19.15%           30.714us         30.714us         1                []
aten::transpose       2.70%            4.329us          4.89%            7.838us          7.838us          1                []
aten::as_strided      2.19%            3.509us          2.19%            3.509us          3.509us          1                []
aten::addmm           50.89%           81.608us         80.85%           129.659us        129.659us        1                []
aten::empty           1.61%            2.582us          1.61%            2.582us          2.582us          1                []
aten::expand          2.71%            4.354us          3.66%            5.871us          5.871us          1                []
aten::as_strided      0.95%            1.517us          0.95%            1.517us          1.517us          1                []
aten::copy_           23.81%           38.182us         24.69%           39.598us         39.598us         1                []
aten::stride          0.88%            1.416us          0.88%            1.416us          1.416us          1                []
--------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Self CPU time total: 160.373us

..
--------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Name                  Self CPU total %  Self CPU total   CPU total %      CPU total        CPU time avg     Number of Calls  Input Shapes
--------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
aten::t               11.55%           57.457us         11.55%           57.457us         57.457us         1                [[30, 20]]
aten::transpose       3.93%            19.533us         3.93%            19.533us         19.533us         1                [[30, 20], [], []]
aten::as_strided      0.97%            4.848us          0.97%            4.848us          4.848us          1                [[30, 20], [], [], []]
aten::addmm           32.03%           159.313us        32.03%           159.313us        159.313us        1                [[30], [128, 20], [20, 30], [], []]
aten::empty           0.77%            3.820us          0.77%            3.820us          3.820us          1                [[], [], [], [], [], []]
aten::expand          2.51%            12.504us         2.51%            12.504us         12.504us         1                [[30], [], []]
aten::as_strided      0.41%            2.055us          0.41%            2.055us          2.055us          1                [[30], [], [], []]
aten::copy_           7.60%            37.790us         7.60%            37.790us         37.790us         1                [[128, 30], [128, 30], []]
aten::stride          0.24%            1.172us          0.24%            1.172us          1.172us          1                [[128, 30], []]
aten::t               4.31%            21.433us         4.31%            21.433us         21.433us         1                [[40, 30]]
aten::transpose       1.67%            8.283us          1.67%            8.283us          8.283us          1                [[40, 30], [], []]
aten::as_strided      0.38%            1.898us          0.38%            1.898us          1.898us          1                [[40, 30], [], [], []]
aten::addmm           22.22%           110.504us        22.22%           110.504us        110.504us        1                [[40], [128, 30], [30, 40], [], []]
aten::empty           0.43%            2.119us          0.43%            2.119us          2.119us          1                [[], [], [], [], [], []]
aten::expand          1.57%            7.824us          1.57%            7.824us          7.824us          1                [[40], [], []]
aten::as_strided      0.33%            1.648us          0.33%            1.648us          1.648us          1                [[40], [], [], []]
aten::copy_           8.91%            44.334us         8.91%            44.334us         44.334us         1                [[128, 40], [128, 40], []]
aten::stride          0.16%            0.812us          0.16%            0.812us          0.812us          1                [[128, 40], []]
--------------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------  ---------------------------------------------
Self CPU time total: 497.347us

................................................................................................................................................................s..............s....................................s..s...............................................................................................................................................................s.......................................................test_autograd.py:6404: UserWarning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the gradient for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch/pull/30531 for more informations.
  self.assertIsNone(a.grad)
...........s...................................................../castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py:1430: UserWarning: This overload of nonzero is deprecated:
	nonzero()
Consider using one of the following signatures instead:
	nonzero(*, bool as_tuple) (Triggered internally at  /castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/download/t1/pytorch/torch/csrc/utils/python_arg_parser.cpp:797.)
  cond = ((det < 0) ^ (sign < 0)).nonzero()
...............s.......................................................................................................................................................................................................s........................................s...........s......................................s............................................................s.................EEEEE..........................................................test_autograd.py:6525: UserWarning: Mixed memory format inputs detected while calling the operator. The operator will output contiguous tensor even if some of the inputs are in channels_last format. (Triggered internally at  /castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/download/t1/pytorch/aten/src/ATen/native/TensorIterator.cpp:918.)
  (a * b).sum().backward()
test_autograd.py:6525: UserWarning: Mixed memory format inputs detected while calling the operator. The operator will output channels_last tensor even if some of the inputs are not in channels_last format. (Triggered internally at  /castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/download/t1/pytorch/aten/src/ATen/native/TensorIterator.cpp:924.)
  (a * b).sum().backward()
.................................................................................................................................................................s...........................................................................................................................................................................s........s...................................sssssssssssssss......................................................................................................................................................................test_autograd.py:6404: UserWarning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the gradient for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch/pull/30531 for more informations.
  self.assertIsNone(a.grad)
............ss..................................................ssssssssss...........................................sss.......................................................................................................................................................ss..................................................ssssss...............................................................................................................sssssssssssssssss......................................................................................sssssssssss..................................................................................................................................................................................................
======================================================================
ERROR: test_solve_batched_broadcast_A_cpu (__main__.TestAutogradDeviceTypeCPU)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 217, in instantiated_test
    return test(self, device_arg)
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 411, in dep_fn
    return fn(slf, device, *args, **kwargs)
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 411, in dep_fn
    return fn(slf, device, *args, **kwargs)
  File "test_autograd.py", line 4578, in do_test
    check(name)
  File "test_autograd.py", line 4495, in check
    output_variable, (self_variable,) + args_variable)
  File "test_autograd.py", line 4376, in run_grad_and_gradgrad_checks
    test_case.assertTrue(gradcheck(apply_method, input_variables, eps=1e-6, atol=PRECISION))
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 318, in gradcheck
    'numerical:%s\nanalytical:%s\n' % (i, j, n, a))
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 254, in fail_test
    raise RuntimeError(msg)
RuntimeError: Jacobian mismatch for output 0 with respect to input 0,
numerical:tensor([[-1.1024,  0.0000,  0.0000,  ...,  0.0000,  0.0000,  0.0000],
        [ 0.0000, -1.1024,  0.0000,  ...,  0.0000,  0.0000,  0.0000],
        [ 0.0000,  0.0000, -1.1024,  ...,  0.0000,  0.0000,  0.0000],
        ...,
        [ 0.0000,  0.0000,  0.0000,  ..., -2.4509,  0.0000,  0.0000],
        [ 0.0000,  0.0000,  0.0000,  ...,  0.0000, -2.4509,  0.0000],
        [ 0.0000,  0.0000,  0.0000,  ...,  0.0000,  0.0000, -2.4509]])
analytical:tensor([[-1.1024, -0.0000, -0.0000,  ..., -0.0000, -0.0000, -0.0000],
        [-0.0000, -1.1024, -0.0000,  ..., -0.0000, -0.0000, -0.0000],
        [-0.0000, -0.0000, -1.1024,  ..., -0.0000, -0.0000, -0.0000],
        ...,
        [-0.0000, -0.0000, -0.0000,  ..., -2.4509, -0.0000, -0.0000],
        [-0.0000, -0.0000, -0.0000,  ..., -0.0000, -2.4509, -0.0000],
        [-0.0000, -0.0000, -0.0000,  ..., -0.0000, -0.0000, -2.4509]])


======================================================================
ERROR: test_solve_batched_broadcast_b_cpu (__main__.TestAutogradDeviceTypeCPU)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 217, in instantiated_test
    return test(self, device_arg)
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 411, in dep_fn
    return fn(slf, device, *args, **kwargs)
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 411, in dep_fn
    return fn(slf, device, *args, **kwargs)
  File "test_autograd.py", line 4578, in do_test
    check(name)
  File "test_autograd.py", line 4495, in check
    output_variable, (self_variable,) + args_variable)
  File "test_autograd.py", line 4376, in run_grad_and_gradgrad_checks
    test_case.assertTrue(gradcheck(apply_method, input_variables, eps=1e-6, atol=PRECISION))
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 318, in gradcheck
    'numerical:%s\nanalytical:%s\n' % (i, j, n, a))
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 254, in fail_test
    raise RuntimeError(msg)
RuntimeError: Jacobian mismatch for output 0 with respect to input 0,
numerical:tensor([[ 1.5572e+00,  0.0000e+00,  0.0000e+00,  ...,  0.0000e+00,
          0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  1.5572e+00,  0.0000e+00,  ...,  0.0000e+00,
          0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  1.5572e+00,  ..., -3.6515e-01,
          0.0000e+00,  0.0000e+00],
        ...,
        [ 0.0000e+00,  0.0000e+00, -2.9233e-01,  ..., -1.9649e+00,
          0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  ...,  0.0000e+00,
          3.3414e+06,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  3.4512e+04,  ..., -8.2441e+05,
          0.0000e+00, -1.9649e+00]])
analytical:tensor([[ 1.5572,  0.0000,  0.0000,  ...,  0.0000,  0.0000,  0.0000],
        [ 0.0000,  1.5572,  0.0000,  ...,  0.0000,  0.0000,  0.0000],
        [ 0.0000,  0.0000,  1.5572,  ..., -0.3651,  0.0000,  0.0000],
        ...,
        [ 0.0000,  0.0000, -0.2923,  ..., -1.9649,  0.0000,  0.0000],
        [ 0.0000,  0.0000,  0.0000,  ...,  0.0000, -1.9649,  0.0000],
        [ 0.0000,  0.0000,  0.0000,  ...,  0.0000,  0.0000, -1.9649]])


======================================================================
ERROR: test_solve_batched_cpu (__main__.TestAutogradDeviceTypeCPU)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 217, in instantiated_test
    return test(self, device_arg)
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 411, in dep_fn
    return fn(slf, device, *args, **kwargs)
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 411, in dep_fn
    return fn(slf, device, *args, **kwargs)
  File "test_autograd.py", line 4578, in do_test
    check(name)
  File "test_autograd.py", line 4495, in check
    output_variable, (self_variable,) + args_variable)
  File "test_autograd.py", line 4376, in run_grad_and_gradgrad_checks
    test_case.assertTrue(gradcheck(apply_method, input_variables, eps=1e-6, atol=PRECISION))
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 318, in gradcheck
    'numerical:%s\nanalytical:%s\n' % (i, j, n, a))
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 254, in fail_test
    raise RuntimeError(msg)
RuntimeError: Jacobian mismatch for output 0 with respect to input 0,
numerical:tensor([[-1.4058,  0.0000,  0.0000,  ...,  0.0000,  0.0000,  0.0000],
        [ 0.0000, -1.4058,  0.0000,  ...,  0.0000,  0.0000,  0.0000],
        [ 0.0000,  0.0000, -1.4058,  ...,  0.0000,  0.0000,  0.0000],
        ...,
        [ 0.0000,  0.0000,  0.0000,  ..., -0.5886,  0.0000,  0.0000],
        [ 0.0000,  0.0000,  0.0000,  ...,  0.0000, -0.5886,  0.0000],
        [ 0.0000,  0.0000,  0.0000,  ...,  0.0000,  0.0000, -0.5886]])
analytical:tensor([[-1.4058, -0.0000, -0.0000,  ..., -0.0000, -0.0000, -0.0000],
        [-0.0000, -1.4058, -0.0000,  ..., -0.0000, -0.0000, -0.0000],
        [-0.0000, -0.0000, -1.4058,  ..., -0.0000, -0.0000, -0.0000],
        ...,
        [ 0.0000,  0.0000,  0.0000,  ..., -0.5886,  0.0000,  0.0000],
        [ 0.0000,  0.0000,  0.0000,  ...,  0.0000, -0.5886,  0.0000],
        [ 0.0000,  0.0000,  0.0000,  ...,  0.0000,  0.0000, -0.5886]])


======================================================================
ERROR: test_solve_batched_dims_cpu (__main__.TestAutogradDeviceTypeCPU)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 217, in instantiated_test
    return test(self, device_arg)
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 411, in dep_fn
    return fn(slf, device, *args, **kwargs)
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 411, in dep_fn
    return fn(slf, device, *args, **kwargs)
  File "test_autograd.py", line 4578, in do_test
    check(name)
  File "test_autograd.py", line 4495, in check
    output_variable, (self_variable,) + args_variable)
  File "test_autograd.py", line 4376, in run_grad_and_gradgrad_checks
    test_case.assertTrue(gradcheck(apply_method, input_variables, eps=1e-6, atol=PRECISION))
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 318, in gradcheck
    'numerical:%s\nanalytical:%s\n' % (i, j, n, a))
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 254, in fail_test
    raise RuntimeError(msg)
RuntimeError: Jacobian mismatch for output 0 with respect to input 0,
numerical:tensor([[-1.3716e+00,  0.0000e+00,  0.0000e+00,  ...,  0.0000e+00,
          0.0000e+00,  0.0000e+00],
        [ 0.0000e+00, -1.3716e+00,  0.0000e+00,  ...,  0.0000e+00,
          0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00, -1.3716e+00,  ...,  0.0000e+00,
          1.2209e+05, -2.0068e+06],
        ...,
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  ...,  6.6108e-01,
          0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  ...,  0.0000e+00,
          6.6108e-01,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  ...,  0.0000e+00,
          0.0000e+00,  6.6108e-01]])
analytical:tensor([[-1.3716, -0.0000, -0.0000,  ..., -0.0000, -0.0000, -0.0000],
        [-0.0000, -1.3716, -0.0000,  ..., -0.0000, -0.0000, -0.0000],
        [-0.0000, -0.0000, -1.3716,  ..., -0.0000, -0.0000, -0.0000],
        ...,
        [-0.0000, -0.0000, -0.0000,  ...,  0.6611, -0.0000, -0.0000],
        [-0.0000, -0.0000, -0.0000,  ..., -0.0000,  0.6611, -0.0000],
        [-0.0000, -0.0000, -0.0000,  ..., -0.0000, -0.0000,  0.6611]])


======================================================================
ERROR: test_solve_cpu (__main__.TestAutogradDeviceTypeCPU)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 217, in instantiated_test
    return test(self, device_arg)
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 411, in dep_fn
    return fn(slf, device, *args, **kwargs)
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 411, in dep_fn
    return fn(slf, device, *args, **kwargs)
  File "test_autograd.py", line 4578, in do_test
    check(name)
  File "test_autograd.py", line 4495, in check
    output_variable, (self_variable,) + args_variable)
  File "test_autograd.py", line 4376, in run_grad_and_gradgrad_checks
    test_case.assertTrue(gradcheck(apply_method, input_variables, eps=1e-6, atol=PRECISION))
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 318, in gradcheck
    'numerical:%s\nanalytical:%s\n' % (i, j, n, a))
  File "/castles/nr/projects/d/duanj-ai-in-medical-imaging/.share/conda-env/ml/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 254, in fail_test
    raise RuntimeError(msg)
RuntimeError: Jacobian mismatch for output 0 with respect to input 0,
numerical:tensor([[ 4.5298e-02,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -1.0323e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -5.7405e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          3.9117e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          1.1132e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  4.5298e-02,  0.0000e+00,  7.2978e+05,  0.0000e+00,
          0.0000e+00, -1.0323e+00,  0.0000e+00, -5.2158e+05,  0.0000e+00,
          0.0000e+00, -5.7405e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  3.9117e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  1.1132e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  4.5298e-02,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -1.0323e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -5.7405e-01,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  3.9117e-01,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  1.1132e-01,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  4.5298e-02,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -1.0323e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -5.7405e-01,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  3.9117e-01,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  1.1132e-01,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  4.5298e-02,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -1.0323e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -5.7405e-01,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  3.9117e-01,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  1.1132e-01],
        [ 1.3517e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -1.8863e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          1.8696e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -2.5184e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          3.1090e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  1.3517e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00, -1.8863e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  1.8696e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00, -2.5184e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  3.1090e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  1.3517e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -1.8863e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  1.8696e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -2.5184e-01,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  3.1090e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  1.3517e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -1.8863e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  1.8696e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -2.5184e-01,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  3.1090e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  1.3517e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -1.8863e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  1.8696e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -2.5184e-01,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  3.1090e+00],
        [ 8.5022e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          2.3292e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -3.9593e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -1.0826e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -5.0684e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  8.5022e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  2.3292e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00, -3.9593e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00, -1.0826e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00, -5.0684e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  8.5022e-01,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  2.3292e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -3.9593e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -1.0826e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -5.0684e-01,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  8.5022e-01,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  2.3292e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -3.9593e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -1.0826e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -5.0684e-01,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  8.5022e-01,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  2.3292e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -3.9593e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -1.0826e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -5.0684e-01],
        [ 5.5864e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          2.9273e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -7.1680e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -1.2809e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -1.8496e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  5.5864e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  2.9273e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00, -7.1680e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00, -1.2809e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00, -1.8496e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  5.5864e-01,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  2.9273e-01,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -7.1680e-01,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -1.2809e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -1.8496e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  5.5864e-01,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  2.9273e-01,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -7.1680e-01,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -1.2809e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -1.8496e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  5.5864e-01,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  2.9273e-01,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -7.1680e-01,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -1.2809e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -1.8496e+00],
        [-1.4141e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -4.1063e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -2.2933e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
         -6.5105e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          8.0350e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00, -1.4141e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00, -4.1063e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00, -2.2933e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00, -6.5105e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  8.0350e-01,  0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00, -1.4141e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -4.1063e-01,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -2.2933e-01,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00, -6.5105e-01,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  8.0350e-01,  0.0000e+00,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00, -1.4141e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -4.1063e-01,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -2.2933e-01,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00, -6.5105e-01,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  8.0350e-01,  0.0000e+00],
        [ 0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -1.4141e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -4.1063e-01,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -2.2933e-01,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00, -6.5105e-01,
          0.0000e+00,  0.0000e+00,  0.0000e+00,  0.0000e+00,  8.0350e-01]])
analytical:tensor([[ 0.0453, -0.0000, -0.0000, -0.0000, -0.0000, -1.0323, -0.0000, -0.0000,
         -0.0000, -0.0000, -0.5740, -0.0000, -0.0000, -0.0000, -0.0000,  0.3912,
         -0.0000, -0.0000, -0.0000, -0.0000,  0.1113, -0.0000, -0.0000, -0.0000,
         -0.0000],
        [-0.0000,  0.0453, -0.0000, -0.0000, -0.0000, -0.0000, -1.0323, -0.0000,
         -0.0000, -0.0000, -0.0000, -0.5740, -0.0000, -0.0000, -0.0000, -0.0000,
          0.3912, -0.0000, -0.0000, -0.0000, -0.0000,  0.1113, -0.0000, -0.0000,
         -0.0000],
        [-0.0000, -0.0000,  0.0453, -0.0000, -0.0000, -0.0000, -0.0000, -1.0323,
         -0.0000, -0.0000, -0.0000, -0.0000, -0.5740, -0.0000, -0.0000, -0.0000,
         -0.0000,  0.3912, -0.0000, -0.0000, -0.0000, -0.0000,  0.1113, -0.0000,
         -0.0000],
        [-0.0000, -0.0000, -0.0000,  0.0453, -0.0000, -0.0000, -0.0000, -0.0000,
         -1.0323, -0.0000, -0.0000, -0.0000, -0.0000, -0.5740, -0.0000, -0.0000,
         -0.0000, -0.0000,  0.3912, -0.0000, -0.0000, -0.0000, -0.0000,  0.1113,
         -0.0000],
        [-0.0000, -0.0000, -0.0000, -0.0000,  0.0453, -0.0000, -0.0000, -0.0000,
         -0.0000, -1.0323, -0.0000, -0.0000, -0.0000, -0.0000, -0.5740, -0.0000,
         -0.0000, -0.0000, -0.0000,  0.3912, -0.0000, -0.0000, -0.0000, -0.0000,
          0.1113],
        [ 1.3517, -0.0000, -0.0000, -0.0000, -0.0000, -1.8863, -0.0000, -0.0000,
         -0.0000, -0.0000,  1.8696, -0.0000, -0.0000, -0.0000, -0.0000, -0.2518,
         -0.0000, -0.0000, -0.0000, -0.0000,  3.1090, -0.0000, -0.0000, -0.0000,
         -0.0000],
        [-0.0000,  1.3517, -0.0000, -0.0000, -0.0000, -0.0000, -1.8863, -0.0000,
         -0.0000, -0.0000, -0.0000,  1.8696, -0.0000, -0.0000, -0.0000, -0.0000,
         -0.2518, -0.0000, -0.0000, -0.0000, -0.0000,  3.1090, -0.0000, -0.0000,
         -0.0000],
        [-0.0000, -0.0000,  1.3517, -0.0000, -0.0000, -0.0000, -0.0000, -1.8863,
         -0.0000, -0.0000, -0.0000, -0.0000,  1.8696, -0.0000, -0.0000, -0.0000,
         -0.0000, -0.2518, -0.0000, -0.0000, -0.0000, -0.0000,  3.1090, -0.0000,
         -0.0000],
        [-0.0000, -0.0000, -0.0000,  1.3517, -0.0000, -0.0000, -0.0000, -0.0000,
         -1.8863, -0.0000, -0.0000, -0.0000, -0.0000,  1.8696, -0.0000, -0.0000,
         -0.0000, -0.0000, -0.2518, -0.0000, -0.0000, -0.0000, -0.0000,  3.1090,
         -0.0000],
        [-0.0000, -0.0000, -0.0000, -0.0000,  1.3517, -0.0000, -0.0000, -0.0000,
         -0.0000, -1.8863, -0.0000, -0.0000, -0.0000, -0.0000,  1.8696, -0.0000,
         -0.0000, -0.0000, -0.0000, -0.2518, -0.0000, -0.0000, -0.0000, -0.0000,
          3.1090],
        [ 0.8502,  0.0000,  0.0000,  0.0000,  0.0000,  2.3292,  0.0000,  0.0000,
          0.0000,  0.0000, -3.9593,  0.0000,  0.0000,  0.0000,  0.0000, -1.0826,
          0.0000,  0.0000,  0.0000,  0.0000, -0.5068,  0.0000,  0.0000,  0.0000,
          0.0000],
        [ 0.0000,  0.8502,  0.0000,  0.0000,  0.0000,  0.0000,  2.3292,  0.0000,
          0.0000,  0.0000,  0.0000, -3.9593,  0.0000,  0.0000,  0.0000,  0.0000,
         -1.0826,  0.0000,  0.0000,  0.0000,  0.0000, -0.5068,  0.0000,  0.0000,
          0.0000],
        [ 0.0000,  0.0000,  0.8502,  0.0000,  0.0000,  0.0000,  0.0000,  2.3292,
          0.0000,  0.0000,  0.0000,  0.0000, -3.9593,  0.0000,  0.0000,  0.0000,
          0.0000, -1.0826,  0.0000,  0.0000,  0.0000,  0.0000, -0.5068,  0.0000,
          0.0000],
        [ 0.0000,  0.0000,  0.0000,  0.8502,  0.0000,  0.0000,  0.0000,  0.0000,
          2.3292,  0.0000,  0.0000,  0.0000,  0.0000, -3.9593,  0.0000,  0.0000,
          0.0000,  0.0000, -1.0826,  0.0000,  0.0000,  0.0000,  0.0000, -0.5068,
          0.0000],
        [ 0.0000,  0.0000,  0.0000,  0.0000,  0.8502,  0.0000,  0.0000,  0.0000,
          0.0000,  2.3292,  0.0000,  0.0000,  0.0000,  0.0000, -3.9593,  0.0000,
          0.0000,  0.0000,  0.0000, -1.0826,  0.0000,  0.0000,  0.0000,  0.0000,
         -0.5068],
        [ 0.5586,  0.0000,  0.0000,  0.0000,  0.0000,  0.2927,  0.0000,  0.0000,
          0.0000,  0.0000, -0.7168,  0.0000,  0.0000,  0.0000,  0.0000, -1.2809,
          0.0000,  0.0000,  0.0000,  0.0000, -1.8496,  0.0000,  0.0000,  0.0000,
          0.0000],
        [ 0.0000,  0.5586,  0.0000,  0.0000,  0.0000,  0.0000,  0.2927,  0.0000,
          0.0000,  0.0000,  0.0000, -0.7168,  0.0000,  0.0000,  0.0000,  0.0000,
         -1.2809,  0.0000,  0.0000,  0.0000,  0.0000, -1.8496,  0.0000,  0.0000,
          0.0000],
        [ 0.0000,  0.0000,  0.5586,  0.0000,  0.0000,  0.0000,  0.0000,  0.2927,
          0.0000,  0.0000,  0.0000,  0.0000, -0.7168,  0.0000,  0.0000,  0.0000,
          0.0000, -1.2809,  0.0000,  0.0000,  0.0000,  0.0000, -1.8496,  0.0000,
          0.0000],
        [ 0.0000,  0.0000,  0.0000,  0.5586,  0.0000,  0.0000,  0.0000,  0.0000,
          0.2927,  0.0000,  0.0000,  0.0000,  0.0000, -0.7168,  0.0000,  0.0000,
          0.0000,  0.0000, -1.2809,  0.0000,  0.0000,  0.0000,  0.0000, -1.8496,
          0.0000],
        [ 0.0000,  0.0000,  0.0000,  0.0000,  0.5586,  0.0000,  0.0000,  0.0000,
          0.0000,  0.2927,  0.0000,  0.0000,  0.0000,  0.0000, -0.7168,  0.0000,
          0.0000,  0.0000,  0.0000, -1.2809,  0.0000,  0.0000,  0.0000,  0.0000,
         -1.8496],
        [-1.4141, -0.0000, -0.0000, -0.0000, -0.0000, -0.4106, -0.0000, -0.0000,
         -0.0000, -0.0000, -0.2293, -0.0000, -0.0000, -0.0000, -0.0000, -0.6510,
         -0.0000, -0.0000, -0.0000, -0.0000,  0.8035, -0.0000, -0.0000, -0.0000,
         -0.0000],
        [-0.0000, -1.4141, -0.0000, -0.0000, -0.0000, -0.0000, -0.4106, -0.0000,
         -0.0000, -0.0000, -0.0000, -0.2293, -0.0000, -0.0000, -0.0000, -0.0000,
         -0.6510, -0.0000, -0.0000, -0.0000, -0.0000,  0.8035, -0.0000, -0.0000,
         -0.0000],
        [-0.0000, -0.0000, -1.4141, -0.0000, -0.0000, -0.0000, -0.0000, -0.4106,
         -0.0000, -0.0000, -0.0000, -0.0000, -0.2293, -0.0000, -0.0000, -0.0000,
         -0.0000, -0.6510, -0.0000, -0.0000, -0.0000, -0.0000,  0.8035, -0.0000,
         -0.0000],
        [-0.0000, -0.0000, -0.0000, -1.4141, -0.0000, -0.0000, -0.0000, -0.0000,
         -0.4106, -0.0000, -0.0000, -0.0000, -0.0000, -0.2293, -0.0000, -0.0000,
         -0.0000, -0.0000, -0.6510, -0.0000, -0.0000, -0.0000, -0.0000,  0.8035,
         -0.0000],
        [-0.0000, -0.0000, -0.0000, -0.0000, -1.4141, -0.0000, -0.0000, -0.0000,
         -0.0000, -0.4106, -0.0000, -0.0000, -0.0000, -0.0000, -0.2293, -0.0000,
         -0.0000, -0.0000, -0.0000, -0.6510, -0.0000, -0.0000, -0.0000, -0.0000,
          0.8035]])


----------------------------------------------------------------------
Ran 2377 tests in 4413.197s

FAILED (errors=5, skipped=83, expected failures=1)
Traceback (most recent call last):
  File "pytorch/test/run_test.py", line 744, in <module>
    main()
  File "pytorch/test/run_test.py", line 733, in main
    raise RuntimeError(err)
RuntimeError: test_autograd failed!
```

cc @ezyang @SsnL @albanD @zou3519 @gqchen