{"record":{"id":"d0594bd30c4de243","repo":"jax-ml/jax","slug":"backend-name-already-initialized","errorCode":null,"errorMessage":"Backend {name} already initialized","messagePattern":"Backend (.+?) already initialized","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"jax/_src/xla_bridge.py","lineNumber":307,"sourceCode":"# Send a PR if you would like to be added.\n#\n# It is fine for a plugin not to implement every feature that JAX uses, provided\n# that a reasonable feature set is implemented and the plugin fails gracefully\n# for unimplemented features. Wrong outputs are not acceptable.\n_nonexperimental_plugins: set[str] = {'cuda', 'rocm'}\n\n# The set of known experimental plugins that have registrations in JAX codebase.\n_experimental_plugins: set[str] = {\"oneapi\"}\n\ndef register_backend_factory(name: str, factory: BackendFactory, *,\n                             priority: int = 0,\n                             fail_quietly: bool = True,\n                             experimental: bool = False,\n                             make_topology: TopologyFactory | None = None,\n                             c_api: Any | None = None) -> None:\n  with _backend_lock:\n    if name in _backends:\n      raise RuntimeError(f\"Backend {name} already initialized\")\n  _backend_factories[name] = BackendRegistration(\n    factory, priority, fail_quietly, experimental, c_api)\n  if make_topology is not None:\n    _topology_factories[name] = make_topology\n\n\ndef make_cpu_client(\n    collectives: _jax.CpuCollectives | None = None,\n) -> xla_client.Client:\n  \"\"\"Creates a CPU client with the requested collectives implementation.\n\n  The implementation of CPU collectives used by the client is determined by the\n  flag `--jax_cpu_collectives_implementation` - unless `collectives` is\n  provided, in which case the flag is overridden and `collectives` is used.\n\n  Args:\n    collectives: An optional CPU collectives implementation, used by the client\n      if provided.","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/xla_bridge.py#L289-L325","documentation":"Error \"Backend {name} already initialized\" thrown in jax-ml/jax.","triggerScenarios":"Thrown at jax/_src/xla_bridge.py:307 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}