{"record":{"id":"ee7e580c64c4729b","repo":"jax-ml/jax","slug":"unsupported-device-id-type-device-id-type-ee7e58","errorCode":null,"errorMessage":"Unsupported device id type: {device_id_type}","messagePattern":"Unsupported device id type: (.+?)","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"jax/_src/pallas/primitives.py","lineNumber":1293,"sourceCode":"    device_ids = tree_util.tree_leaves(device_id)\n    mesh_strides: tuple[int, ...]\n    if mesh_context is None:\n      mesh_strides = ()\n    else:\n      mesh_strides = mesh_context.mesh_strides\n    if len(device_ids) != len(mesh_strides):\n      raise ValueError(\n          \"Number of device ids must match the number of mesh axes, but got\"\n          f\" {len(device_ids)} ids for a {len(mesh_strides)}D mesh.\"\n      )\n\n    if not device_ids:\n      # If there are no device ids, then it is purely local communication.\n      return None, non_mesh_axes\n    return sum(a * b for a, b in zip(device_ids, mesh_strides)), non_mesh_axes\n  elif device_id_type is DeviceIdType.LOGICAL:\n    return device_id, non_mesh_axes\n  raise NotImplementedError(f\"Unsupported device id type: {device_id_type}\")\n\n\ndelay_p = jax_core.Primitive(\"delay\")\ndelay_p.multiple_results = True\n\n\nclass DelayEffect(effects.Effect):\n  pass\ndelay_effect = DelayEffect()\neffects.control_flow_allowed_effects.add_type(DelayEffect)\npallas_core.kernel_local_effects.add_type(DelayEffect)\n\n\n@delay_p.def_effectful_abstract_eval\ndef _delay_abstract_eval(nanos):\n  del nanos\n  return [], {delay_effect}\n","sourceCodeStart":1275,"sourceCodeEnd":1311,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/pallas/primitives.py#L1275-L1311","documentation":"device_id_to_logical only supports DeviceIdType.MESH and DeviceIdType.LOGICAL; any other value falls through to NotImplementedError.","triggerScenarios":"Passing an unknown/None/typo'd device_id_type value to APIs like semaphore_signal with remote devices.","commonSituations":"Custom or older code using a device_id_type enum value removed/renamed in this JAX version; passing device_id_type=None by accident.","solutions":["Use DeviceIdType.MESH or DeviceIdType.LOGICAL explicitly","Update code that relies on removed enum values after a JAX upgrade"],"exampleFix":"// before\nf(device_id_type=0)\n// after\nfrom jax._src.pallas.primitives import DeviceIdType\nf(device_id_type=DeviceIdType.LOGICAL)","handlingStrategy":"type-guard","validationCode":"assert device_id_type in (DeviceIdType.MESH, DeviceIdType.LOGICAL), f\"unsupported device_id_type: {device_id_type}\"","typeGuard":"def is_supported_device_id_type(t) -> bool:\n    return t in (DeviceIdType.MESH, DeviceIdType.LOGICAL)","tryCatchPattern":null,"preventionTips":["Always use the DeviceIdType enum, never raw ints/None","Re-check enum values after JAX upgrades"],"tags":["pallas","device-id","not-implemented","jax"],"backgroundTag":"invalid-argument-value","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}