{"record":{"id":"4faf7da13ad206fd","repo":"jax-ml/jax","slug":"self-should-have-a-different-subcore-axis-name-f","errorCode":null,"errorMessage":"{self} should have a different subcore axis name from the TensorCoreMesh {other_mesh}.","messagePattern":"(.+?) should have a different subcore axis name from the TensorCoreMesh (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"jax/_src/pallas/mosaic/sc_core.py","lineNumber":185,"sourceCode":"    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,\n    ]\n\n  @contextlib.contextmanager\n  def tracing_context(self):\n    yield","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/pallas/mosaic/sc_core.py#L167-L203","documentation":"A VectorSubcoreMesh's subcore axis name (e.g. 'lane') must not collide with the TensorCoreMesh axis name when combined; the check runs after the core-axis check and enforces unique names across both.","triggerScenarios":"check_is_compatible_with(tensor_core_mesh) where vector_mesh.subcore_axis_name == tensor_mesh.axis_name, e.g. both named 'lanes'.","commonSituations":"Choosing a subcore axis name that matches an existing tensor-core grid axis like 'x' or 'lanes'.","solutions":["Rename the subcore_axis_name (e.g. 'sc_lane') so it is unique","Namespace all axis names by core type"],"exampleFix":"# before\nvec = pl_mosaic.VectorSubcoreMesh(core_axis_name='sc', subcore_axis_name='lanes', ...)\n# after\nvec = pl_mosaic.VectorSubcoreMesh(core_axis_name='sc', subcore_axis_name='sc_lane', ...)","handlingStrategy":"validation","validationCode":"assert vec.subcore_axis_name != tc_mesh.axis_name","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Name subcore axes like 'sc_lane' to avoid collisions"],"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"}