Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLPlatform self-assignment #2763

Closed
piotrrak opened this issue Oct 21, 2024 · 4 comments · Fixed by #2896
Closed

CLPlatform self-assignment #2763

piotrrak opened this issue Oct 21, 2024 · 4 comments · Fixed by #2896
Labels

Comments

@piotrrak
Copy link

piotrrak commented Oct 21, 2024

Hello,

Noticed this issue by reviewing the code.

That's surely a bug:

platform_id_ = platform_id_;

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

@taos-ci
Copy link

taos-ci commented Oct 21, 2024

:octocat: cibot: Thank you for posting issue #2763. The person in charge will reply soon.

@DonghakPark
Copy link
Member

Hello @piotrrak

in our github CI, you can see the build option at .github/workflows/ubuntu_clean_meson_build.yml

        meson \
          --buildtype=plain \
          --prefix=/usr \
          --sysconfdir=/etc \
          --libdir=lib/x86_64-linux-gnu \
          --bindir=lib/nntrainer/bin \
          --includedir=include \
          -Dinstall-app=true \
          -Dreduce-tolerance=false \
          -Denable-debug=true \
          -Dml-api-support=enabled \
          -Denable-nnstreamer-tensor-filter=enabled \
          -Denable-nnstreamer-tensor-trainer=enabled \
          -Denable-nnstreamer-backbone=true \
          -Dcapi-ml-common-actual=capi-ml-common \
          -Dcapi-ml-inference-actual=capi-ml-inference \
          -Denable-capi=enabled \
          ${{ matrix.meson_options }} \

It seems that the 'enable-opencl' build option is missing from the currently running CI, indicating that testing may not be taking place in GitAction.

If you have tested it locally without any issues, I will update the CI.

Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 3 days.

@github-actions github-actions bot added the Stale label Jan 23, 2025
@myungjoo
Copy link
Member

myungjoo commented Jan 23, 2025

@DonghakPark Don't you need to do

-  platform_id_ = platform_id_;
+  this->platform_id_ = platform_id_;

myungjoo added a commit to myungjoo/nntrainer that referenced this issue Jan 23, 2025
If you have a local variable having the same with the member property,
you need ```this``` to address the member property.

Fixes nnstreamer#2763

Signed-off-by: MyungJoo Ham <[email protected]>
myungjoo added a commit to myungjoo/nntrainer that referenced this issue Feb 4, 2025
If you have a local variable having the same with the member property,
you need ```this``` to address the member property.

Fixes nnstreamer#2763

Signed-off-by: MyungJoo Ham <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants