{"record":{"id":"77d487f5ceadc0ee","repo":"jax-ml/jax","slug":"unsupported-dot-precision-precision-77d487","errorCode":null,"errorMessage":"Unsupported dot precision: {precision}.","messagePattern":"Unsupported dot precision: (.+?)\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"jax/_src/pallas/triton/lowering.py","lineNumber":2398,"sourceCode":"    assert precision.supported_lhs_types is not None\n    assert precision.supported_rhs_types is not None\n    a = _cast(a, a_aval.dtype, precision.supported_lhs_types[0])\n    b = _cast(b, b_aval.dtype, precision.supported_rhs_types[0])\n    acc_dtype = precision.accumulation_type\n  elif isinstance(precision, tuple):\n    a_precision, b_precision = precision\n    if a_precision in _TF32_PRECISIONS or b_precision in _TF32_PRECISIONS:\n      input_precision = tt_dialect.InputPrecision.TF32\n    elif a_aval.dtype == jnp.float32:\n      input_precision = tt_dialect.InputPrecision.IEEE\n    else:\n      input_precision = None\n\n    acc_dtype = out_aval.dtype\n    if acc_dtype not in (jnp.int32, jnp.float16, jnp.float64):\n      acc_dtype = jnp.float32\n  else:\n    raise NotImplementedError(f\"Unsupported dot precision: {precision}.\")\n\n  a_type = ir.RankedTensorType(a.type)\n  b_type = ir.RankedTensorType(b.type)\n  if len(a_type.shape) != 2 or len(b_type.shape) != 2:\n    raise ValueError(\"a and b must be 2D, but got:\"\n                     f\" {a_type.shape} and {b_type.shape}\")\n\n  m, k = a_type.shape\n  _, n = b_type.shape\n  if a_type.element_type == ir.F64Type.get():\n    # Triton's MMAv2 fp64 path uses the m8n8k4 PTX instruction but aggregates\n    # it with NumRegisters={m:2, n:1, k:4}, producing an effective m16n8k16\n    # per-warp tile.  Blocks smaller than these minimums cause repM/repN/repK\n    # to round to zero, corrupting the ValueTable and segfaulting the compiler.\n    #   M >= 16  (2 × instrM=8)\n    #   N >=  8  (1 × instrN=8)\n    #   K >= 16  (4 × instrK=4)\n    errors = []","sourceCodeStart":2380,"sourceCodeEnd":2416,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/pallas/triton/lowering.py#L2380-L2416","documentation":"The Pallas Triton dot lowering only accepts precision arguments that are either lax.DotAlgorithm values, a supported preset, None, or one of the classic Precision enum/string values. If precision is some other object (custom class, malformed value), the lowering falls through to raise NotImplementedError('Unsupported dot precision').","triggerScenarios":"Calling pl.dot / pallas dot with an unrecognized precision object, e.g. an arbitrary string, an int, or a stale lax.Precision member removed/renamed in a JAX version change.","commonSituations":"Upgrading JAX where the Precision API changed and old pickled/config values no longer match; passing precision from a config file without validating against lax.Precision.","solutions":["Pass precision=None or lax.Precision.DEFAULT/HIGH/HIGHEST explicitly","If using DotAlgorithm, ensure it's a lax.DotAlgorithmPreset supported by this backend","Print type(precision) right before the kernel launch to confirm what is actually being forwarded"],"exampleFix":"# before\nacc = pl.dot(a, b, precision='high')\n\n# after\nacc = pl.dot(a, b, precision=lax.Precision.HIGH)","handlingStrategy":"type-guard","validationCode":"import jax.lax as lax\nassert precision is None or isinstance(precision, (str, lax.Precision, lax.DotAlgorithm)), type(precision)","typeGuard":"def valid_precision(p) -> bool:\n    import jax.lax as lax\n    return p is None or isinstance(p, (str, lax.Precision, lax.DotAlgorithmPreset))","tryCatchPattern":null,"preventionTips":["Never load precision settings from untyped config; validate against lax.Precision","Add type annotations on kernel wrapper parameters"],"tags":["jax","pallas","triton","precision","validation"],"backgroundTag":"unsupported-precision-mode","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}