Cargando…
On the choice of the best chunk size for the speculative execution of loops
Loops are a rich source of parallelism. Unfortunately, many loops cannot be safely parallelized at compile time because the compiler is not able to guarantee that there will be no dependence violations. Thread-Level Speculation (TLS) techniques, either hardware or software-based, allow the parallel...
Autores principales: | , , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
Public Library of Science
2022
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9113589/ https://www.ncbi.nlm.nih.gov/pubmed/35580087 http://dx.doi.org/10.1371/journal.pone.0267602 |
_version_ | 1784709613377028096 |
---|---|
author | Estebanez, Alvaro Llanos, Diego R. Orden, David Palop, Belen |
author_facet | Estebanez, Alvaro Llanos, Diego R. Orden, David Palop, Belen |
author_sort | Estebanez, Alvaro |
collection | PubMed |
description | Loops are a rich source of parallelism. Unfortunately, many loops cannot be safely parallelized at compile time because the compiler is not able to guarantee that there will be no dependence violations. Thread-Level Speculation (TLS) techniques, either hardware or software-based, allow the parallel execution of non-analyzable loops, issuing the execution of blocks of consecutive iterations (called chunks) while a hardware or software monitor ensures that no dependence violations arise. If such a dependence violation occurs, the chunk that was fed with incorrect values is discarded and re-started, in order to consume the correct information. In the speculative execution of non-analyzable loops, it is very important to correctly choose the chunk size, because this choice dramatically affects the performance of the parallel execution. Bigger chunks imply less scheduling overheads, but smaller chunks allow fewer calculations to be discarded in the event of a dependence violation. To find a good chunk size is not a simple task, because loops may present dependencies that cannot be detected at compile time. In this paper, we present a comprehensive evaluation of different scheduling methods to estimate the optimal chunk size in the speculative execution of non-analyzable loops. This evaluation ranges from the simple, classical methods originally devised to achieve load balancing in loops with no dependencies, to methods that make some assumptions on the distribution pattern of dependencies, such as Meseta and Just-in-Time scheduling. We also propose and evaluate a general, more complex method called Moody Scheduling, that does not require a-priori assumptions to achieve the highest performance. |
format | Online Article Text |
id | pubmed-9113589 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2022 |
publisher | Public Library of Science |
record_format | MEDLINE/PubMed |
spelling | pubmed-91135892022-05-18 On the choice of the best chunk size for the speculative execution of loops Estebanez, Alvaro Llanos, Diego R. Orden, David Palop, Belen PLoS One Research Article Loops are a rich source of parallelism. Unfortunately, many loops cannot be safely parallelized at compile time because the compiler is not able to guarantee that there will be no dependence violations. Thread-Level Speculation (TLS) techniques, either hardware or software-based, allow the parallel execution of non-analyzable loops, issuing the execution of blocks of consecutive iterations (called chunks) while a hardware or software monitor ensures that no dependence violations arise. If such a dependence violation occurs, the chunk that was fed with incorrect values is discarded and re-started, in order to consume the correct information. In the speculative execution of non-analyzable loops, it is very important to correctly choose the chunk size, because this choice dramatically affects the performance of the parallel execution. Bigger chunks imply less scheduling overheads, but smaller chunks allow fewer calculations to be discarded in the event of a dependence violation. To find a good chunk size is not a simple task, because loops may present dependencies that cannot be detected at compile time. In this paper, we present a comprehensive evaluation of different scheduling methods to estimate the optimal chunk size in the speculative execution of non-analyzable loops. This evaluation ranges from the simple, classical methods originally devised to achieve load balancing in loops with no dependencies, to methods that make some assumptions on the distribution pattern of dependencies, such as Meseta and Just-in-Time scheduling. We also propose and evaluate a general, more complex method called Moody Scheduling, that does not require a-priori assumptions to achieve the highest performance. Public Library of Science 2022-05-17 /pmc/articles/PMC9113589/ /pubmed/35580087 http://dx.doi.org/10.1371/journal.pone.0267602 Text en © 2022 Estebanez et al https://creativecommons.org/licenses/by/4.0/This is an open access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/) , which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. |
spellingShingle | Research Article Estebanez, Alvaro Llanos, Diego R. Orden, David Palop, Belen On the choice of the best chunk size for the speculative execution of loops |
title | On the choice of the best chunk size for the speculative execution of loops |
title_full | On the choice of the best chunk size for the speculative execution of loops |
title_fullStr | On the choice of the best chunk size for the speculative execution of loops |
title_full_unstemmed | On the choice of the best chunk size for the speculative execution of loops |
title_short | On the choice of the best chunk size for the speculative execution of loops |
title_sort | on the choice of the best chunk size for the speculative execution of loops |
topic | Research Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9113589/ https://www.ncbi.nlm.nih.gov/pubmed/35580087 http://dx.doi.org/10.1371/journal.pone.0267602 |
work_keys_str_mv | AT estebanezalvaro onthechoiceofthebestchunksizeforthespeculativeexecutionofloops AT llanosdiegor onthechoiceofthebestchunksizeforthespeculativeexecutionofloops AT ordendavid onthechoiceofthebestchunksizeforthespeculativeexecutionofloops AT palopbelen onthechoiceofthebestchunksizeforthespeculativeexecutionofloops |