nntrainer icon indicating copy to clipboard operation
nntrainer copied to clipboard

CLPlatform self-assignment

Open piotrrak opened this issue 4 months ago • 2 comments

Hello,

Noticed this issue by reviewing the code.

That's surely a bug:

https://github.com/nnstreamer/nntrainer/blob/89e8b7c6d5ae70d30a40cfb2d629b35138958ab4/nntrainer/opencl/opencl_context_manager.cpp#L156

platform_ = platform_; Results in not initializing platform_ member field with platforms[0] as I suppose was intended.

Currently clang build doesn't work and I am planning to enable it for the project (at-very least for x86-64). The reason is that clang has '-Wself-assignment' option and will be able catch typos like those.

I have not learned how to run test suit for OpenCL yet. Does the CI run any of the OpenCL tests to degree I can put my faith into?

Cheers /P

piotrrak avatar Oct 21 '24 09:10 piotrrak