{"record":{"id":"22b532cc66b8743d","repo":"jax-ml/jax","slug":"collective-id-has-to-be-unspecified-or-none-when-n","errorCode":null,"errorMessage":"collective_id has to be unspecified or None when not using a custom barrier","messagePattern":"collective_id has to be unspecified or None when not using a custom barrier","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"jax/_src/tpu_custom_call.py","lineNumber":795,"sourceCode":"              \" conflicts with an existing auto-assigned collective id.\"\n              \" Auto-assignment uses a base collective id of\"\n              f\" {_AUTO_COLLECTIVE_BASE_ID}. Please use values away from this\"\n              \" offset.\"\n          )\n        ctx.module_context.pallas_collective_id_mapping.manual[key] = (\n            collective_id\n        )\n        ctx.module_context.pallas_collective_id_mapping.all_ids.add(\n            collective_id\n        )\n\n    if collective_id is None:\n      raise ValueError(\n          \"collective_id has to be specified when using a custom barrier \"\n          \"(cannot auto-allocate without lowering context)\"\n      )\n  elif collective_id is not None and not allow_collective_id_without_custom_barrier:\n    raise ValueError(\n        \"collective_id has to be unspecified or None when not using a custom\"\n        \" barrier\"\n    )\n  if vmem_limit_bytes is not None and not isinstance(vmem_limit_bytes, int):\n    raise ValueError(\n        \"vmem_limit_bytes must be an int: provided with a\"\n        f\" {type(vmem_limit_bytes)}.\"\n    )\n  if tiling is not None and  device_type != \"sparsecore\":\n    raise ValueError(\n        \"explicit tiling is only supported for SparseCore kernels.\"\n    )\n  if opt_level is not None and device_type != \"sparsecore\":\n    raise ValueError(\n        \"explicit opt_level is only supported for SparseCore kernels.\"\n    )\n  return CustomCallBackendConfig(\n      lowered_module_asm,","sourceCodeStart":777,"sourceCodeEnd":813,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/tpu_custom_call.py#L777-L813","documentation":"collective_id was provided but no custom barrier is used, and allow_collective_id_without_custom_barrier is not enabled.","triggerScenarios":"Passing collective_id in kernel compiler params without enabling the corresponding barrier option.","commonSituations":"Copy-pasting barrier config into kernels that don't use barriers.","solutions":["Remove collective_id from the params, or enable the custom-barrier option / allow_collective_id_without_custom_barrier flag"],"exampleFix":"// before\nkernel(..., compiler_params=dict(collective_id=5))\n// after\nkernel(...)  # no collective_id without a barrier","handlingStrategy":"validation","validationCode":"assert collective_id is None or using_custom_barrier or allow_flag","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only pass collective_id when barriers are enabled"],"tags":["tpu","pallas","collective-id","barrier","invalid-argument"],"backgroundTag":"invalid-argument-combination","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}