Skip to content

Format native sources after cudf sync - #4778

Merged
ttnghia merged 6 commits into
NVIDIA:mainfrom
WilliamK112:codex/format-native-sources-after-cudf-sync
Jul 2, 2026
Merged

Format native sources after cudf sync#4778
ttnghia merged 6 commits into
NVIDIA:mainfrom
WilliamK112:codex/format-native-sources-after-cudf-sync

Conversation

@WilliamK112

@WilliamK112 WilliamK112 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Run the repository clang-format hook after the latest cudf submodule sync on main
  • Apply only the mechanical native-source formatting changes produced by the existing pre-commit configuration
  • Update the expired copyright years reported by license-header-check

Why

A local merge of #4752 onto current origin/main reproduced the current pre-commit.ci - pr failure: the clang-format hook modified native source files after the cudf sync in #4777. This PR applies those hook-generated changes directly on top of current main, then fixes the license-header files reported by the maintainer-triggered check.

Validation

  • pre-commit run clang-format --all-files --verbose initially reproduced the same files-were-modified failure
  • GitHub pre-commit.ci - pr passes on head ef703bfb
  • Local equivalent license-header-check regex passes for the 23 included changed files
  • uvx pre-commit run --files src/main/cpp/faultinj/faultinj.cu src/main/cpp/profiler/ProfilerJni.cpp src/main/cpp/profiler/init_nvtxw.cpp src/main/cpp/profiler/spark_rapids_profile_converter.cpp src/main/cpp/src/KudoGpuSerializerJni.cpp src/main/cpp/src/zorder.cu src/main/cpp/tests/exception_with_row_index.cpp src/main/cpp/tests/multiply.cpp --verbose passes
  • git diff --check passes
  • git diff --check origin/main...HEAD passes

Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR applies the clang-format pre-commit hook output after the cudf submodule sync in #4777, and updates expired copyright years across the same 26 files. All changes are purely mechanical with no logic, behavior, or API alterations.

  • East-const style uniformly applied: every const T qualifier is reordered to T const (including pointer params, local variables, catch clauses, and range-for bindings) to match the project's clang-format configuration.
  • Copyright years bumped to 2026 across all touched files; nvtxw3.h additionally adopts the upstream nvtxw library's canonical copyright format (NVIDIA CORPORATION & AFFILIATES. All rights reserved.).

Confidence Score: 5/5

Safe to merge — purely mechanical clang-format output with no logic, algorithm, or API changes.

Every changed line is either a const qualifier reordering (const TT const) or a copyright year bump. No function signatures, data structures, memory layouts, or control flow are altered. The pre-commit CI passes on the head commit, and git diff --check is clean.

No files require special attention. The copyright format difference in nvtxw3.h (adds "& AFFILIATES. All rights reserved.") reflects the upstream nvtxw library's own header and is not a concern.

Important Files Changed

Filename Overview
src/main/cpp/src/row_conversion.cu Largest mechanical change: east-const style applied to CUDA kernel parameters and local variables (e.g. const size_type*size_type const*); no logic altered
src/main/cpp/faultinj/faultinj.cu East-const style applied throughout and copyright year extended to 2026; volatile uint32_t reordered to uint32_t volatile (semantically equivalent)
src/main/cpp/profiler/nvtxw3.h East-const formatting and copyright notice changed from plain NVIDIA CORPORATION. to NVIDIA CORPORATION & AFFILIATES. All rights reserved. (upstream nvtxw library format)
src/main/cpp/profiler/NvtxwEvents.cpp East-const style applied to all static const schema arrays and schema attr structs; no logic changes
src/main/cpp/profiler/nvtxw3.cpp East-const style applied to function parameters and local variables; copyright year extended to 2026
src/main/cpp/tests/multiply.cpp Copyright year extended to 2026; east-const applied to catch clause types and range-for binding (const auto&auto const&)
src/main/cpp/src/KudoGpuSerializerJni.cpp Copyright year extended to 2025-2026; single const qualifier reordered to east-const style
src/main/cpp/tests/exception_with_row_index.cpp Copyright year extended to 2026; east-const style applied to catch clause types

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[cudf submodule sync - PR 4777] --> B[pre-commit clang-format hook\ndetects style drift]
    B --> C{Files modified?}
    C -- Yes --> D[Apply east-const formatting\nconst T → T const\nacross 26 native source files]
    D --> E[Update expired copyright years\n2024/2025 → 2026]
    E --> F[pre-commit.ci - pr passes\non head ef703bfb]
    C -- No --> F
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[cudf submodule sync - PR 4777] --> B[pre-commit clang-format hook\ndetects style drift]
    B --> C{Files modified?}
    C -- Yes --> D[Apply east-const formatting\nconst T → T const\nacross 26 native source files]
    D --> E[Update expired copyright years\n2024/2025 → 2026]
    E --> F[pre-commit.ci - pr passes\non head ef703bfb]
    C -- No --> F
Loading

Reviews (3): Last reviewed commit: "Apply suggestion from @ttnghia" | Re-trigger Greptile

ttnghia
ttnghia previously approved these changes Jul 2, 2026
@ttnghia

ttnghia commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

build

@ttnghia

ttnghia commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Should fix the licence header first.

Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
@WilliamK112

Copy link
Copy Markdown
Contributor Author

Fixed in ef703bfb.

I updated the eight files reported by license-header-check so their copyright years include 2026, then double-checked locally with the same year regex across the 23 included changed files. Local validation also passed for the touched files with uvx pre-commit run --files ... --verbose, plus git diff --check and git diff --check origin/main...HEAD.

The new head already has pre-commit.ci - pr, signoff-check, and Greptile passing. The license header check and shell check runs for the fork synchronize event now show action_required with no jobs, so they need a maintainer rerun/approval (or another build) to execute on GitHub.

@ttnghia

ttnghia commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

build

@res-life

res-life commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator
  • NvtxwEvents.h: 2025 → 2025-2026
  • init_nvtxw.h: 2025 → 2025-2026
  • nvtxw3.h: 2023 → 2023-2026

@res-life

res-life commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

duplicated with #4780

Comment thread src/main/cpp/profiler/nvtxw3.h Outdated
Comment thread src/main/cpp/profiler/NvtxwEvents.h Outdated
Comment thread src/main/cpp/profiler/init_nvtxw.h Outdated
Comment thread src/main/cpp/profiler/nvtxw3.h Outdated
@ttnghia

ttnghia commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

build

@ttnghia
ttnghia merged commit 56d775e into NVIDIA:main Jul 2, 2026
6 checks 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