Skip to content

feat(aiperf-qual): native references for Chinese-CLIP and Stable Video Diffusion - #2658

Draft
chaofengw-nv wants to merge 4 commits into
NVIDIA:mainfrom
chaofengw-nv:feat/aiperf-native-refs-2
Draft

chaofengw-nv wants to merge 4 commits into
NVIDIA:mainfrom
chaofengw-nv:feat/aiperf-native-refs-2

Conversation

@chaofengw-nv

Copy link
Copy Markdown
Collaborator

Background

Three ready catalog profiles have no native path in the AIPerf qualification, so trtmc-aiperf-qual matrix lists them as blocked and a formal run cannot start with them in scope:

Profile Task
chinese-clip-vit-base-patch16 text_image_to_relevance
svd-xt initial_image_text_to_video
svd-xt-fp32 initial_image_text_to_video

Stable Video Diffusion has three further gaps:

  • It is an image-only model. Its testcases state no prompt, and its runtime refuses a non-empty one. The benchmark's catalog request requires a prompt, so it cannot resolve the case.
  • The COCO image-to-video suites fit each start frame to the request's width and height. The worker passes those as Task config, and SVD declares neither, so the request cannot carry them.
  • The testcase image is test_img.jpeg. Its E2E prefixes data/, while the benchmark resolves assets relative to tests/.

Exit Criteria

  • Each of the three profiles has a native reference that computes what its family E2E reference computes, and matrix lists it as executable.
  • An image-only initial_image_text_to_video testcase resolves to the empty prompt. Testcases that state a prompt are unchanged.
  • An image-to-video suite whose request states no size fits its frames to the bundle's video size. Requests that state a size are unchanged.
  • The three profiles run end to end on GB300 (Acc and Perf).

Implementation

  • families/chinese_clip/reference/adapter.py: ChineseCLIPModel with ChineseCLIPProcessor(use_fast=False). As in tests/test_e2e.py, the queries are padded to 64 tokens, input_ids and attention_mask are passed, and each pair is scored as the logit scale times the cosine of the projected embeddings (the runtime's logit). Imagenette's class prompts are English; the benchmark gate is the regression against native on the same prompts.
  • families/stable_video_diffusion/reference/adapter.py: Diffusers StableVideoDiffusionPipeline on the initial image at its size and the bundle's frame count (options.num_frames). It uses the request's steps, seed and conditioning controls, and the noise stream the E2E reproduces: a CPU generator draws the float32 conditioning-image noise, then the float32 latents, cast to the pipeline dtype. A non-empty prompt is refused, as the runtime does.
  • apps/benchmark/trtmc_benchmark/task_adapters.py: an initial_image_text_to_video testcase without a prompt resolves to prompt: "". num_steps is read alongside num_inference_steps, and a case stating both is refused. The unit test covers both.
  • apps/aiperf_qual/trtmc_aiperf_qual/models.py and suites.py: a suite with fit_to_request gets the bundle's video size (the manifest's image_width x image_height) as fit_size. It is used only when the request states no size. The unit test covers the size and when it applies.
  • families/stable_video_diffusion/tests/manifests/*.json and tests/test_e2e.py: the image is data/test_img.jpeg, relative to tests/, which is how the other families state it. The E2E reads it from that path.
  • config/models/: chinese-clip-vit-base-patch16.yaml, svd-xt.yaml and svd-xt-fp32.yaml.

Change categories

  • Model or runtime behavior
  • Public API
  • ABI
  • Bundle or artifact format
  • Dependencies
  • Documentation only
  • CI or developer tooling

Validation

Commands and Results

  • ruff check --config ruff.toml, py_compile and python tools/legal_headers.py --check: passed.
  • The three catalog cases resolve: svd-xt and svd-xt-fp32 to generate_image with prompt: "", their steps, seed and image; chinese-clip-vit-base-patch16 to relevance with its two queries.
  • trtmc-aiperf-qual matrix against a GB300-platform environment: the three profiles are executable, with the new native paths.
  • GB300 Acc/Perf run of the three profiles: pending, results will follow in a comment.

Hardware, Environment, and Revisions

  • Base: current main. Static checks on a Linux x86_64 host.

Not Run / Remaining Gaps

  • No local pytest run; the unit tests run in CI. The SVD E2E change is a path only.
  • The GB300 run is pending.

Contributor Self-Review

  • I have completed a self-review of this change.

Risk level

  • Low
  • Medium
  • High

New references and configurations for three profiles that could not run before. The request and suite changes apply only to cases that state no prompt or no size.

…o Diffusion

Chinese-CLIP scores each query as the logit scale times the cosine, with the Python processor and
the 64-token window its E2E uses. Stable Video Diffusion runs Diffusers' pipeline on the initial
image alone with the runtime's noise stream. Its testcases state no prompt, so the benchmark sends
the empty prompt the Task requires and reads num_steps. The COCO start frames are fitted to the
bundle's video size when the request states none, since SVD declares no width or height config.
The SVD testcase image paths are now relative to tests/, as the benchmark resolves them.

Signed-off-by: chaofengw <chaofengw@nvidia.com>
@chaofengw-nv chaofengw-nv self-assigned this Nov 25, 2026
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

trtmc-bench fills the catalog request's width and height from the manifest, and the worker passes
them as Task config, which Stable Video Diffusion does not declare. A null in a suite request now
removes the field, as it already does for an absolute benchmark's request; the SVD profiles null
width and height, and their start frames are fitted to the bundle's video size.

Signed-off-by: chaofengw <chaofengw@nvidia.com>
…s them

Revert the null-removal and bundle-size fitting: the request keeps the catalog size, as the request
contract requires. The worker treats height and width as the expected frame size of an image-to-video
Task that declares no size config, as it does num_frames, and checks the result against them. A
per-frame guidance range (min and max guidance scale) states a request's guidance; the SVD profiles
state it at the pipeline's defaults.

Signed-off-by: chaofengw <chaofengw@nvidia.com>
…me does

Signed-off-by: chaofengw <chaofengw@nvidia.com>

This branch has not been deployed

No deployments
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