Skip to content

Fix compiler warnings for 0.99.3 release - #472

Merged
tamar-dewilde merged 4 commits into
release-99-3from
tamar/release-warning-cleanup
Aug 13, 2026
Merged

Fix compiler warnings for 0.99.3 release#472
tamar-dewilde merged 4 commits into
release-99-3from
tamar/release-warning-cleanup

Conversation

@tamar-dewilde

Copy link
Copy Markdown
Collaborator

Description

Cleans up compiler warnings found during 0.99.3 release testing.

@pelesh

Proposed changes

  • Fix the CPU unused parameter warning in sysRefactor.
  • Fix HIP unused parameter and variable warnings.
  • Make HIP signed/unsigned conversions explicit.

Checklist

  • All tests pass (make test and make test_install per testing instructions). Code tested on
    • CPU backend
    • CUDA backend
    • HIP backend
  • I have manually run the non-experimental examples and verified that residuals are close to machine precision. (In your build directory run: ./examples/<your_example>.exe -h to get instructions how to run examples). Code tested on:
    • CPU backend
    • CUDA backend
    • HIP backend
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
    • CPU: 0 warnings
    • HIP: 0 warnings
    • CUDA: deprecation warnings remain
  • The new code follows Re::Solve style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • I have updated CHANGELOG.md to reflect the changes in this PR. If this is a minor PR that is part of a larger fix already included in the file, state so.
    • No CHANGELOG update needed since this is only a warning cleanup for the 0.99.3 release.

Further comments

CPU and HIP compile cleanly with -Wall -Wpedantic -Wconversion -Wextra.

CUDA still reports the expected cuSOLVER/cuSolverRF deprecation warnings recommending cuDSS. There are also deprecation warnings from the cuSPARSE csrilu02 ILU0 interface. Removing those would require a larger API update, so I left them unchanged for now. Let me know if you would like me to include that cleanup before the release.

@tamar-dewilde tamar-dewilde self-assigned this Aug 13, 2026

@pelesh pelesh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, thanks!

I think there is a better way to do conversions from Re::Solves index_type to native HIP/CUDA index types but this is beyond the scope of this PR.

I left suggestions how type casts could be done more elegantly but haven't. test them myself. You may want to check that quickly.

Comment thread resolve/hip/hipVectorKernels.hip Outdated
Comment on lines +180 to +183
const int block_size = 256;
int num_blocks = (n + block_size - 1) / block_size;
// Launch the kernel
kernels::scale<<<num_blocks, block_size>>>(n, diag, vec);
kernels::scale<<<static_cast<unsigned int>(num_blocks), static_cast<unsigned int>(block_size)>>>(n, diag, vec);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a better solution here would be to define

const size_t block_size = 256;
const size_t num_blocks = (n + block_size - 1) / block_size;

That would eliminate the need for static_casts.

Similar to the subsequent instances.

Comment thread resolve/hip/hipVectorKernels.hip Outdated
Comment on lines 160 to 162
index_type num_blocks;
index_type block_size = 512;
num_blocks = (n + block_size - 1) / block_size;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would define num_blocks and block_size as const size_t type. That would eliminate the need for static casts.

@shakedregev shakedregev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, this works.

@tamar-dewilde
tamar-dewilde force-pushed the tamar/release-warning-cleanup branch from fe41abd to 0312f81 Compare August 13, 2026 14:43
@tamar-dewilde

Copy link
Copy Markdown
Collaborator Author

Applied the review suggestions and retested. Everything still passes.

@tamar-dewilde
tamar-dewilde merged commit d15bc2c into release-99-3 Aug 13, 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.

3 participants