Skip to content

Update Paddle examples for Paddle 3.4 - #6446

Open
JanuszL wants to merge 7 commits into
NVIDIA:mainfrom
JanuszL:paddle-3.4-example-compatibility
Open

Update Paddle examples for Paddle 3.4#6446
JanuszL wants to merge 7 commits into
NVIDIA:mainfrom
JanuszL:paddle-3.4-example-compatibility

Conversation

@JanuszL

@JanuszL JanuszL commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Category:

Bug fix

Description:

Updates the Paddle TSM inference and ResNet50 training examples for Paddle 3.4 while retaining the Paddle 2.6.1 legacy-static path.

The examples select legacy static graph mode before Paddle is imported, avoid static APIs removed or incompatible in Paddle 3.4, preserve the published TSM checkpoint parameter names, and update the CUDA 13 QA dependency to paddlepaddle-gpu==3.4.0.

Additional information:

Affected modules and functionalities:

  • Paddle TSM inference example and checkpoint loading
  • Paddle ResNet50 training and evaluation example
  • Paddle QA package resolution for CUDA 13
  • Paddle example RST documentation

Key points relevant for the review:

  • TSM retains the pretrained checkpoint parameter names after replacing the deprecated convolution and batch-normalization helpers.
  • ResNet uses Paddle 3.4-compatible legacy-static fallbacks for Fleet, ExecutionStrategy, and label-smoothed loss construction.
  • CUDA 13 resolves Paddle 3.4.0; CUDA 12 continues to resolve Paddle 2.6.1.post120.

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
      • TL3_RN50_convergence
      • TL3_RN50_short
      • TL1_paddle_tsm
    • GTests
    • Benchmark
    • Other

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@greptile-apps

greptile-apps Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR updates the Paddle examples and DALI integration for Paddle 3.4 while retaining legacy-static compatibility.

  • Forces legacy static graph mode before importing Paddle in the ResNet and TSM entrypoints.
  • Replaces incompatible Paddle APIs while preserving TSM checkpoint parameter names.
  • Updates Paddle QA package selection and adds LoD clipping compatibility coverage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
docs/examples/use_cases/paddle/resnet50/train.py Unconditionally selects legacy static mode before Paddle imports, fully addressing the prior inherited-PIR-mode finding.
docs/examples/use_cases/paddle/tsm/infer.py Selects legacy static mode before importing Paddle for the direct TSM inference entrypoint.
docs/examples/use_cases/paddle/resnet50/program.py Adds Paddle 3.4-compatible static graph, execution strategy, and label-smoothed loss handling.
dali/python/nvidia/dali/plugin/paddle.py Adds a Paddle 3.4 fallback for obtaining recursive LoD sequence lengths.
dali/test/python/test_fw_iterators.py Adds expected-value coverage for clipping dense and LoD Paddle tensors.
qa/setup_packages.py Updates Paddle package resolution for the supported CUDA configurations.

Reviews (12): Last reviewed commit: "Remove unreachable PIR paths from TSM ex..." | Re-trigger Greptile

Comment thread docs/examples/use_cases/paddle/resnet50/train.py Outdated
@JanuszL

JanuszL commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@greptile review

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61571746]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61571746]: BUILD FAILED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61624261]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61624261]: BUILD FAILED

@JanuszL
JanuszL force-pushed the paddle-3.4-example-compatibility branch from cf99192 to 162f6bd Compare August 8, 2026 10:17
@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61701783]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61701783]: BUILD FAILED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61806978]: BUILD STARTED

@JanuszL
JanuszL force-pushed the paddle-3.4-example-compatibility branch from 162f6bd to 48a70d0 Compare August 9, 2026 10:56
- makes PaddlePaddle examples compatible with verion 3+
- renames tests names to PaddlePaddle to match the upstream
  naming convention

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61807198]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61807198]: BUILD FAILED

@JanuszL
JanuszL force-pushed the paddle-3.4-example-compatibility branch from 48a70d0 to 32faa0b Compare August 9, 2026 17:15
@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61839039]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61839039]: BUILD PASSED

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL
JanuszL force-pushed the paddle-3.4-example-compatibility branch from 80ac857 to 18a9073 Compare August 10, 2026 09:03
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL
JanuszL force-pushed the paddle-3.4-example-compatibility branch from c685e1f to 9476720 Compare August 10, 2026 09:15
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL
JanuszL force-pushed the paddle-3.4-example-compatibility branch from 9476720 to 964ce78 Compare August 10, 2026 09:25
@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61932660]: BUILD STARTED

Comment thread docs/examples/use_cases/paddle/resnet50/paddle-resnet50.rst
Comment thread docs/examples/use_cases/paddle/resnet50/program.py
Comment thread docs/examples/use_cases/paddle/resnet50/program.py Outdated
Comment thread docs/examples/use_cases/paddle/resnet50/program.py Outdated
@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61932660]: BUILD PASSED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61952959]: BUILD STARTED

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61954229]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61954241]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61954229]: BUILD PASSED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [61954241]: BUILD PASSED

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.

4 participants