ROCm / ROCm/rocAL

[Issue]: Tests - Compile warnings

Open
#497 3 comments 0 reactions 2 assignees View on GitHub

@levxn is already working on this.

Since Aug 10, 2026.

bug
Dominant language
C++
Stars
25
Forks
26
Avg merge
5d 1h
Merged PRs (30d)
2

Description

Problem Description
11: ======== End CMake output ======
11: Change Dir: '/__w/rocAL/rocAL/build/tests/cpp_api/unit_tests'
11: 
11: Run Clean Command: /usr/bin/gmake -f Makefile clean
11: 
11: Run Build Command(s): /usr/bin/gmake -f Makefile
11: [ 50%] Building CXX object CMakeFiles/unit_tests.dir/unit_tests.cpp.o
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1190:18: warning: unused variable 'tensor_sum' [-Wunused-variable]
11:  1190 |             auto tensor_sum = rocalTensorSum(handle, input, false, ROCAL_NONE, ROCAL_FP32);
11:       |                  ^~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1191:18: warning: unused variable 'tensor_min' [-Wunused-variable]
11:  1191 |             auto tensor_min = rocalTensorMin(handle, input, false, ROCAL_NONE, ROCAL_UINT8);
11:       |                  ^~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1192:18: warning: unused variable 'tensor_max' [-Wunused-variable]
11:  1192 |             auto tensor_max = rocalTensorMax(handle, input, false, ROCAL_NONE, ROCAL_UINT8);
11:       |                  ^~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1194:18: warning: unused variable 'tensor_stddev' [-Wunused-variable]
11:  1194 |             auto tensor_stddev = rocalTensorStdDev(handle, input, tensor_mean, false, ROCAL_NONE, ROCAL_FP32);
11:       |                  ^~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1434:21: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1434 |                     hipMalloc(&d_f32_batch_output, 256 * ((input_batch_size * h * w * p * sizeof(float)) / 256 + 1));
11:       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1436:21: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1436 |                     hipFree(d_f32_batch_output);
11:       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1439:21: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1439 |                     hipMalloc(&d_f16_batch_output, 256 * ((input_batch_size * h * w * p * sizeof(half)) / 256 + 1));
11:       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1441:21: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1441 |                     hipFree(d_f16_batch_output);
11:       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1455:17: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1455 |                 hipMalloc(&d_f32_batch_output, 256 * ((input_batch_size * h * w * p * sizeof(float)) / 256 + 1));
11:       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1457:17: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1457 |                 hipFree(d_f32_batch_output);
11:       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1460:17: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1460 |                 hipMalloc(&d_f16_batch_output, 256 * ((input_batch_size * h * w * p * sizeof(half)) / 256 + 1));
11:       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1462:17: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1462 |                 hipFree(d_f16_batch_output);
11:       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1220:10: warning: unused variable 'last_batch_padded_size' [-Wunused-variable]
11:  1220 |     auto last_batch_padded_size = rocalGetLastBatchPaddedSize(handle);
11:       |          ^~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1235:9: warning: variable 'index' set but not used [-Wunused-but-set-variable]
11:  1235 |     int index = 0;
11:       |         ^
11: 14 warnings generated when compiling for gfx1030.
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1190:18: warning: unused variable 'tensor_sum' [-Wunused-variable]
11:  1190 |             auto tensor_sum = rocalTensorSum(handle, input, false, ROCAL_NONE, ROCAL_FP32);
11:       |                  ^~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1191:18: warning: unused variable 'tensor_min' [-Wunused-variable]
11:  1191 |             auto tensor_min = rocalTensorMin(handle, input, false, ROCAL_NONE, ROCAL_UINT8);
11:       |                  ^~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1192:18: warning: unused variable 'tensor_max' [-Wunused-variable]
11:  1192 |             auto tensor_max = rocalTensorMax(handle, input, false, ROCAL_NONE, ROCAL_UINT8);
11:       |                  ^~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1194:18: warning: unused variable 'tensor_stddev' [-Wunused-variable]
11:  1194 |             auto tensor_stddev = rocalTensorStdDev(handle, input, tensor_mean, false, ROCAL_NONE, ROCAL_FP32);
11:       |                  ^~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1434:21: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1434 |                     hipMalloc(&d_f32_batch_output, 256 * ((input_batch_size * h * w * p * sizeof(float)) / 256 + 1));
11:       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1436:21: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1436 |                     hipFree(d_f32_batch_output);
11:       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1439:21: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1439 |                     hipMalloc(&d_f16_batch_output, 256 * ((input_batch_size * h * w * p * sizeof(half)) / 256 + 1));
11:       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11: /__w/rocAL/rocAL/tests/cpp_api/unit_tests/unit_tests.cpp:1441:21: warning: ignoring return value of type 'hipError_t' declared with 'nodiscard' attribute [-Wunused-value]
11:  1441 |                     hipFree(d_f16_batch_output);
11:       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Operating System

ALL

CPU

ALL

GPU

ALL

ROCm Version

ROCm 7.14

ROCm Component

rocAL

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
rocminfo --support output
Paste output here
Additional Information

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.