{"record":{"id":"da3a214c6d2548d7","repo":"jax-ml/jax","slug":"self-should-have-a-different-axis-name-from-the","errorCode":null,"errorMessage":"{self} should have a different axis name from the TensorCoreMesh {other_mesh}.","messagePattern":"(.+?) should have a different axis name from the TensorCoreMesh (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"jax/_src/pallas/mosaic/sc_core.py","lineNumber":95,"sourceCode":"  def dimension_semantics(self) -> Sequence[tpu_core.DimensionSemantics]:\n    return [tpu_core.GridDimensionSemantics.CORE_PARALLEL]\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, ScalarSubcoreMesh):\n      raise ValueError(\"You can't use two different ScalarSubcoreMeshes.\")\n    elif isinstance(other_mesh, VectorSubcoreMesh):\n      if (self.axis_name == other_mesh.core_axis_name\n          and self.num_cores == other_mesh.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 VectorSubcoreMesh {other_mesh}.\")\n    elif isinstance(other_mesh, tpu_core.TensorCoreMesh):\n      if self.axis_name == other_mesh.axis_name:\n        raise ValueError(\n            f\"{self} should have a different axis name from the TensorCoreMesh\"\n            f\" {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_SHARED,\n        tpu_core.MemorySpace.SMEM,\n        tpu_core.MemorySpace.SEMAPHORE,\n    ]\n\n  @contextlib.contextmanager\n  def tracing_context(self):\n    yield\n","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/pallas/mosaic/sc_core.py#L77-L113","documentation":"A ScalarSubcoreMesh must not share an axis name with a TensorCoreMesh when combined. The check enforces that sparse-core and tensor-core axis names are distinct so mapping does not become ambiguous.","triggerScenarios":"check_is_compatible_with(other_mesh) where other_mesh is a tpu_core.TensorCoreMesh with the same axis_name as the ScalarSubcoreMesh.","commonSituations":"Reusing a generic axis name like 'cores' or 'x' for both the TensorCore mesh and SparseCore mesh in a multi-core kernel.","solutions":["Rename the ScalarSubcoreMesh axis (e.g. 'sc') so it differs from the TensorCoreMesh axis","Use distinct, prefixed axis names per core type by convention"],"exampleFix":"# before\nscalar_mesh = pl_mosaic.ScalarSubcoreMesh(axis_name='cores', ...)\nscalar_mesh.check_is_compatible_with(tensorcore_mesh)  # tensorcore_mesh.axis_name == 'cores'\n# after\nscalar_mesh = pl_mosaic.ScalarSubcoreMesh(axis_name='sc', ...)","handlingStrategy":"validation","validationCode":"assert scalar_mesh.axis_name != tc_mesh.axis_name, 'axis names must differ'","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Prefix axis names by core type (e.g. 'sc', 'tc')"],"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"}