# CUTENSOR not available

**URL:** <https://discourse.julialang.org/t/cutensor-not-available/97341>\
**Category:** GPU\
**Created:** [April 11, 2023, 10:48am UTC](https://discourse.julialang.org/t/cutensor-not-available/97341 "2023-04-11T10:48:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lello](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lello/32/48934_2.png) [@lello](https://discourse.julialang.org/u/lello)\
**Post date:** [April 11, 2023, 10:48am UTC](https://discourse.julialang.org/t/cutensor-not-available/97341/1 "2023-04-11T10:48:40Z")

</div>

Hi All,  
I am trying to install CUDA with CUTENSOR support on a Debian 11+julia 1.8.5, but witout success.  
The main problem is that CUTENSOR is non supported at moment for the new CUDA 12.1 drivers.  
This is the error message  
julia\> using cuTENSOR  
[Info: Precompiling cuTENSOR [011b41b2-24ef-40a8-b3eb-fa098493e9e1]  
┌ Error: cuTENSOR is not available for your platform (x86\_64-linux-gnu-libgfortran5-cxx11-libstdcxx30-cuda+12.1-julia\_version+1.8.5)  
└ @ cuTENSOR ~/.julia/packages/cuTENSOR/WTpqy/src/cuTENSOR.jl:99

Is there any workaround for this?

Thnaks  
Lello

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [April 11, 2023, 10:53am UTC](https://discourse.julialang.org/t/cutensor-not-available/97341/2 "2023-04-11T10:53:51Z")

</div>

How about installing a lower version of the CUDA software?  
In the HPC systems I install you can have multiple versions of CUDA. You select which one you work with using Modules files.

---

<div class="post-metadata">

**Author:** ![lello](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lello/32/48934_2.png) [@lello](https://discourse.julialang.org/u/lello)\
**Post date:** [April 11, 2023, 11:02am UTC](https://discourse.julialang.org/t/cutensor-not-available/97341/3 "2023-04-11T11:02:17Z")

</div>

The lowest one I can install without recomiling everything from scratch is 11.5, which still wouldn’t be supported.

---

<div class="post-metadata">

**Author:** ![lello](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lello/32/48934_2.png) [@lello](https://discourse.julialang.org/u/lello)\
**Post date:** [April 11, 2023, 11:07am UTC](https://discourse.julialang.org/t/cutensor-not-available/97341/4 "2023-04-11T11:07:53Z")

</div>

Before 11.1 Debian was not officially supported and I cannot change Linux distro.

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [April 11, 2023, 5:51pm UTC](https://discourse.julialang.org/t/cutensor-not-available/97341/5 "2023-04-11T17:51:40Z")

</div>

You can have CUDA.jl use an older toolkit using `CUDA.set_runtime_version!`; if you use e.g. `v"11.8"` you should be able to use CUTENSOR again. (Admittedly, the error reporting still need to be improved, but these changes are fairly recent.)

---

<div class="post-metadata">

**Author:** ![lello](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lello/32/48934_2.png) [@lello](https://discourse.julialang.org/u/lello)\
**Post date:** [April 11, 2023, 7:24pm UTC](https://discourse.julialang.org/t/cutensor-not-available/97341/6 "2023-04-11T19:24:37Z")

</div>

I tried CUDA.set\_runtime\_version!(v"11.8") and (v"11.0") and in both cases CUDA recomplies succesfully but CUTENSOR is not loaded. In the REPL if I run suing CUDA.CUTENSOR then I get:  
ERROR: UndefVarError: CUTENSOR not defined

This is the output of CUDA.versioninfo():

CUDA runtime 11.0, artifact installation  
CUDA driver 12.1  
NVIDIA driver 530.30.2

Libraries:

- CUBLAS: 11.2.0
- CURAND: 10.2.1
- CUFFT: 10.2.1
- CUSOLVER: 10.6.0
- CUSPARSE: 11.1.1
- CUPTI: 13.0.0
- NVML: 12.0.0+530.30.2

Toolchain:

- Julia: 1.8.5
- LLVM: 13.0.1
- PTX ISA support: 3.2, 4.0, 4.1, 4.2, 4.3, 5.0, 6.0, 6.1, 6.3, 6.4, 6.5, 7.0
- Device capability support: sm\_37, sm\_50, sm\_52, sm\_53, sm\_60, sm\_61, sm\_62, sm\_70, sm\_72, sm\_75, sm\_80

1 device:  
0: NVIDIA A40 (sm\_86, 44.398 GiB / 44.988 GiB available)

As you see CUTENSOR is not loaded.

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [April 12, 2023, 6:07pm UTC](https://discourse.julialang.org/t/cutensor-not-available/97341/7 "2023-04-12T18:07:33Z")

</div>

> [@lello](#):
>
> As you see CUTENSOR is not loaded.

CUTENSOR will never be listed in the versioninfo output nowadays since it’s part of an external package.

---

<div class="post-metadata">

**Author:** ![lello](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lello/32/48934_2.png) [@lello](https://discourse.julialang.org/u/lello)\
**Post date:** [April 13, 2023, 9:36am UTC](https://discourse.julialang.org/t/cutensor-not-available/97341/8 "2023-04-13T09:36:02Z")

</div>

Indeed the command Pkg.test(“cuTENSOR”) is succesful

 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/7/97c84f6cd4192ff25492d9a7f4eca09f1f4734ff.png)

Although the tests for CUDA itself fails.
