{"record":{"id":"64f00c01014b89d1","repo":"jax-ml/jax","slug":"accuracy-accuracy-not-supported","errorCode":null,"errorMessage":"Accuracy {accuracy} not supported","messagePattern":"Accuracy (.+?) not supported","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"jax/_src/lax/lax.py","lineNumber":6189,"sourceCode":"  out_type = maybe_convert_dtype(\n      out_dtype, algorithm.supported_output_types(lhs_dtype, rhs_dtype)\n  )\n  return lhs_dtype, rhs_dtype, out_type\n\n\ndef accuracy_attr(accuracy) -> hlo.ResultAccuracyAttr | None:\n  if accuracy is None:\n    return None\n  elif isinstance(accuracy, AccuracyMode):\n    return hlo.ResultAccuracyAttr.get(0.0, 0.0, int(0), str(accuracy.name))\n  elif isinstance(accuracy, Tolerance):\n    return hlo.ResultAccuracyAttr.get(\n        atol=accuracy.atol,\n        rtol=accuracy.rtol,\n        ulps=accuracy.ulps,\n        mode='TOLERANCE',\n    )\n  raise NotImplementedError(f\"Accuracy {accuracy} not supported\")\n\ndef _handle_dot_precision(ctx, lhs, rhs, precision, platform):\n  def _is_fp8_mixed_precision_matmul(_lhs_dtypes, _rhs_dtypes):\n    fp8_dtypes = (dtypes.float8_e4m3fn, dtypes.float8_e5m2,\n                  dtypes.float8_e5m2fnuz, dtypes.float8_e4m3fnuz,\n                  dtypes.float8_e3m4, dtypes.float8_e4m3,\n                  dtypes.float8_e8m0fnu)\n    return _lhs_dtypes in fp8_dtypes and _rhs_dtypes in fp8_dtypes\n\n  # The *_ lets us reuse this for ragged_dot_general, which has group_sizes.\n  lhs_aval, rhs_aval, *_ = ctx.avals_in\n  lhs_dtype, rhs_dtype = lhs_aval.dtype, rhs_aval.dtype\n  aval_out, = ctx.avals_out\n  accumulation_aval = aval_out\n  algorithm_kwarg = {}\n  if isinstance(precision, (DotAlgorithm, DotAlgorithmPreset)):\n    # The CPU backend silently ignores the algorithm spec, so we check here to\n    # make sure that the selected algorithm is supported. We could be a little","sourceCodeStart":6171,"sourceCodeEnd":6207,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/lax/lax.py#L6171-L6207","documentation":"Raised from accuracy-attribute handling for dot lowering when the given Accuracy object matches neither the exact-match form (atol/rtol/ulps producing mode='TOLERANCE' or exact) nor any other recognized branch — i.e. an unsupported accuracy specification for the target platform lowering.","triggerScenarios":"Passing a lax.Accuracy instance with a combination of fields (e.g. only ulps set, or contradictory tolerances) that the HLO ResultAccuracyAttr conversion in this function cannot represent.","commonSituations":"Using the experimental accuracy controls on dot_general with values valid on GPU but unsupported elsewhere; version drift in the Accuracy API fields.","solutions":["Set atol and rtol (standard tolerance form) rather than ulps-only or exotic combos","Verify the Accuracy fields supported by your JAX version's lax.Accuracy docs","Omit accuracy if exact tolerance control is not required"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# only standard tolerance combos are supported\nacc = lax.Accuracy(atol=1e-3, rtol=1e-3) if accuracy is not None else None","typeGuard":null,"tryCatchPattern":"try:\n    out = lax.dot_general(a, b, dn, precision=None, accuracy=acc)\nexcept NotImplementedError:\n    out = lax.dot_general(a, b, dn)  # drop accuracy","preventionTips":["Prefer atol/rtol over ulps-only specs","Check lax.Accuracy docs for your JAX version before using exotic fields"],"tags":["jax","dot-general","accuracy","experimental-api"],"backgroundTag":"unsupported-parameter-value","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}