{"record":{"id":"50b7f20c12f03fa2","repo":"jax-ml/jax","slug":"nonsymmetric-eigendecomposition-requires-cusolver","errorCode":null,"errorMessage":"Nonsymmetric eigendecomposition requires cusolver 11.7.1 or newer","messagePattern":"Nonsymmetric eigendecomposition requires cusolver 11\\.7\\.1 or newer","errorType":"error_code","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"jax/_src/lax/linalg.py","lineNumber":1111,"sourceCode":"  if dtype in (np.float32, np.float64):\n    is_real = True\n  elif dtype in (np.complex64, np.complex128):\n    is_real = False\n  else:\n    raise ValueError(f\"Unsupported dtype: {dtype}\")\n\n  have_cusolver_geev = (\n      target_name_prefix == \"cu\"\n      and cuda_versions\n      and cuda_versions.cusolver_get_version() >= 11701\n  )\n\n  if (\n      implementation is None and have_cusolver_geev\n      and not compute_left_eigenvectors\n  ) or implementation == EigImplementation.CUSOLVER:\n    if not have_cusolver_geev:\n      raise RuntimeError(\n          \"Nonsymmetric eigendecomposition requires cusolver 11.7.1 or newer\"\n      )\n    if compute_left_eigenvectors:\n      raise NotImplementedError(\n          \"Left eigenvectors are not supported by cusolver\")\n    target_name = f\"{target_name_prefix}solver_geev_ffi\"\n    avals_out = [\n        ShapedArray(batch_dims + (n, n), dtype),\n        ShapedArray(batch_dims + (n,), complex_dtype),\n        ShapedArray(batch_dims + (n, n), dtype),\n        ShapedArray(batch_dims + (n, n), dtype),\n        ShapedArray(batch_dims, np.int32),\n    ]\n\n    rule = _linalg_ffi_lowering(target_name, avals_out=avals_out)\n    _, w, vl, vr, info = rule(ctx, operand, left=compute_left_eigenvectors,\n                              right=compute_right_eigenvectors)\n    if is_real:","sourceCodeStart":1093,"sourceCodeEnd":1129,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/lax/linalg.py#L1093-L1129","documentation":"jax/_src/lax/linalg.py:1111 in _eig_gpu_lowering. JAX routes nonsymmetric eigendecomposition on GPU to cusolver's geev only when cusolver_get_version() >= 11701 (cusolver 11.7.1, shipped with CUDA 11.8+). If you explicitly select implementation=EigImplementation.CUSOLVER (or auto-select it) on an older cusolver, this RuntimeError fires because the geev kernel simply does not exist there.","triggerScenarios":"Passing implementation=jax.lax.linalg.EigImplementation.CUSOLVER to jax.lax.linalg.eig on a GPU whose cusolver version < 11.7.1; or relying on auto-selection (implementation=None, no left eigenvectors) on an old CUDA toolkit install.","commonSituations":"Old CUDA 11.x installs (cusolver < 11.7.1), docker images pinned to old CUDA runtime, clusters with stale GPU driver/toolkit stacks, after a JAX upgrade that started using the FFI geev path.","solutions":["Upgrade CUDA/cusolver to 11.7.1+ (CUDA 11.8 or newer toolkit / cuDNN-bundled pip wheels jax[cuda])","Let JAX choose the fallback implementation: pass implementation=None on old cusolver (auto path avoids cusolver when unavailable, e.g. uses CPU or alternative path)","Move the eig computation to CPU backend if upgrading the GPU stack is not feasible"],"exampleFix":"// before\nw, v = jax.lax.linalg.eig(a, implementation=lax.linalg.EigImplementation.CUSOLVER)\n// after (old cusolver)\nw, v = jax.lax.linalg.eig(a)  # let JAX pick an available implementation","handlingStrategy":"fallback","validationCode":"import jax\nv_ok = (jax.default_backend() != 'gpu') or (cusolver_version() >= 11701)\nif not v_ok:\n    eig = jax.jit(jnp.linalg.eig, backend='cpu')","typeGuard":null,"tryCatchPattern":"try:\n    w, v = jax.lax.linalg.eig(a, implementation=lax.linalg.EigImplementation.CUSOLVER)\nexcept RuntimeError:\n    w, v = jax.jit(jnp.linalg.eig, backend='cpu')(a)","preventionTips":["Pin CUDA 11.8+ in docker/CI images","Log jax.cuda_environment() cusolver version at startup"],"tags":["jax","cuda","cusolver","eig","version-mismatch","gpu"],"backgroundTag":"cuda-library-version-too-old","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}