# Large Tikhonov inverse of Matrix -\> CUDA?

**URL:** <https://discourse.julialang.org/t/large-tikhonov-inverse-of-matrix-cuda/86971>\
**Category:** General Usage\
**Tags:** cuda\
**Created:** [September 9, 2022, 7:45am UTC](https://discourse.julialang.org/t/large-tikhonov-inverse-of-matrix-cuda/86971 "2022-09-09T07:45:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roflmaostc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roflmaostc/32/30123_2.png) [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Post date:** [September 9, 2022, 7:45am UTC](https://discourse.julialang.org/t/large-tikhonov-inverse-of-matrix-cuda/86971/1 "2022-09-09T07:45:39Z")

</div>

Hi,

I want to explicitly obtain a Tikhonov inverse of an ill-conditioned matrix, for example:

```julia
julia> using LinearAlgebra

julia> BLAS.set_num_threads(12)

julia> function Tikhonov(M, λ=1e-15)
               Tm = inv(M' * M + λ * I(size(M, 2)))
               return M
       end
Tikhonov (generic function with 2 methods)

[....]

julia> x = randn((12000, 6000));

julia> @time Tikhonov(x);
  5.432725 seconds (13 allocations: 827.002 MiB, 1.67% gc time)

```

However, I want to speed up this operation but CUDA.jl does not seem to have a `inv` function for that matrix size. I think the CPU has already reached its limit.

Best,

Felix
