{"record":{"id":"3f835f944f8da549","repo":"sgl-project/sglang","slug":"unsupported-io-backend-io-backend","errorCode":null,"errorMessage":"Unsupported IO backend: {io_backend}","messagePattern":"Unsupported IO backend: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/mem_cache/pool_host/dsa.py","lineNumber":282,"sourceCode":"                    src_layers=[self.index_k_with_scale_buffer[host_layer_id]],\n                    dst_layers=[device_pool.index_k_with_scale_buffer[device_layer_id]],\n                    src_indices=host_page_indices,\n                    dst_indices=device_page_indices,\n                    page_size=1,\n                )\n            elif self.layout == \"page_first_direct\":\n                transfer_kv_per_layer_direct_pf_lf(\n                    src_ptrs=[self.index_k_with_scale_buffer],\n                    dst_ptrs=[device_pool.index_k_with_scale_buffer[device_layer_id]],\n                    src_indices=host_page_indices,\n                    dst_indices=device_page_indices,\n                    layer_id=host_layer_id,\n                    page_size=1,\n                )\n            else:\n                raise ValueError(f\"Unsupported layout: {self.layout}\")\n        else:\n            raise ValueError(f\"Unsupported IO backend: {io_backend}\")\n\n    def _backup_from_device_per_layer(\n        self,\n        device_pool,\n        host_indices,\n        device_indices,\n        layer_id,\n        io_backend,\n        *,\n        is_draft: bool = False,\n    ):\n        # MTP draft layers do not participate in CP layer sharding.\n        host_layer_id = layer_id if is_draft else self._host_layer_index(layer_id)\n        device_layer_id = 0 if is_draft else layer_id\n\n        host_page_indices, device_page_indices = self._get_indexer_page_indices(\n            host_indices, device_indices\n        )","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/mem_cache/pool_host/dsa.py#L264-L300","documentation":"load_to_device_per_layer dispatches on io_backend and only implements 'kernel' and 'direct'. Any other string reaches this raise.","triggerScenarios":"Passing io_backend other than 'kernel' or 'direct' (typo, 'cuda', 'io_uring', None) to load_to_device_per_layer.","commonSituations":"Config typos or code written for a different backend naming scheme; a None default leaking from an unset config.","solutions":["Use io_backend='kernel' or 'direct'","Trace where io_backend is set (server args / HiCache config) and fix the value"],"exampleFix":"# before\nio_backend='cuda'\n# after\nio_backend='direct'","handlingStrategy":"validation","validationCode":"assert io_backend in (\"kernel\", \"direct\"), io_backend","typeGuard":"def is_valid_io_backend(b: str) -> bool:\n    return b in (\"kernel\", \"direct\")","tryCatchPattern":null,"preventionTips":["Centralize io_backend constants instead of raw strings"],"tags":["dsa-hicache","io-backend","config"],"backgroundTag":"invalid-enum-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}