{"record":{"id":"308c157ede8d98a9","repo":"jax-ml/jax","slug":"self-should-have-a-different-core-axis-name-from","errorCode":null,"errorMessage":"{self} should have a different core axis name from the TensorCoreMesh {other_mesh}.","messagePattern":"(.+?) should have a different core axis name from the TensorCoreMesh (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"jax/_src/pallas/mosaic/sc_core.py","lineNumber":180,"sourceCode":"        tpu_core.GridDimensionSemantics.SUBCORE_PARALLEL,\n    ]\n\n  def discharges_effect(self, effect):\n    del effect  # Unused.\n    return False\n\n  def check_is_compatible_with(self, other_mesh):\n    if isinstance(other_mesh, VectorSubcoreMesh):\n      raise ValueError(\"You can't use two different VectorSubcoreMeshes.\")\n    elif isinstance(other_mesh, ScalarSubcoreMesh):\n      if (other_mesh.axis_name == self.core_axis_name\n          and other_mesh.num_cores == self.num_cores):\n        return True\n      raise ValueError(f\"{self} should have the same core axis name and number\"\n                       f\" of cores as the ScalarSubcoreMesh {other_mesh}.\")\n    elif isinstance(other_mesh, tpu_core.TensorCoreMesh):\n      if self.core_axis_name == other_mesh.axis_name:\n        raise ValueError(\n            f\"{self} should have a different core axis name from the\"\n            f\" TensorCoreMesh {other_mesh}.\"\n        )\n      if self.subcore_axis_name == other_mesh.axis_name:\n        raise ValueError(\n            f\"{self} should have a different subcore axis name from the\"\n            f\" TensorCoreMesh {other_mesh}.\"\n        )\n      return True\n    return super().check_is_compatible_with(other_mesh)\n\n  @property\n  def supported_memory_spaces(self) -> Sequence[Any]:\n    return [\n        tpu_core.MemorySpace.VMEM,\n        tpu_core.MemorySpace.VMEM_SHARED,\n        tpu_core.MemorySpace.SMEM,\n        tpu_core.MemorySpace.SEMAPHORE,","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/pallas/mosaic/sc_core.py#L162-L198","documentation":"A VectorSubcoreMesh's core axis name must differ from a TensorCoreMesh's axis name when the two are combined, otherwise the axis mapping between tensor and sparse cores is ambiguous.","triggerScenarios":"check_is_compatible_with(tensor_core_mesh) where vector_mesh.core_axis_name == tensor_mesh.axis_name.","commonSituations":"Using the same axis name string for TPU tensor-core grid and SparseCore grid.","solutions":["Rename the VectorSubcoreMesh core_axis_name to something like 'sc'","Adopt per-core-type axis name prefixes"],"exampleFix":"# before\nvec = pl_mosaic.VectorSubcoreMesh(core_axis_name='cores', ...)\n# after\nvec = pl_mosaic.VectorSubcoreMesh(core_axis_name='sc', ...)","handlingStrategy":"validation","validationCode":"assert vec.core_axis_name != tc_mesh.axis_name","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Use distinct axis-name namespaces per core type"],"tags":["jax","pallas","tpu","sparsecore","axis-naming"],"backgroundTag":"mesh-incompatibility","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}