Draft: add graph fusion optimizer and qualify wider PDF stages#1846
Draft
jioffe502 wants to merge 4 commits intoNVIDIA:mainfrom
Draft
Draft: add graph fusion optimizer and qualify wider PDF stages#1846jioffe502 wants to merge 4 commits intoNVIDIA:mainfrom
jioffe502 wants to merge 4 commits intoNVIDIA:mainfrom
Conversation
cef5041 to
860d156
Compare
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.
Summary
This draft introduces graph fusion as an internal compile-time optimizer for the graph pipeline. Fusion remains behind
enable_fusion; public execution modes staybatchandinprocess.The current draft:
FusedOperatorand compile-time graph rewriting for eligible linear chainsProcessOnlyFusionSafecontract for process-level fusion legalityenable_fusionthrough the graph executor, graph ingestor, example CLI, and harnessrun_mode="fused"surface so the API matches the actual execution modelray_object_store_memory_bytesplumbing for large-run Ray comparisonsWhy This Shape
Fusion is implemented as an optimizer, not a new runtime backend.
batchandinprocessremain the execution backendsenable_fusioncompiles the graph into a more efficient plan when legalFused[PageElementDetectionActor+OCRActor]This follows the standard pattern used by dataflow systems and compilers:
Validation
Focused test coverage:
tests/test_pipeline_graph.pytests/test_harness_config.pytests/test_harness_run.pyValidated results:
bo20,dgx_8gpu,embed_batch_size=32median ingest improved from
52.45sto37.79swith PE->OCR fusionsemantics matched on pages, rows, and detection summary
bo767,dgx_8gpu,embed_batch_size=32,ray_object_store_memory_bytes=1000000000000baseline ingest:
371.90sfused ingest:
319.88spages and rows matched
Still In Draft
This PR stays draft because:
Follow-Up
Next validation steps:
bo20baseline/fused withuse_table_structure=trueanduse_graphic_elements=truebo767fusion_summary, ingest time, rows, pages, and detection/recall behavior