[ConditionalEuclideanClustering::segment] std::(multi)thread (only) 21-46% faster on non organzied clouds, much faster appearantly on organized clouds
Los mantenedores suelen responder en 4 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- cpp
- Área
- computer-vision, performance
Línea de trabajo
Comienza con ConditionalEuclideanClustering::segment y revisa la implementación multihilo en la rama del fork attemptConditionalEuclideanMT. Reproduce las cuatro configuraciones de benchmark descritas en el issue y compara los enfoques de uso de hilos; el issue no define un cambio aceptado específico ni un criterio de finalización.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I have implemented a std multithread version of ConditionalEuclideanClustering::segment and called it
void
segmentMT (IndicesClusters &clusters, const size_t threadNumber=2);
on my fork branch attemptConditionalEuclideanMT
on my PC it improves of only 21-38% the time to produce the results using 3 or 4 threads
12th Gen Intel(R) Core(TM) i7-12700 2.10 GHz
20 Logical CPUs - 32.0 GB
Windows 10 Pro
Setting1:
cloud is dense and NOT organized and has 2 million points XYZRGB
so the search used is pcl::search::OrganizedNeighbor
which takes 350 msec just to execute searcher_->setInputCloud
11 clusters are segmented
5 threads: 2.1-2.3 sexc
4 threads: 1.9-2.2 sec
3 threads: 1.8-2 sec
2 threads: 2.1 sec
1 thread: 2.4sec
21% improvement
Setting2:
cloud is dense and NOT organized and has 300 000 points XYZRGB
3 threads: 268-295 msec
1 thread: 420msec
4 clusters are found
32% improvement
Setting3:
cloud is NOT dense and NOT organized and has 485 000 points XYZRGB
3 threads: 480-500 msec
1 thread: 790msec
1 clusters is found
38% improvement
Setting 4: like Setting 1 but running on a different computer, a laptop less stable (less reliable for benchmark) because with heavy sw running in background:
4 threads: 2.9-3.4 sec
1 thread: 5.6-6.1 sec
46% improvement
I am still investigating the reasons for this limited improvement. On a first analysis the main reason could be that the algorithm is intinsecally not much parallelizable. I can split in parallel the growing of the clusters by splitting the point sequence in subsequences, but then at the end I have to reconnect the clusters that have grown separately in different threads ( I record the connections to be made at the end)
you can check I have quite optimized the critical scetions using also shared_mutexes
still I think it would be an interesting alternative to openMP or CUDA also for other tools/features that like this one do not look feasible for openMP or CUDA
I have tried 3 versions one with a searcher for each thread, one with a unique searcher prpeared by the main thread and one with a unique searcher prepared by the first launched thread. The latter would be faster but once in a while it gets much slower, probably because I had to implement it with a std::condition_variable that when triggered probably it slows down the thread pool. So in the end I opted for the 2nd solution (no std::condition_variable)
- Lenguaje dominante
- C++
- Estrellas
- 11.2k
- Forks
- 4.7k
- Merge medio
- 5 d 8 h
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PointCloudLibrary/pcl
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
PointCloudLibrary/pcl#6509 · 1 comentario ·
Los mantenedores suelen responder en 4 días
-
kind: bug status: triage
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
PointCloudLibrary/pcl#6395 ·
Los mantenedores suelen responder en 4 días
-
[sample_consensus] Migrated the SSE and AVX implementations of countWithinDistance to RISC-V RVV 1.0Abiertokind: request status: triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
PointCloudLibrary/pcl#6385 · 1 reacción ·
Los mantenedores suelen responder en 4 días
-
2 tests failPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
PointCloudLibrary/pcl#6373 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 4 días
-
kind: question kind: request
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
PointCloudLibrary/pcl#6370 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
Todos los issues de PointCloudLibrary/pcl
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
enhancement Ready for final check
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
mpogue2/SquareDesk#1818 · 1 comentario ·
-
launch-client --save-creds creates creds/<account>/ with mode 755, not 700Posiblemente ocupada @metis-sprock la tomó hoy. Abiertobacklog bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
EchoTools/nevr-runtime#1471 ·
Los mantenedores suelen responder en 1 día
-
docs: Page not found?Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
iamankushpandit/Gume#231 ·
Los mantenedores suelen responder en 1 día