{"record":{"id":"fe190690f0c54c7a","repo":"sgl-project/sglang","slug":"gptossforcausallm-on-intel-xpu-only-supports-bfloa","errorCode":null,"errorMessage":"GptOssForCausalLM on Intel XPU only supports bfloat16 dtype, but got '{cfg.dtype}'. Please use --dtype bfloat16 or remove --dtype to use auto.","messagePattern":"GptOssForCausalLM on Intel XPU only supports bfloat16 dtype, but got '(.+?)'\\. Please use --dtype bfloat16 or remove --dtype to use auto\\.","errorType":"validation","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/arg_groups/overrides.py","lineNumber":1133,"sourceCode":"        elif is_xpu():\n            overrides[\"attention_backend\"] = \"intel_xpu\"\n        elif is_hip():\n            overrides[\"attention_backend\"] = \"aiter\"\n        elif not (is_mps() and use_mlx()):\n            # Exempt MLX only -- it owns attention in its own runner.  macOS\n            # without MLX still falls through to triton and fails fast below,\n            # rather than landing on torch_native (no sliding window, no sinks).\n            overrides[\"attention_backend\"] = \"triton\"\n    if is_xpu():\n        # Check for bf16 dtype on Intel XPU. Reads the pristine dtype request,\n        # which equals the legacy mid-branch read: dtype had no earlier writer\n        # for this arch.\n        if cfg.dtype == \"auto\":\n            logger.warning(\n                \"GptOssForCausalLM on Intel XPU currently supports bfloat16 dtype only\"\n            )\n        elif cfg.dtype not in [\"bfloat16\"]:\n            raise NotImplementedError(\n                f\"GptOssForCausalLM on Intel XPU only supports bfloat16 dtype, \"\n                f\"but got '{cfg.dtype}'. Please use --dtype bfloat16 or remove --dtype to use auto.\"\n            )\n    quantization_config = getattr(hf_config, \"quantization_config\", None)\n    is_mxfp4_quant_format = (\n        quantization_config is not None\n        and quantization_config.get(\"quant_method\") == \"mxfp4\"\n    )\n    if is_mxfp4_quant_format:\n        # use bf16 for mxfp4 triton kernels\n        overrides[\"dtype\"] = \"bfloat16\"\n    if cfg.moe_runner_backend == \"auto\":\n\n        if is_sm100_supported() and is_mxfp4_quant_format:\n            overrides[\"moe_runner_backend\"] = \"flashinfer_mxfp4\"\n            logger.warning(\n                \"Detected SM100 and MXFP4 quantization format for GPT-OSS model, enabling FlashInfer MXFP4 MOE kernel.\"\n            )","sourceCodeStart":1115,"sourceCodeEnd":1151,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/arg_groups/overrides.py#L1115-L1151","documentation":"On Intel XPU, GptOssForCausalLM in SGLang is only implemented for bfloat16 compute. dtype 'auto' is allowed (with a warning), but any other explicit --dtype (e.g. float16) raises NotImplementedError.","triggerScenarios":"Launching gpt-oss on Intel GPU with --dtype float16 or float32; _gpt_oss_overrides sees cfg.dtype not in ['bfloat16'] and not 'auto'.","commonSituations":"Porting a CUDA launch script (fp16 for older GPUs) to an Intel XPU machine; defaulting to fp16 in an orchestrator template.","solutions":["Remove --dtype (auto resolves to bfloat16) or set --dtype bfloat16","If you need fp8/fp4 quantization paths, check XPU support first — they are not enabled via --dtype here"],"exampleFix":"# before\n--dtype float16\n# after\n--dtype bfloat16","handlingStrategy":"validation","validationCode":"if model_arch == 'GptOssForCausalLM' and device_type == 'xpu':\n    server_args.dtype = 'bfloat16' if server_args.dtype in ('auto', None) else server_args.dtype\n    assert server_args.dtype == 'bfloat16'","typeGuard":null,"tryCatchPattern":"except NotImplementedError as e:\n    if 'bfloat16' in str(e): server_args.dtype = 'bfloat16'; retry()\n    raise","preventionTips":["Never port CUDA fp16 flags to XPU launches verbatim","Default to omitting --dtype unless required"],"tags":["gpt-oss","intel-xpu","dtype","sglang"],"backgroundTag":"incompatible-dtype-configuration","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}