Skip to content

models: BEVFusion onboarding (stage graph, sparse plugin export, INT8/FP8) - #22

Draft
vividf wants to merge 1 commit into
pr11b-bevfusion-export-fusionfrom
pr12-bevfusion-onboarding
Draft

models: BEVFusion onboarding (stage graph, sparse plugin export, INT8/FP8)#22
vividf wants to merge 1 commit into
pr11b-bevfusion-export-fusionfrom
pr12-bevfusion-onboarding

Conversation

@vividf

@vividf vividf commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Stacked PR 13/15 — ⬅ #25 | #23

Stack(base pr-stack-base = 7e35d97):#11#12#13#14#15#16#17#18#19#20(CenterPoint 全功能點)→ #21#25#22#23#24(= 開發 branch HEAD,逐位元一致)。合併由下而上,每合一層把下一層 base retarget。

這個 PR 是什麼

BEVFusion onboarding:stage graph(dense 圖 + sparse plugin 圖)、量化宣告、experiment configs。與 #20 同 pattern 的第二次應用,增量 = sparse stage。

實測數字

形態 mAP dense latency
FP16 0.4510 1.76 ms
INT8 0.4223 1.44 ms
FP8 0.4515

INT8 的兩個敏感 block 保 FP16(sensitivity 掃描記錄在 config 註解);FP8 是「linear 走 FP8 不走 INT8」證據鏈之一(FFN FP8 ±0)。

逐檔導覽

  • main_modules/bevfusion/stages.py:sparse GraphStage(plugin 圖:onnx_transforms=(#21 的 fusion pass,)、ORT 用 torch_fallback_backends)+ dense GraphStage;sparse-stage 的 INT8 TODO(需要量化 libspconv ABI,阻擋條件寫明)。
  • main_modules/bevfusion/quantization.py:量化宣告 + 「attention 投影在校準期抓不到」陷阱的正本 docstring(訓練態 packed qkv Parameter、export 態才誕生的 q/k/v/out_proj、out_proj 的 fast-path 繞過——walker 在框架層拒換它)。
  • main_modules/bevfusion/model.py:stage-graph 版模型類。
  • configs:base + FP16 / _int8 / _int8_qat / _fp8 experiments(_fp8 關 onnx backend——ORT 載不了 trt-domain FP8 op;tolerance 帶 observed)。
  • 測試:test_bevfusion_stages
檔案清單(點開)
.../experiments/detection3d/bevfusion/base.yaml 205 +++++++++++++++
..._secfpn_b16_30e_t4dataset_120m_j6gen2_base.yaml 213 ++++++++++++++++
...fpn_b16_30e_t4dataset_120m_j6gen2_base_fp8.yaml 51 ++++
...pn_b16_30e_t4dataset_120m_j6gen2_base_int8.yaml 56 +++++
...16_30e_t4dataset_120m_j6gen2_base_int8_qat.yaml 37 +++
.../detection3d/main_modules/bevfusion/__init__.py 24 ++
.../detection3d/main_modules/bevfusion/model.py 253 +++++++++++++++++++
.../main_modules/bevfusion/quantization.py 66 +++++
.../detection3d/main_modules/bevfusion/stages.py 248 ++++++++++++++++++
.../tests/deployment/test_bevfusion_stages.py 276 +++++++++++++++++++++
.../tests/deployment/test_sparse_graph_contract.py 103 ++++++++

Review checklist

🤖 Generated with Claude Code

…/FP8)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant