ops: in-house spconv export ops + TensorRT plugin build - #21
Draft
vividf wants to merge 1 commit into
Draft
Conversation
This was referenced Sep 5, 2026
Needed because BEVFusion evaluation runs the sparse graph through the autoware:: plugin ops; permanent infrastructure, not part of the parking. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
vividf
force-pushed
the
pr11-spconv-trt-plugins
branch
from
September 7, 2026 05:23
e50ff65 to
7800a6f
Compare
vividf
force-pushed
the
pr10-centerpoint-onboarding
branch
from
September 7, 2026 05:23
6e26d88 to
697ca48
Compare
This was referenced Sep 7, 2026
Draft
Draft
quant: declarative quantization (plan/placement, modelopt engine, PTQ/QAT, self-describing ckpt)
#17
Draft
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 是什麼
Sparse 模型的前置基礎設施(永久,不屬 parking):自家 spconv export ops + ONNX fusion pass + TensorRT plugin 建置。BEVFusion 的 evaluation 要跑 sparse 圖、PTv3 的 CPE 走同一 plugin——所以放在兩者 onboarding(#25/#22/#23)之前、CenterPoint(不需要)之後。
逐檔導覽
ops/spconv/sparse_conv.py/sparse_functional.py:export 態的 sparse conv 形式(可被 torch.onnx.export 追蹤成 autoware:: 自訂 op 節點)。ops/spconv/onnx_fusion.py:匯出後的圖重寫——把 bias/BN 殘餘/activation 摺進 plugin 節點屬性,使 runtime plugin 一顆 kernel 吃完(sparse 鏈實測 8.5→6.8 ms 的組成之一)。掛載點是 deploy: stage-graph foundation (GraphStage/TorchStage) + shared runtime utils #13 的GraphStage.onnx_transforms,但 pass 本身不依賴 deployment 模組(它先進 stack)。docker/tensorrt_plugins/:libautoware_tensorrt_plugins.so的建置(CMakeLists、build_plugin.sh、build_spconv_cpp.sh、README)。README 記了三個建置坑:pixi sysroot、ldconfig、sm_120。docker/Dockerfile:plugin 建置層(BUILD_TENSORRT_PLUGINSARG 可關;獨立 layer 不被專案 copy 失效)。test_spconv_onnx_fusion(fusion pass 圖形斷言)、test_sparse_graph_contract(用 inspect 對 sparse_functional 做簽名契約測試——export 圖與 runtime plugin 的 ABI 對齊靠它守)。檔案清單(點開)
Review checklist
🤖 Generated with Claude Code