{"record":{"id":"ec43180686cc069e","repo":"jax-ml/jax","slug":"unsupported-device-id-type-device-id-type","errorCode":null,"errorMessage":"Unsupported device ID type: {device_id_type}","messagePattern":"Unsupported device ID type: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"jax/_src/pallas/mosaic/interpret/utils.py","lineNumber":220,"sourceCode":"  if not isinstance(device_coords, tuple):\n    device_coords = (device_coords,)\n  assert len(device_coords) == len(axis_sizes)\n  sizes = list(axis_sizes.values())\n  ret = 0\n  for i in range(len(device_coords)):\n    ret += device_coords[i] * math.prod(sizes[i + 1 :])\n  return ret\n\n\ndef _device_id_to_logical(device_id, device_id_type, axis_sizes, axis_indices):\n  if device_id is None:\n    return None\n  if device_id_type == primitives.DeviceIdType.MESH:\n    return device_coords_to_logical_id(device_id, axis_sizes, axis_indices)\n  elif device_id_type == primitives.DeviceIdType.LOGICAL:\n    return device_id\n  else:\n    raise ValueError(f\"Unsupported device ID type: {device_id_type}\")\n\n\ndef is_int(dtype):\n  return jnp.issubdtype(dtype, jnp.integer)\n\n\ndef is_float(dtype):\n  return jnp.issubdtype(dtype, jnp.floating)\n\n\n@dataclasses.dataclass(frozen=True)\nclass Placeholder:\n  \"\"\"Placeholder for use in `JaxprEnv` below instead of storing a concrete value.\"\"\"\n\n  shape: tuple[int, ...]\n  dtype: jnp.dtype\n\n","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/pallas/mosaic/interpret/utils.py#L202-L238","documentation":"_device_id_to_logical received a DeviceIdType that is neither MESH nor LOGICAL. The interpreter only knows how to translate these two device ID representations into a logical ID.","triggerScenarios":"Interpret-mode lowering encountering an unknown primitives.DeviceIdType enum value, typically from a version mismatch between jax and a plugin (jaxlib/pallas) or custom device-id plumbing.","commonSituations":"Mixing jax versions with experimental DeviceIdType variants; custom interpret harnesses constructing their own device_id_type values.","solutions":["Upgrade/downgrade so jax and jaxlib/pallas versions match (the enum should come from one consistent primitives module)","If writing a custom harness, use only DeviceIdType.MESH or DeviceIdType.LOGICAL","Check for stale imports of primitives from an old path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from jax._src.pallas import primitives\nassert device_id_type in (primitives.DeviceIdType.MESH, primitives.DeviceIdType.LOGICAL), f'unsupported device id type: {device_id_type}'","typeGuard":"def is_supported_device_id_type(t):\n    return t in (primitives.DeviceIdType.MESH, primitives.DeviceIdType.LOGICAL)","tryCatchPattern":null,"preventionTips":["Keep jax, jaxlib, and pallas versions in lockstep","Only use DeviceIdType values defined by the primitives module you import"],"tags":["jax","pallas","device-id","version-mismatch","interpret-mode"],"backgroundTag":"unsupported-enum-value","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}