Fixed the maybe-uninitialized compilation error#424
Merged
rapids-bot[bot] merged 2 commits intoNVIDIA:branch-25.10from Oct 2, 2025
Merged
Fixed the maybe-uninitialized compilation error#424rapids-bot[bot] merged 2 commits intoNVIDIA:branch-25.10from
rapids-bot[bot] merged 2 commits intoNVIDIA:branch-25.10from
Conversation
akifcorduk
approved these changes
Oct 1, 2025
Contributor
Author
|
/ok to test b909bd0 |
Contributor
|
/merge |
jieyibi
pushed a commit
to yining043/cuopt
that referenced
this pull request
Mar 26, 2026
Main branch fails to compile due to the `maybe-uninitialized` error in the `bytes` variable in the `linear_programming/utils.cuh` file (see the log below), which is fixed by this PR.
```
[1/3] Building CUDA object CMakeFiles/cuopt.dir/src/linear_programming/pdlp.cu.o
FAILED: [code=1] CMakeFiles/cuopt.dir/src/linear_programming/pdlp.cu.o
ccache /home/nguidotti/miniconda/envs/cuopt_dev/bin/nvcc -forward-unknown-to-host-compiler -DCCCL_DISABLE_PDL -DCUB_DISABLE_NAMESPACE_MAGIC -DCUB_IGNORE_NAMESPACE_MAGIC_ERROR -DCUOPT_CPU_ARCHITECTURE=\"x86_64\" -DCUOPT_CUDA_ARCHITECTURES=\"90a-real\" -DCUOPT_GIT_COMMIT_HASH=\"326eec6\" -DCUOPT_LOG_ACTIVE_LEVEL=RAPIDS_LOGGER_LOG_LEVEL_INFO -DCUTLASS_NAMESPACE=raft_cutlass -DLIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE -DNVTX_ENABLED -DRAFT_LOG_ACTIVE_LEVEL=RAPIDS_LOGGER_LOG_LEVEL_INFO -DRAFT_SYSTEM_LITTLE_ENDIAN=1 -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CUDA -DTHRUST_DISABLE_ABI_NAMESPACE -DTHRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_CPP -DTHRUST_IGNORE_ABI_NAMESPACE_ERROR -Dcuopt_EXPORTS -I/cuopt-dev/cuopt/cpp/../thirdparty -I/cuopt-dev/cuopt/cpp/src -I/cuopt-dev/cuopt/cpp/include -I/cuopt-dev/cuopt/cpp/build/include -I/cuopt-dev/cuopt/cpp/libmps_parser/include -I/cuopt-dev/cuopt/cpp/build/_deps/cccl-src/lib/cmake/thrust/../../../thrust -I/cuopt-dev/cuopt/cpp/build/_deps/cccl-src/lib/cmake/libcudacxx/../../../libcudacxx/include -I/cuopt-dev/cuopt/cpp/build/_deps/cccl-src/lib/cmake/cub/../../../cub -isystem /cuopt-dev/cuopt/cpp/build/_deps/papilo-src/src -isystem /cuopt-dev/cuopt/cpp/build/_deps/papilo-build -isystem /home/nguidotti/miniconda/envs/cuopt_dev/targets/x86_64-linux/include -isystem /home/nguidotti/miniconda/envs/cuopt_dev/targets/x86_64-linux/include/cccl --expt-relaxed-constexpr --expt-extended-lambda -static-global-template-stub=false -O3 -DNDEBUG -lineinfo -std=c++17 "--generate-code=arch=compute_90a,code=[sm_90a]" -Xcompiler=-fPIC -Werror=cross-execution-space-call -Wno-deprecated-declarations -Xcompiler=-Werror -Xcompiler=-Wall -Wno-error=non-template-friend -Xfatbin=-compress-all -fopenmp -lineinfo --expt-extended-lambda --expt-relaxed-constexpr -MD -MT CMakeFiles/cuopt.dir/src/linear_programming/pdlp.cu.o -MF CMakeFiles/cuopt.dir/src/linear_programming/pdlp.cu.o.d -x cu -c /cuopt-dev/cuopt/cpp/src/linear_programming/pdlp.cu -o CMakeFiles/cuopt.dir/src/linear_programming/pdlp.cu.o
/cuopt-dev/cuopt/cpp/src/linear_programming/utils.cuh: In function 'void cuopt::linear_programming::detail::compute_sum_bounds(const rmm::device_uvector<i_t>&, const rmm::device_uvector<i_t>&, rmm::device_scalar<i_t>&, rmm::cuda_stream_view) [with f_t = double]':
/cuopt-dev/cuopt/cpp/src/linear_programming/utils.cuh:225:22: error: 'bytes' may be used uninitialized [-Werror=maybe-uninitialized]
225 | d_temp_storage.resize(bytes, stream_view);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/cuopt-dev/cuopt/cpp/src/linear_programming/utils.cuh:205:8: note: 'bytes' was declared here
205 | size_t bytes;
| ^~~~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
```
Authors:
- Nicolas L. Guidotti (https://github.com/nguidotti)
Approvers:
- Akif ÇÖRDÜK (https://github.com/akifcorduk)
URL: NVIDIA#424
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main branch fails to compile due to the
maybe-uninitializederror in thebytesvariable in thelinear_programming/utils.cuhfile (see the log below), which is fixed by this PR.