# Vertices=torch.matmul(vertices.unsqueeze(0), rotations\_init), RuntimeError: CUDA error: CUBLAS\_STATUS\_EXECUTION\_FAILED when calling \`cublasSgemmStridedBatched in CentOS

**URL:** <https://discuss.pytorch.org/t/vertices-torch-matmul-vertices-unsqueeze-0-rotations-init-runtimeerror-cuda-error-cublas-status-execution-failed-when-calling-cublassgemmstridedbatched-in-centos/116123>\
**Category:** Uncategorized\
**Created:** [March 26, 2021, 9:15pm UTC](https://discuss.pytorch.org/t/vertices-torch-matmul-vertices-unsqueeze-0-rotations-init-runtimeerror-cuda-error-cublas-status-execution-failed-when-calling-cublassgemmstridedbatched-in-centos/116123 "2021-03-26T21:15:51Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Mona\_Jalal](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/mona_jalal/32/25715_2.png) [@Mona\_Jalal](https://discuss.pytorch.org/u/Mona_Jalal)\
**Post date:** [March 30, 2021, 8:00pm UTC](https://discuss.pytorch.org/t/vertices-torch-matmul-vertices-unsqueeze-0-rotations-init-runtimeerror-cuda-error-cublas-status-execution-failed-when-calling-cublassgemmstridedbatched-in-centos/116123/12 "2021-03-30T20:00:09Z")

</div>

someone ran [Matrix inversion fails on GPU (google Colab)](https://discuss.pytorch.org/t/matrix-inversion-fails-on-gpu-google-colab/59719) and had same exact problem as me but I don’t have a problem running this  
I ran this and there was no problem

```auto
import torch
dim = 100
# CPU inversion
A = torch.rand(dim,dim,device='cpu')
Ainv = A.inverse()
print(torch.matmul(A,Ainv))

# GPU inversion
A = A.to('cuda')
Ainv = A.inverse()
print(torch.matmul(A,Ainv))

```

result was

```auto
tensor([[ 1.0000e+00, 6.5939e-06, 1.2953e-06, ..., 5.2452e-06,
         -5.4836e-06, 1.6689e-06],
        [-2.6617e-06, 1.0000e+00, 1.5359e-06, ..., 7.6294e-06,
          2.3842e-07, 2.0266e-06],
        [ 6.7785e-06, 6.1743e-06, 1.0000e+00, ..., 7.1526e-06,
         -1.5497e-06, -4.7684e-07],
        ...,
        [-3.3288e-06, 1.0316e-06, 5.7282e-07, ..., 1.0000e+00,
          1.1921e-06, -2.3842e-07],
        [ 7.4506e-07, 1.9073e-06, 7.1526e-07, ..., 3.3379e-06,
          1.0000e+00, 2.8610e-06],
        [ 9.2387e-07, -1.0252e-05, -8.6427e-07, ..., -4.5300e-06,
          7.0781e-06, 1.0000e+00]])
tensor([[ 1.0000e+00, 2.3842e-07, 5.9605e-08, ..., 2.3842e-07,
          0.0000e+00, 1.1921e-07],
        [ 5.9605e-08, 1.0000e+00, -3.5763e-07, ..., 2.3842e-07,
         -5.9605e-08, -2.3842e-07],
        [-2.8312e-07, 2.7418e-06, 1.0000e+00, ..., 1.7881e-07,
          2.9802e-07, 1.7881e-07],
        ...,
        [ 2.6822e-07, 2.3842e-07, 2.3842e-07, ..., 1.0000e+00,
          4.4703e-07, 6.5565e-07],
        [ 5.9605e-08, 2.3842e-07, 3.5763e-07, ..., 0.0000e+00,
          1.0000e+00, -2.3842e-07],
        [ 1.1921e-07, 1.7881e-06, -1.1921e-07, ..., -5.9605e-07,
          4.4703e-07, 1.0000e+00]], device='cuda:0')

```

---

_[View the full topic](https://discuss.pytorch.org/t/vertices-torch-matmul-vertices-unsqueeze-0-rotations-init-runtimeerror-cuda-error-cublas-status-execution-failed-when-calling-cublassgemmstridedbatched-in-centos/116123)._
