Commit Graph
1 Commits
Author SHA1 Message Date
Jaime Rodriguez Sanchez 46957e4780 SAM3: production-faithful torch.compile A/B benchmark
Summary:
scripts/bench_compile.py + :bench_compile target. Builds Sam3VideoPredictorMultiGPU with the exact scene_service constructor args + sam3_v4.pt, toggling compile, and measures the real per-frame served sequence (start_session on a single image + K add_prompt, mirroring Sam3Client.getMasksStream) plus optional propagate. --native-warmup mirrors prod Sam3DenseTrackingModel.warmup (_compile_model() direct + single-image warm) to verify 0 serve-time recompiles under TORCH_LOGS=recompiles.

Needs -c fbcode.enable_gpu_sections=true (else cudaErrorInvalidKernelImage on H100). Reuses measure_speed.py synth+timing helpers.

Reviewed By: flanggut

Differential Revision: D111922692

fbshipit-source-id: b2c96da965ce67e76e5e8837d3b08e020d138eea
2026-07-15 04:05:53 -07:00