Repository navigation
Conversation
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
|
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Comments Outside DiffThese findings could not be posted inline.
|
Signed-off-by: Jacob Ioffe <jioffe@nvidia.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
/devin add nvtx.annotate ranges for pdf_split, pdf_extract, and table_structure (CPU+GPU) and document them in the performance guide |
|
On it. Plan: |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Done in 3bad715:
The archetype wrappers are left unannotated so the ranges don't double up. The performance guide table lists the new ranges in pipeline order. |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…instrumentation Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # nemo_retriever/src/nemo_retriever/operators/vdb.py
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…tion' into jioffe502/batch-nvtx-instrumentation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Description
Add a stable, decorator-based NVTX hierarchy for batch profiling:
nrl.batch::pipeline.ingestcovers one completeRayDataExecutorrun (_ingest), includingreturn_results=Falsesummary mode.nrl.batch::...ranges cover Ray actor startup, actor batches (PDF split, PDF extract, Page Elements, Table Structure, OCR, embedding), materialization, terminal streaming, and retained-result concatenation. Local GPU actors and endpoint-backed CPU actors use the same stage names.Local model operations are annotated with
@nvtx.annotatedirectly on existing high-level methods. No methods exist only to hold a decorator:nrl.model::ocr_v2.invoke,nrl.model::page_elements.invoke,nrl.model::table_structure.invokenrl.model::llama_nemotron_embed_vl.{embed,embed_queries,embed_images,embed_text_image}on both embedder backends: the HF class andLlamaNemotronEmbedVL1BV2VLLMEmbedder, which is what vLLM-backend library runs (e.g. NRB) usenrl.model::vlm_captioner.caption_batch,nrl.model::parakeet_ctc.decode_batchThese ranges cover the whole operation, including CPU input preparation and postprocessing. Correlate them with the CUDA rows in Nsight Systems to see the device portion.
nrl.remote::nim.requestcovers the shared NIM HTTP request, including retries and backoff.Breaking changes for profiling users:
nemo_retriever.common.nvtx(gpu_inference_range). It duplicated native NVTX behavior and coupled annotations totorch.cuda.nvtx. All in-repo callers are migrated.gpu_inferencerange and the dynamicModel | bs=Nlabels.gpu_inferencewas misleading because it was not GPU-only time. Commands using--capture-range=nvtx --nvtx-capture=gpu_inferenceshould trigger onnrl.batch::pipeline.ingestinstead. No in-repo code or docs used that capture filter.NemotronOCRV1no longer emits model ranges. Live ingestion usesNemotronOCRV2.Scope: profiling structure and labels only. Scheduling, resource allocation, model inputs and outputs, retry policy, and pipeline results are unchanged.
Validation:
26.08-core-single-gpu-library-main, at c732f89): 767 files / 54,730 pages, nDCG@10 0.777, exit 0.nrl.batch::pipeline.ingestappears on the driver and actor ranges appear in 24 Ray worker processes. All OCR and Page Elements model ranges are nested inside their stage's batch range. Neithergpu_inferencenornrl.remote::nim.requestappears; every endpoint was local. In an earlier JP20 profile, the oldgpu_inferencerange started and ended with the model range nested inside it, and the GPU was busy for only ~25–27% of it.git diff --checkpass.Checklist
Link to Devin session: https://nvidia-cloud.devinenterprise.com/sessions/a2c7aa2145764e96a43c536ab8b8fbc5
Open in Devin Desktop: https://nvidia-cloud.devinenterprise.com/desktop/session/a2c7aa2145764e96a43c536ab8b8fbc5?variant=devin