#36907 [Diffusion] Enforce component attention backend application
实现拆解
-
核心源码路径
-python/sglang/multimodal_gen/runtime/layers/attention/selector.py(core-logic):源码主路径;涉及符号 ComponentAttentionBackendNotAppliedError, claim_deferred_component_attn_backend, _validate_component_attn_backend_selection;包含 控制流调整、配置键调整、异常路径调整;+68/-27;关键符号:ComponentAttentionBackendNotAppliedError, claim_deferred_component_attn_backend, _validate_component_attn_backend_selection
-python/sglang/multimodal_gen/runtime/loader/component_loaders/component_loader.py(core-logic):源码主路径;包含 控制流调整、配置键调整、异常路径调整;+49/-40
-python/sglang/multimodal_gen/runtime/server_args/server_args.py(core-logic):源码主路径;涉及符号 requested_component_attention_backend, has_requested_component_attention_backends;包含 控制流调整、配置键调整、符号定义调整;+20/-0;关键符号:requested_component_attention_backend, has_requested_component_attention_backends -
测试与验证
-python/sglang/multimodal_gen/test/unit/test_attention_backend_selector.py(test-coverage):测试配套;涉及符号 test_explicit_component_backend_is_consumed, _Loader, load, load_customized;包含 测试覆盖调整、导入关系调整、控制流调整;+235/-7;关键符号:test_explicit_component_backend_is_consumed, _Loader, load, load_customized
-python/sglang/multimodal_gen/test/unit/test_server_args.py(test-coverage):测试配套;涉及符号 test_pipeline_attention_default_is_not_an_explicit_override;包含 测试覆盖调整、配置键调整、符号定义调整;+15/-0;关键符号:test_pipeline_attention_default_is_not_an_explicit_override
-python/sglang/multimodal_gen/test/unit/test_vae_loader.py(test-coverage):测试配套;涉及符号 requested_component_attention_backend;包含 测试覆盖调整、符号定义调整;+3/-0;关键符号:requested_component_attention_backend
| 文件 | 模块 | 状态 | 重要度 |
|---|---|---|---|
python/sglang/multimodal_gen/runtime/layers/attention/selector.py |
sglang/multimodal_gen | modified | 8.19 |
python/sglang/multimodal_gen/test/unit/test_attention_backend_selector.py |
attention/backend/selector | modified | 7.81 |
python/sglang/multimodal_gen/runtime/loader/component_loaders/component_loader.py |
sglang/multimodal_gen | modified | 7.2 |
python/sglang/multimodal_gen/runtime/server_args/server_args.py |
sglang/multimodal_gen | modified | 7.13 |
python/sglang/multimodal_gen/runtime/models/dits/minimax_h3.py |
sglang/multimodal_gen | modified | 6.27 |
分析完成后,这里会展示 LLM 生成的相对完整源码片段和详细注释。
评论区精华
没有提炼出高价值讨论线程
当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。
风险与影响
关联 Issue
未识别关联 Issue
当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。
参与讨论