Skip to content

Split work up in gradient_clusters more finely#271

Merged
christian-rauch merged 1 commit intoAprilRobotics:masterfrom
AustinSchuh:gradient_clusters_chunks
Dec 29, 2022
Merged

Split work up in gradient_clusters more finely#271
christian-rauch merged 1 commit intoAprilRobotics:masterfrom
AustinSchuh:gradient_clusters_chunks

Conversation

@AustinSchuh
Copy link
Contributor

In other chunks of work split into thread pools, the work is split up more finely than the number of CPUs. This makes it so that if a thread gets behind (in a big.little architecture, this is expected, or in the case of preemption), the threads that are ahead can pick up the extra work.

gradient_clusters was missing this split. This saved 5-10ms of processing time on my Rock Pi 4b and reduced the outliers.

In other chunks of work split into thread pools, the work is split up
more finely than the number of CPUs.  This makes it so that if a thread
gets behind (in a big.little architecture, this is expected, or in the
case of preemption), the threads that are ahead can pick up the extra
work.

gradient_clusters was missing this split.  This saved 5-10ms of
processing time on my Rock Pi 4b and reduced the outliers.
@christian-rauch
Copy link
Collaborator

Thanks. Your change is in line with other uses of td->nthreads.

@christian-rauch christian-rauch merged commit 3e8e974 into AprilRobotics:master Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants