Skip to content

Run trailing-whitespace and end-of-file-fixer pre-commit hooks [7/8] - #1495

Merged
ScottTodd merged 1 commit into
ROCm:developfrom
ScottTodd:pre-commit-clean-8
Sep 9, 2025
Merged

ScottTodd merged 1 commit into
ROCm:developfrom
ScottTodd:pre-commit-clean-8

Conversation

@ScottTodd

Copy link
Copy Markdown
Member

Motivation

Progress on #1480. This gets us closer to being able to run pre-commit across the whole project and then enable it continuously. Having consistent automated style checks will make contributing to multiple subprojects at a time significantly easier.

Technical Details

Generated with

pre-commit run end-of-file-fixer --all-files
pre-commit run trailing-whitespace --all-files

This covers all files under:

  • projects/rocthrust/

@codecov-commenter

codecov-commenter commented Sep 9, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1495      +/-   ##
===========================================
+ Coverage    79.43%   84.23%   +4.80%     
===========================================
  Files          561      498      -63     
  Lines        49211    41773    -7438     
  Branches      6084     5275     -809     
===========================================
- Hits         39087    35186    -3901     
+ Misses        5722     2487    -3235     
+ Partials      4402     4100     -302     
Flag Coverage Δ
rocRAND ?
rocThrust 84.23% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...hrust/thrust/detail/allocator/tagged_allocator.inl 100.00% <ø> (ø)
projects/rocthrust/thrust/detail/reduce.inl 100.00% <ø> (ø)
projects/rocthrust/thrust/detail/remove.inl 100.00% <ø> (ø)
projects/rocthrust/thrust/detail/replace.inl 100.00% <ø> (ø)
projects/rocthrust/thrust/detail/reverse.inl 100.00% <ø> (ø)
projects/rocthrust/thrust/detail/scan.inl 100.00% <ø> (ø)
projects/rocthrust/thrust/detail/scatter.inl 100.00% <ø> (ø)
projects/rocthrust/thrust/detail/sequence.inl 100.00% <ø> (ø)
...rojects/rocthrust/thrust/detail/set_operations.inl 100.00% <ø> (ø)
projects/rocthrust/thrust/detail/shuffle.inl 100.00% <ø> (ø)
... and 37 more

... and 83 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ScottTodd
ScottTodd merged commit 67bb5c4 into ROCm:develop Sep 9, 2025
@ScottTodd
ScottTodd deleted the pre-commit-clean-8 branch September 9, 2025 19:12
assistant-librarian Bot pushed a commit to ROCm/rocThrust that referenced this pull request Sep 9, 2025
Run trailing-whitespace and end-of-file-fixer pre-commit
 hooks [7/8] (#1495)

## Motivation

Progress on ROCm/rocm-libraries#1480. This
gets us closer to being able to run pre-commit across the whole project
and then enable it continuously. Having consistent automated style
checks will make contributing to multiple subprojects at a time
significantly easier.

## Technical Details

Generated with
```
pre-commit run end-of-file-fixer --all-files
pre-commit run trailing-whitespace --all-files
```

This covers all files under:
* `projects/rocthrust/`
AviralGoelAMD added a commit that referenced this pull request Jul 10, 2026
#9129)

Enables the **unoptimized** head-dim-256 (D256) bf16 flash **prefill**
kernel to *compile and run correctly* on **gfx942 + gfx950**..

## Problem
- **gfx950:** D256 prefill's register-PV spec requests ~200 KB LDS > the
160 KB cap → `hipcc: local memory (204800) exceeds limit (163840)`.
- **gfx942:** D256 must stay within the 64 KB cap; the larger tile is
infeasible.

## Changes (6 files, +522/−16)
- **`_resolve_lds_budget` (gfx950)** — deterministically shrinks an
over-budget register-PV 2D spec to fit the arch LDS cap via a validated,
cheapest-first ladder: single-buffer-K → T=64 → both. No-op for anything
that already fits or is not register-PV (every currently-compiling
config stays byte-identical); raises a clear diagnostic if nothing fits.
Hooked as a post-processor on `_tiled_spec_from_problem`.
- **`_tiled_2d_lds_bytes` (shared footprint model)** — single source of
truth for the tiled-2D LDS math, used by **both** the gfx942 admission
gate and the gfx950 resolver so they can't silently drift. gfx942
`supports_tiled_2d` refactored onto it (byte-identical for bf16/fp16;
Acc term now correctly fixed 16-bit).
- **C++ engine mirror** — resolver + shared model mirrored in
`attention_unified_selectors.{h,cpp}` + gfx942 glue, preserving the
dual-backend (C++ ≡ Python) contract.
- **Test** — `test_lds_budget_resolver.py` (8 cases: shrink ladder,
no-op off-gfx950, non-register-PV passthrough, infeasible-raise).

## Verification
- Resolver unit test: **8/8**.
- **Byte-identity GREEN** — C++ ≡ Python LLVM-IR across all 10 attention
families (gfx950 tiled-2D 53 cfg, gfx942 7 + 50 stress).
- **No regression** — attention build/selection tests identical to the
develop baseline.
- **GPU-verified** correct (fp32 ref, tol 2e-2): gfx950 D256 bs64
(resolver → single-buffer-K, ~2.3 ms on MI355X) and gfx942 D256 bs16
(native fit, ~22 ms on MI300X). bs64/T=128 on gfx942 is LDS-infeasible
and is correctly rejected by the gate.


JIRA ID - #1495
stanleytsang-amd pushed a commit that referenced this pull request Sep 18, 2026
…1495)

## Motivation

Progress on #1480. This
gets us closer to being able to run pre-commit across the whole project
and then enable it continuously. Having consistent automated style
checks will make contributing to multiple subprojects at a time
significantly easier.

## Technical Details

Generated with
```
pre-commit run end-of-file-fixer --all-files
pre-commit run trailing-whitespace --all-files
```

This covers all files under:
* `projects/rocthrust/`
mpanoop pushed a commit to mpanoop/rocm-libraries that referenced this pull request Oct 5, 2026
…OCm#1495)

## Motivation

Progress on ROCm#1480. This
gets us closer to being able to run pre-commit across the whole project
and then enable it continuously. Having consistent automated style
checks will make contributing to multiple subprojects at a time
significantly easier.

## Technical Details

Generated with
```
pre-commit run end-of-file-fixer --all-files
pre-commit run trailing-whitespace --all-files
```

This covers all files under:
* `projects/rocthrust/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants