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

perf(autoware_map_based_prediction): replace pow #8751

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

TakaHoribe
Copy link
Contributor

Description

A performance analysis of the map_based_prediction with VTune was performed. The generated frame graph is below.
image

For example, you see std::pow accounts for 50% of the generateFrenetPath function's processing time.
image

Replacing std::pow with a simple multiplier reduces the computation time of this function from 2.2 ms to 0.6 ms for 1000 calculations. This is the PR.
(The function is called for each combination of "the number of objects" and "the number of predicted paths".)

Related links

None

How was this PR tested?

  • I visually confirmed that the prediction is working correctly in psim.

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added component:perception Advanced sensor data processing and environment understanding. (auto-assigned) tag:require-cuda-build-and-test labels Sep 4, 2024
Copy link

github-actions bot commented Sep 4, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
@TakaHoribe TakaHoribe added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Sep 4, 2024
@TakaHoribe TakaHoribe marked this pull request as ready for review September 4, 2024 16:22
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.

Project coverage is 25.03%. Comparing base (757a5a5) to head (0331b26).
Report is 50 commits behind head on main.

Files with missing lines Patch % Lines
...toware_map_based_prediction/src/path_generator.cpp 0.00% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8751      +/-   ##
==========================================
- Coverage   25.04%   25.03%   -0.02%     
==========================================
  Files        1315     1317       +2     
  Lines       97969    98009      +40     
  Branches    37804    37806       +2     
==========================================
  Hits        24536    24536              
- Misses      70923    70963      +40     
  Partials     2510     2510              
Flag Coverage Δ *Carryforward flag
differential 2.08% <0.00%> (?)
total 25.04% <ø> (+<0.01%) ⬆️ Carriedforward from 757a5a5

*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.

@YoshiRi YoshiRi changed the title perf(map_base_prediction): replace pow perf(autoware_map_based_prediction): replace pow Sep 6, 2024
Copy link
Contributor

@YoshiRi YoshiRi left a comment

Choose a reason for hiding this comment

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

LGTM

@TakaHoribe TakaHoribe merged commit efa53c3 into autowarefoundation:main Sep 6, 2024
42 of 43 checks passed
@TakaHoribe TakaHoribe deleted the perf-mpp-pow branch September 6, 2024 05:23
emuemuJP pushed a commit to arayabrain/autoware.universe.origin that referenced this pull request Sep 10, 2024
…8751)

Signed-off-by: emuemuJP <k.matsumoto.0807@gmail.com>
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
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants