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

fix: cpp17 namespaces #8526

Merged
merged 3 commits into from
Aug 27, 2024
Merged

Conversation

amc-nu
Copy link
Member

@amc-nu amc-nu commented Aug 19, 2024

Description

Replace C++17-style namespaces with nested ones to allow compilation on Edge-Auto on the Roscube, which has a noncompliant c++17 compiler for the nodes:

  • TensorRT YoloX
  • ByteTrack

Related links

Parent Issue:
tier4/edge-auto-jetson#57

How was this PR tested?

It was tested on Edge-Auto platform on both the ADLink AVA3510 and Roscube RQX-58G. https://edge.auto/

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Aug 19, 2024
Copy link

github-actions bot commented Aug 19, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@amc-nu amc-nu changed the title Fix/cpp17 namespaces fix. cpp17 namespaces Aug 19, 2024
@amc-nu amc-nu changed the title fix. cpp17 namespaces fix: cpp17 namespaces Aug 19, 2024
@amc-nu amc-nu marked this pull request as draft August 19, 2024 09:55
@a-yyg a-yyg force-pushed the fix/cpp17_namespaces branch 2 times, most recently from 72fd6af to 8ca7fb0 Compare August 19, 2024 11:46
@a-yyg a-yyg force-pushed the fix/cpp17_namespaces branch from a56326e to 55cd1d0 Compare August 19, 2024 11:59
@amc-nu amc-nu marked this pull request as ready for review August 20, 2024 00:03
@Shin-kyoto
Copy link
Contributor

Shin-kyoto commented Aug 20, 2024

Thank for submitting this PR!!

IMO, changing namespace for the specific Hardware (e.g. Roscube) and non standard compilers is not good to keep the autoware codebase healthy.
What do you think about it? @vividf @amadeuszsz @tzhong518

@amadeuszsz
Copy link
Contributor

Thank for submitting this PR!!

IMO, changing namespace for the specific Hardware (e.g. Roscube) and non standard compilers is not good to keep the autoware codebase healthy. How do you think about it? @vividf @amadeuszsz @tzhong518

Would be nice to keep compatibility with other devices by such a simple syntax change. I don't think we have a lot of nested namespaces within single component, thus this change will not decrease readability.
I can imagine that other Autoware CUDA-based packages find their use case on edge devices. We could populate this change for all packages which utilize CUDA compiler:

common/cuda_utils
common/tensorrt_common
perception/autoware_image_projection_based_fusion
perception/autoware_lidar_centerpoint
perception/autoware_lidar_transfusion
perception/autoware_shape_estimation
perception/autoware_tensorrt_classifier
perception/autoware_tensorrt_yolox
perception/autoware_traffic_light_classifier
perception/autoware_traffic_light_fine_detector

However, edge devices vendors slowly integrate JetPack 6.0 to their products and in near future this change will be not necessary.
Finally, I have no objection to this PR change. Regarding the other packages, I would like to hear other comments.

@manato
Copy link
Contributor

manato commented Aug 26, 2024

@amc-nu @a-yyg
I appreciate issuing PR!

@Shin-kyoto @amadeuszsz
Thank you for discussing. This kind of discussion has significant meaning in keeping OSS quality. As it was pointed out, this modification aims to make yolox package work on relatively old environments such as Jetson-based ECU. IMO, this package is one of the most common packages to be executed on such kinds of edge devices, which sometimes are still in old environments. Since I feel the proposed modification looks understandable and does not decrease code quality, I'd like to approve this proposal as a code owner. I don't intend to prevent this kind of discussion in future PRs, so I'd appreciate it if you guys would feel free to post comments when necessary!

Copy link
Contributor

@manato manato left a comment

Choose a reason for hiding this comment

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

@amc-nu @a-yyg
Again, thank you for the PR. LGTM. I confirmed that the modification is valid for X86-based ECU as well as Jetson AGX Xavier-based ECU.

@kminoda kminoda added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 27, 2024
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.07%. Comparing base (05b1554) to head (a606377).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8526      +/-   ##
==========================================
- Coverage   24.08%   24.07%   -0.01%     
==========================================
  Files        1399     1399              
  Lines      102446   102451       +5     
  Branches    38915    38920       +5     
==========================================
- Hits        24672    24670       -2     
+ Misses      75270    75244      -26     
- Partials     2504     2537      +33     
Flag Coverage Δ *Carryforward flag
differential 0.00% <ø> (?)
total 24.08% <ø> (-0.01%) ⬇️ Carriedforward from 4cd8939

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@manato manato merged commit 61f317e into autowarefoundation:main Aug 27, 2024
41 checks passed
kyoichi-sugahara pushed a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Aug 27, 2024
Use traditional-style nameplace nesting for nvcc

Signed-off-by: Yuri Guimaraes <[email protected]>
Co-authored-by: Yuri Guimaraes <[email protected]>
a-maumau pushed a commit to a-maumau/autoware.universe that referenced this pull request Sep 2, 2024
Use traditional-style nameplace nesting for nvcc

Signed-off-by: Yuri Guimaraes <[email protected]>
Co-authored-by: Yuri Guimaraes <[email protected]>
ktro2828 pushed a commit to ktro2828/autoware.universe that referenced this pull request Sep 18, 2024
Use traditional-style nameplace nesting for nvcc

Signed-off-by: Yuri Guimaraes <[email protected]>
Co-authored-by: Yuri Guimaraes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) tag:require-cuda-build-and-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants