Skip to content

Conversation

@mwlasiuk
Copy link
Contributor

@mwlasiuk mwlasiuk commented Mar 1, 2025

This PR fixes build using GCC version 13.3 on Ubuntu 22.04 when OpenCL backend is enabled.

/home/michal/code/nntrainer/nntrainer/layers/cl_layers/concat_cl.cpp:381:5: error: variable ‘input2_batch_size’ set but not used [-Werror=unused-but-set-variable]
  381 |     input2_batch_size, input2_height, input2_width, input2_channels;
      |     ^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.

Unused input2_batch_size could be removed but I would imagine it might be nice to inspect it using debugger.

Self evaluation:

  1. Build test: [*]Passed [ ]Failed [ ]Skipped
  2. Run test: [ ]Passed [ ]Failed [*]Skipped

How to evaluate:
Checkout on this PR branch on Ubuntu 22.04 machine and try building project using gcc version 13.3 compiler. Now build should succeed.

@mwlasiuk
Copy link
Contributor Author

mwlasiuk commented Mar 1, 2025

NOTE: PR created second time as I failed to properly sign off commit.

Copy link
Contributor

@djeong20 djeong20 left a comment

Choose a reason for hiding this comment

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

Nice catch. I believe there should be extra work to enable OpenCL on Ubuntu. Please take a look at #2727 and #2783!

ConcatProcess(in1, in2, out);
}

void ConcatLayerCl::ConcatProcess(Tensor const &in1, Tensor const &in2,
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about changing in1 and in2 to input1 and input2?
The variables below are used as input1_* or input2_*.
It would be better to unify the naming for consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Changed naming according to suggestion.

Copy link
Member

@DonghakPark DonghakPark left a comment

Choose a reason for hiding this comment

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

  1. Please Fill commit message Body
  2. Please Rebase , not merge commit ( we manage our commit history with rebase )

LGTM

@mwlasiuk mwlasiuk force-pushed the fix-opencl-build-on-gcc-13-3 branch 6 times, most recently from 8a3b1c5 to 33844fe Compare March 5, 2025 14:01
@mwlasiuk mwlasiuk force-pushed the fix-opencl-build-on-gcc-13-3 branch from 33844fe to c6144a9 Compare March 5, 2025 14:11
@mwlasiuk mwlasiuk force-pushed the fix-opencl-build-on-gcc-13-3 branch from c6144a9 to bd8ec89 Compare March 6, 2025 05:15
@mwlasiuk mwlasiuk changed the title Fix GCC 13.3 build on Ubuntu 22.04 when OpenCL bakcend is enabled. Fix GCC 13.3 build on Ubuntu 22.04 when OpenCL bakcend is enabled Mar 9, 2025
@mwlasiuk mwlasiuk force-pushed the fix-opencl-build-on-gcc-13-3 branch from bd8ec89 to 3055ab8 Compare March 10, 2025 08:10
@mwlasiuk mwlasiuk requested a review from djeong20 March 10, 2025 09:48
@mwlasiuk mwlasiuk force-pushed the fix-opencl-build-on-gcc-13-3 branch 3 times, most recently from 27aa562 to 5e16526 Compare March 12, 2025 06:36
@dkjung dkjung changed the title Fix GCC 13.3 build on Ubuntu 22.04 when OpenCL bakcend is enabled Fix GCC 13.3 build on Ubuntu 22.04 when OpenCL bakecnd is enabled Mar 12, 2025
@mwlasiuk mwlasiuk changed the title Fix GCC 13.3 build on Ubuntu 22.04 when OpenCL bakecnd is enabled Fix GCC 13.3 build on Ubuntu 22.04 when OpenCL bakecnd is enabled ... Mar 12, 2025
@mwlasiuk mwlasiuk changed the title Fix GCC 13.3 build on Ubuntu 22.04 when OpenCL bakecnd is enabled ... Fix GCC 13.3 build on Ubuntu 22.04 when OpenCL bakecnd is enabled . Mar 13, 2025
@mwlasiuk mwlasiuk force-pushed the fix-opencl-build-on-gcc-13-3 branch from 5e16526 to 1833fef Compare March 13, 2025 06:12
Fixed build with OpenCL enabled on Ubuntu 22.04 using GCC 13.3.
Additionally renamed input variables as requested in review (in* -> input*)

Signed-off-by: mwlasiuk <[email protected]>
@mwlasiuk mwlasiuk force-pushed the fix-opencl-build-on-gcc-13-3 branch from 1833fef to 39f7323 Compare March 13, 2025 07:26
Copy link
Collaborator

@jijoongmoon jijoongmoon left a comment

Choose a reason for hiding this comment

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

LGTM

@jijoongmoon jijoongmoon merged commit 1b43310 into nnstreamer:main Mar 14, 2025
16 checks passed
@mwlasiuk mwlasiuk deleted the fix-opencl-build-on-gcc-13-3 branch April 22, 2025 08:47
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.

7 participants