{"id":26871,"library":"cutensor-cu13","title":"NVIDIA cuTENSOR Python Bindings (CUDA 13)","description":"Python bindings for NVIDIA cuTENSOR, a GPU-accelerated tensor computation library optimized for deep learning and HPC. Version 2.6.0 supports CUDA 13.x. Release cadence follows cuTENSOR releases (major.minor.patch).","status":"active","version":"2.6.0","language":"python","source_language":"en","source_url":"https://github.com/NVIDIA/cuTENSOR","tags":["cuda13","gpu","tensor","linear-algebra","nvidia"],"install":[{"cmd":"pip install cutensor-cu13","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Required CUDA runtime libraries for GPU operations.","package":"nvidia-cuda-runtime-cu13","optional":false},{"reason":"Required for BLAS operations used internally by cuTENSOR.","package":"nvidia-cublas-cu13","optional":false}],"imports":[{"note":"Top-level module does not expose tensor directly; must use submodule.","wrong":"import cutensor","symbol":"tensor","correct":"from cutensor import tensor"}],"quickstart":{"code":"import numpy as np\nfrom cutensor import tensor\n\n# Create two tensors on GPU (requires CUDA context)\na = tensor(np.random.rand(3,4), device='cuda')\nb = tensor(np.random.rand(4,5), device='cuda')\n# Perform matrix multiplication\nc = a @ b\nprint(c)\n","lang":"python","description":"Basic tensor creation and matrix multiplication on GPU."},"warnings":[{"fix":"Use 'from cutensor import tensor' directly; no explicit init call needed.","message":"The Python API changed in cuTENSOR 2.0+; the old 'cutensor.init' pattern was removed.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Call np.ascontiguousarray() on NumPy arrays before converting to cutensor tensors.","message":"Input tensors must be contiguous in memory; non-contiguous arrays may cause silent wrong results or crashes.","severity":"gotcha","affected_versions":"All"},{"fix":"Replace 'TensorHandle' with 'tensor' class.","message":"Using 'cutensor.TensorHandle' is deprecated in favor of 'cutensor.tensor'.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install the correct variant: 'pip install cutensor-cu13' for CUDA 13.","cause":"Wrong installation variant for CUDA version. cutensor-cu13 only works with CUDA 13.x.","error":"ModuleNotFoundError: No module named 'cutensor'"},{"fix":"Ensure tensors are contiguous (use .contiguous() on tensor objects) and that dtype is float32, float64, or complex64/128.","cause":"Non-contiguous tensor or unsupported data type.","error":"RuntimeError: cuTENSOR error: CUTENSOR_STATUS_INVALID_VALUE"},{"fix":"Install compatible CUDA toolkit (13.x) or the corresponding nvidia-* meta-packages: pip install nvidia-cuda-runtime-cu13 nvidia-cublas-cu13.","cause":"Missing CUDA runtime libraries.","error":"ImportError: libcutensor.so: cannot open shared object file"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}