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

Add HashGraph::createProblem benchmark #214

Merged

Conversation

efernandez
Copy link
Collaborator

bechmark results:

2020-12-03 10:18:54
Running ./benchmark_create_problem
Run on (16 X 3600 MHz CPU s)
CPU Caches:
  L1 Data 32K (x8)
  L1 Instruction 32K (x8)
  L2 Unified 512K (x8)
  L3 Unified 16384K (x2)
Load Average: 0.35, 0.14, 0.25
-------------------------------------------------------------------
Benchmark                         Time             CPU   Iterations
-------------------------------------------------------------------
BM_createProblem/200/2       123241 ns       123242 ns         5849
BM_createProblem/256/2       162335 ns       162337 ns         4371
BM_createProblem/512/2       360604 ns       360597 ns         1872
BM_createProblem/1024/2      812410 ns       812367 ns          883
BM_createProblem/2048/2     1686309 ns      1686260 ns          416
BM_createProblem/4000/2     3312365 ns      3312105 ns          203
BM_createProblem/200/4       204949 ns       204943 ns         3405
BM_createProblem/256/4       274914 ns       274907 ns         2498
BM_createProblem/512/4       617080 ns       617050 ns         1176
BM_createProblem/1024/4     1282331 ns      1282230 ns          567
BM_createProblem/2048/4     2624076 ns      2624072 ns          266
BM_createProblem/4000/4     5573755 ns      5573760 ns          126
BM_createProblem/200/8       366948 ns       366936 ns         1898
BM_createProblem/256/8       461833 ns       461824 ns         1541
BM_createProblem/512/8      1077706 ns      1077706 ns          672
BM_createProblem/1024/8     2220351 ns      2220204 ns          331
BM_createProblem/2048/8     4633878 ns      4633584 ns          152
BM_createProblem/4000/8    11401029 ns     11400688 ns           62
BM_createProblem/200/12      523023 ns       523006 ns         1398
BM_createProblem/256/12      724614 ns       724599 ns          960
BM_createProblem/512/12     1493217 ns      1493192 ns          483
BM_createProblem/1024/12    3169533 ns      3169500 ns          222
BM_createProblem/2048/12    7183788 ns      7183468 ns           95
BM_createProblem/4000/12   22026589 ns     22025445 ns           32

heaptrack results:
heaptrack-1229416-allocated-Screenshot from 2020-12-02 22-18-35
heaptrack-1229416-allocations-Screenshot from 2020-12-02 22-18-05
heaptrack-1229416-Screenshot from 2020-12-02 22-11-25
heaptrack-1229416-Screenshot from 2020-12-02 22-16-03

@efernandez efernandez self-assigned this Dec 3, 2020
@efernandez efernandez added the enhancement New feature or request label Dec 3, 2020
@efernandez
Copy link
Collaborator Author

Why are the checks failing?

For me fuse_graphs doesn't have any issues when I do:

  • catkin build
  • make roslint
  • make run_tests

And the benchmark test dependency is included the same way as fuse_constraints does.
The only difference is that I removed the if(TARGET benchmark_create_problem) block that I don't think it's needed, but maybe I'm wrong.

@svwilliams
Copy link
Contributor

roslint error

/fuse_graphs/benchmark/benchmark_create_problem.cpp:197:  when starting a new scope, { should be on a line by itself  [whitespace/braces] [4]
/fuse_graphs/benchmark/benchmark_create_problem.cpp:197:  } should be on a line by itself  [whitespace/braces] [4]

Comment on lines 63 to 66
void createProblem(ceres::Problem& problem) const
{
fuse_graphs::HashGraph::createProblem(problem);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, would using fuse_graphs::HashGraph::createProblem not work here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, it does. Totally forgot I could just do that. Thanks! 😄

@svwilliams svwilliams merged commit a57ac9d into locusrobotics:devel Dec 4, 2020
@efernandez efernandez deleted the benchmark-create-problem branch December 10, 2020 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

None yet

3 participants