• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pytorch / opacus / 17145830368 / 3
80%
main: 80%

Build:
DEFAULT BRANCH: main
Ran 22 Aug 2025 04:22AM UTC
Files 70
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Aug 2025 06:55PM UTC coverage: 47.815% (-0.1%) from 47.924%
17145830368.3

push

github

facebook-github-bot
Tensor Parallelism -- Review Version (#776)

Summary:
Pull Request resolved: https://github.com/pytorch/opacus/pull/776

We add a class named `grad_sample_module_fast_gradient_clipping_tp` to support 1D tensor parallelism for Opacus. We demonstrate the effectiveness on a toy example (examples/tp_toy.py) and llama 2 model (examples/tp_llama.py).

The key contribution is to understand when merging per-sample norms from different local devices, the operation should be `reduce_all` or just keep the norm from device 0. Specifically, under the following exceptions:
1. The parameter is not a DTensor.
2. The model is nn.embedding and under RowWiseParallel.
3. The parameter is nn.linear.bias under RowWiseParallel.
We should not merge the per-sample norm from local devices, but maintain the one from device 0.

Currently, we do not support
1. Vanilla Opacus mode (non-GC).
2. Sequential Parallelism (usually applied to LayerNormalization).
3. Modify/customize the placements of module outputs, which might lead to wrong behavior of norm calculation.
4. Trainable parameter being a plain tensor or replicated because of the constraint of the optimizer.

Reviewed By: aparna-aketi

Differential Revision: D79062242

fbshipit-source-id: ffaf071d1

1466 of 3066 relevant lines covered (47.81%)

0.48 hits per line

Source Files on job run-3 - 17145830368.3
  • Tree
  • List 70
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 17145830368
  • 64609f35 on github
  • Prev Job for on main (#17054582968.2)
  • Next Job for on main (#17171044296.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc