Skip to content

Fix new compiler warning failures#1199

Merged
cliffburdick merged 1 commit into
mainfrom
cburdick/fix-new-compiler-warnings
Jun 5, 2026
Merged

Fix new compiler warning failures#1199
cliffburdick merged 1 commit into
mainfrom
cburdick/fix-new-compiler-warnings

Conversation

@cliffburdick

Copy link
Copy Markdown
Collaborator

No description provided.

@copy-pr-bot

copy-pr-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cliffburdick cliffburdick requested a review from tbensonatl June 4, 2026 18:38
@cliffburdick

Copy link
Copy Markdown
Collaborator Author

/build

@greptile-apps

greptile-apps Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR silences new compiler warning failures triggered by nvc++ and other compilers across three files, with no logic changes.

  • CMakeLists.txt: adds --diag_suppress,if_consteval_in_nonconstexpr_function only for CUDA TUs when using nvc++, targeting a known libcudacxx incompatibility.
  • pybind.h: adds [[maybe_unused]] to valid_size, which becomes unused when MATX_ASSERT_STR is compiled out in NDEBUG builds.
  • sar_bp.cuh: introduces an explicitly-typed strict_compute_t phase variable to avoid implicit narrowing from the multiplication result to sincosf's float argument.

Confidence Score: 5/5

All three changes are narrow warning suppressions that do not alter runtime behavior; safe to merge.

Each fix is minimal and targeted: the CMake suppression is correctly scoped to CUDA TUs under nvc++, the [[maybe_unused]] annotation matches the well-known NDEBUG/assert pattern, and the explicit static_cast in the SAR kernel preserves the existing floating-point semantics while making the type conversion explicit. No logic is changed in any file.

No files require special attention.

Important Files Changed

Filename Overview
CMakeLists.txt Adds nvc++ else branch to suppress if_consteval_in_nonconstexpr_function diagnostic for CUDA compilation; uses correct generator-expression scoping so it only applies to CUDA TUs.
include/matx/core/pybind.h Annotates valid_size with [[maybe_unused]] to suppress the unused-variable warning emitted when MATX_ASSERT_STR compiles away in NDEBUG builds; the variable is still read in debug builds.
include/matx/kernels/sar_bp.cuh Hoists phase_correction_partial * range_delta into an explicitly-typed strict_compute_t phase variable to avoid implicit narrowing-conversion warnings when the product type differs from the sincosf argument type.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Compiler Warning Failures] --> B{Compiler type?}
    B -->|nvc++| C[CMakeLists.txt\nSuppress if_consteval_in_nonconstexpr_function\nfor CUDA translation units only]
    B -->|Any compiler| D[pybind.h\nAdd maybe_unused to valid_size\nsilences unused-var in NDEBUG builds]
    B -->|Any compiler| E[sar_bp.cuh\nHoist phase_correction_partial * range_delta\ninto explicit strict_compute_t phase\nremoves narrowing-conversion warning]
    C --> F[Warnings resolved]
    D --> F
    E --> F
Loading

Reviews (1): Last reviewed commit: "Fix new compiler warning failures" | Re-trigger Greptile

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 93.573%cburdick/fix-new-compiler-warnings into main. No base build found for main.

@cliffburdick cliffburdick merged commit 5039f7c into main Jun 5, 2026
1 check passed
@cliffburdick cliffburdick deleted the cburdick/fix-new-compiler-warnings branch June 5, 2026 16:40
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.

3 participants