{"record":{"id":"4a10d7a6d6e07e8d","repo":"jax-ml/jax","slug":"get-not-supported-yet","errorCode":null,"errorMessage":"get not supported yet","messagePattern":"get not supported yet","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"jax/_src/pallas/fuser/block_spec.py","lineNumber":1619,"sourceCode":"      _slice(i, b)\n      for i, b in zip(block_idx, block_spec.block_shape, strict=True)\n  )\n  return ref.swap(val, idx=indexer)\n\n\n@register_pull_block_spec_rule(state_primitives.get_p)\ndef _get_pull_rule(\n    ctx: PullRuleContext, block_transform: BlockIndexTransform, *, tree\n):\n  if block_transform.block_shape is None:\n    return [block_transform] + [no_block_index_transform] * (\n        len(ctx.avals_in) - 1\n    )\n  ref_aval = ctx.avals_in[0]\n  assert hasattr(ref_aval, 'shape')\n  indexers_avals = tree_util.tree_unflatten(tree, ctx.avals_in[1:])\n  if len(indexers_avals) > 1:\n    raise NotImplementedError('get not supported yet')\n  if not indexers_avals:\n    indexer_aval = indexing.NDIndexer.make_trivial_indexer(ref_aval.shape)\n  else:\n    indexer_aval = indexers_avals[0]\n  block_shape_iter = iter(block_transform.block_shape)\n  block_shape = []\n  if not all(\n      bd is None\n      or isinstance(bd, (int, pallas_core.Blocked, pallas_core.Squeezed))\n      for bd in block_transform.block_shape\n  ):\n    raise NotImplementedError('get not supported yet')\n  for idx_aval, size in zip(indexer_aval.indices, ref_aval.shape, strict=True):\n    if not isinstance(idx_aval, indexing.Slice):\n      assert hasattr(idx_aval, 'shape') and not idx_aval.shape\n      block_shape.append(pallas_core.Squeezed())\n      continue\n    if not isinstance(idx_aval.start, int):","sourceCodeStart":1601,"sourceCodeEnd":1637,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/pallas/fuser/block_spec.py#L1601-L1637","documentation":"Raised by _get_pull_rule in the Pallas fuser when tracing a `get` on a Ref whose tree of indexers contains more than one NDIndexer. The block-spec propagation logic only handles a single indexer per get, so a pytree of multiple indexers (e.g. getting from multiple refs/indexers via one primitive) is rejected.","triggerScenarios":"Calling ref.get(...) (or indexing a Ref) where tree_unflatten of the indexer args yields len(indexers_avals) > 1 — i.e. multiple indexers passed to a single get_p bind, often from tuple/stacked index expressions inside a pallas kernel.","commonSituations":"Passing a tuple of indices or a pytree of indexers to a Ref get; using helper code that packs several indexers into one get call inside pallas kernels with block specs.","solutions":["Use a single indexer per get: split multi-indexer gets into separate ref.get(...) calls","Flatten any pytree indexers into one NDIndexer before calling get","Check for accidental tuple wrapping of the index argument"],"exampleFix":"# before\nvals = ref.get((idx_a, idx_b), tree=tree)  # multiple indexers\n\n# after\nva = ref.get(idx_a)\nvb = ref.get(idx_b)","handlingStrategy":"validation","validationCode":"indexers = jax.tree_util.tree_leaves(idx_tree)\nassert len(indexers) <= 1, 'get supports at most one indexer'","typeGuard":"def is_single_indexer(idx) -> bool:\n    return len(jax.tree_util.tree_leaves(idx)) <= 1","tryCatchPattern":null,"preventionTips":["Pass one NDIndexer per get call","Never wrap multiple indexers in a tuple passed to a single get"],"tags":["jax","pallas","get","indexer","not-implemented"],"backgroundTag":"jax-pallas-unsupported-indexing","analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}