Implémentation d'une commande pour accélérateur. Plus de détails...
#include <arcane/accelerator/core/internal/RunCommandImpl.h>
Graphe de collaboration de Arcane::Accelerator::impl::RunCommandImpl:Fonctions membres publiques | |
| RunCommandImpl (RunQueueImpl *queue) | |
| RunCommandImpl (const RunCommandImpl &)=delete | |
| RunCommandImpl & | operator= (const RunCommandImpl &)=delete |
| const TraceInfo & | traceInfo () const |
| const String & | kernelName () const |
| void | notifyBeginLaunchKernel () |
| Notification du début d'exécution de la commande. | |
| void | notifyEndLaunchKernel () |
| Notification de la fin de lancement de la commande. | |
| void | notifyEndExecuteKernel () |
| Notification de la fin d'exécution du noyau. | |
| impl::IReduceMemoryImpl * | getOrCreateReduceMemoryImpl () |
| void | releaseReduceMemoryImpl (ReduceMemoryImpl *p) |
| IRunQueueStream * | internalStream () const |
| RunnerImpl * | runner () const |
| void | notifyLaunchKernelSyclEvent (void *sycl_event_ptr) |
| Notification du lancement d'un kernel SYCL. | |
Fonctions membres publiques statiques | |
| static RunCommandImpl * | create (RunQueueImpl *r) |
Fonctions membres privées | |
| ReduceMemoryImpl * | _getOrCreateReduceMemoryImpl () |
| void | _freePools () |
| void | _reset () |
| void | _init () |
| IRunQueueEventImpl * | _createEvent () |
| void | _notifyDestroyRunCommand () |
| Méthode appelée quand l'instance RunCommand associée est détruite. | |
Attributs privés | |
| friend | RunCommand |
| friend | RunQueueImpl |
| RunQueueImpl * | m_queue |
| TraceInfo | m_trace_info |
| String | m_kernel_name |
| Int32 | m_nb_thread_per_block = 0 |
| ParallelLoopOptions | m_parallel_loop_options |
| std::stack< ReduceMemoryImpl * > | m_reduce_memory_pool |
| std::set< ReduceMemoryImpl * > | m_active_reduce_memory_list |
| Liste des réductions actives. | |
| bool | m_has_been_launched = false |
| Indique si la commande a été lancée. | |
| bool | m_use_profiling = false |
| Indique si on souhaite le profiling. | |
| bool | m_use_sequential_timer_event = false |
| Indique si on utilise les évènements séquentiels pour calculer le temps d'exécution. | |
| IRunQueueEventImpl * | m_start_event = nullptr |
| Évènements pour le début et la fin de l'exécution. | |
| IRunQueueEventImpl * | m_stop_event = nullptr |
| Évènements pour la fin de l'exécution. | |
| Int64 | m_begin_time = 0 |
| Temps au lancement de la commande. | |
| ForLoopOneExecStat | m_loop_one_exec_stat |
| ForLoopOneExecStat * | m_loop_one_exec_stat_ptr = nullptr |
| const bool | m_use_accelerator = false |
| Indique si la commande s'exécute sur accélérateur. | |
| bool | m_is_allow_reuse_command = false |
| Indique si on autorise à utiliser plusieurs fois la même commande. | |
| bool | m_has_living_run_command = false |
| Indique si une RunCommand a une référence sur cette instance. | |
| bool | m_may_be_put_in_pool = false |
| Indique si on peut remettre la commande dans le pool associé à la RunQueue. | |
Implémentation d'une commande pour accélérateur.
Définition à la ligne 39 du fichier internal/RunCommandImpl.h.
|
explicit |
Définition à la ligne 40 du fichier RunCommandImpl.cc.
| Arcane::Accelerator::impl::RunCommandImpl::~RunCommandImpl | ( | ) |
Définition à la ligne 51 du fichier RunCommandImpl.cc.
|
private |
Définition à la ligne 74 du fichier RunCommandImpl.cc.
|
private |
Définition à la ligne 62 du fichier RunCommandImpl.cc.
|
private |
Définition à la ligne 278 du fichier RunCommandImpl.cc.
|
private |
Définition à la ligne 85 du fichier RunCommandImpl.cc.
|
private |
Méthode appelée quand l'instance RunCommand associée est détruite.
Définition à la ligne 301 du fichier RunCommandImpl.cc.
Références m_has_been_launched, et m_may_be_put_in_pool.
|
private |
Définition à la ligne 215 du fichier RunCommandImpl.cc.
|
static |
Définition à la ligne 109 du fichier RunCommandImpl.cc.
| IReduceMemoryImpl * Arcane::Accelerator::impl::RunCommandImpl::getOrCreateReduceMemoryImpl | ( | ) |
Définition à la ligne 234 du fichier RunCommandImpl.cc.
| IRunQueueStream * Arcane::Accelerator::impl::RunCommandImpl::internalStream | ( | ) | const |
Définition à la ligne 260 du fichier RunCommandImpl.cc.
|
inline |
Définition à la ligne 58 du fichier internal/RunCommandImpl.h.
| void Arcane::Accelerator::impl::RunCommandImpl::notifyBeginLaunchKernel | ( | ) |
Notification du début d'exécution de la commande.
Définition à la ligne 122 du fichier RunCommandImpl.cc.
Références ARCANE_FATAL, Arcane::platform::getRealTimeNS(), m_begin_time, m_has_been_launched, m_is_allow_reuse_command, m_start_event, m_use_profiling, et Arcane::Accelerator::impl::IRunQueueStream::notifyBeginLaunchKernel().
Voici le graphe d'appel pour cette fonction :| void Arcane::Accelerator::impl::RunCommandImpl::notifyEndExecuteKernel | ( | ) |
Notification de la fin d'exécution du noyau.
Après cet appel, on est sur que la commande a fini de s'exécuter et on peut la recycler. En asynchrone, cette méthode est appelée lors de la synchronisation d'une file.
Définition à la ligne 190 du fichier RunCommandImpl.cc.
Références Arcane::ProfilingRegistry::_threadLocalForLoopInstance(), m_begin_time, m_has_been_launched, m_start_event, m_stop_event, m_use_profiling, et Arcane::ForLoopOneExecStat::setEndTime().
Voici le graphe d'appel pour cette fonction :| void Arcane::Accelerator::impl::RunCommandImpl::notifyEndLaunchKernel | ( | ) |
Notification de la fin de lancement de la commande.
La commande continue à s'exécuter en tâche de fond.
Définition à la ligne 150 du fichier RunCommandImpl.cc.
Références m_stop_event, m_use_profiling, et Arcane::Accelerator::impl::IRunQueueStream::notifyEndLaunchKernel().
Voici le graphe d'appel pour cette fonction :| void Arcane::Accelerator::impl::RunCommandImpl::notifyLaunchKernelSyclEvent | ( | void * | sycl_event_ptr | ) |
Notification du lancement d'un kernel SYCL.
sycl_event_ptr est de type sycl::event* et contient l'évènement associé à la commande qui est retourné lors des appels à sycl::queue::submit().
Définition à la ligne 170 du fichier RunCommandImpl.cc.
Références Arcane::Accelerator::impl::IRunQueueStream::_setSyclLastCommandEvent(), et m_start_event.
Voici le graphe d'appel pour cette fonction :| void Arcane::Accelerator::impl::RunCommandImpl::releaseReduceMemoryImpl | ( | ReduceMemoryImpl * | p | ) |
Définition à la ligne 247 du fichier RunCommandImpl.cc.
| RunnerImpl * Arcane::Accelerator::impl::RunCommandImpl::runner | ( | ) | const |
Définition à la ligne 269 du fichier RunCommandImpl.cc.
|
inline |
Définition à la ligne 57 du fichier internal/RunCommandImpl.h.
|
private |
Liste des réductions actives.
Définition à la ligne 93 du fichier internal/RunCommandImpl.h.
|
private |
Temps au lancement de la commande.
Définition à la ligne 110 du fichier internal/RunCommandImpl.h.
Référencé par notifyBeginLaunchKernel(), et notifyEndExecuteKernel().
|
private |
Indique si la commande a été lancée.
Définition à la ligne 96 du fichier internal/RunCommandImpl.h.
Référencé par _notifyDestroyRunCommand(), notifyBeginLaunchKernel(), et notifyEndExecuteKernel().
|
private |
Indique si une RunCommand a une référence sur cette instance.
Définition à la ligne 128 du fichier internal/RunCommandImpl.h.
Référencé par Arcane::Accelerator::impl::RunQueueImpl::_checkPutCommandInPoolNoLock().
|
private |
Indique si on autorise à utiliser plusieurs fois la même commande.
Normalement cela est interdit mais avant novembre 2024, il n'y avait pas de mécanisme pour détecter cela. On peut donc temporairement autoriser cela et dans un on supprimera cette possibilité.
Définition à la ligne 125 du fichier internal/RunCommandImpl.h.
Référencé par notifyBeginLaunchKernel().
|
private |
Définition à la ligne 82 du fichier internal/RunCommandImpl.h.
|
private |
Définition à la ligne 112 du fichier internal/RunCommandImpl.h.
|
private |
Définition à la ligne 113 du fichier internal/RunCommandImpl.h.
|
private |
Indique si on peut remettre la commande dans le pool associé à la RunQueue.
Définition à la ligne 131 du fichier internal/RunCommandImpl.h.
Référencé par Arcane::Accelerator::impl::RunQueueImpl::_checkPutCommandInPoolNoLock(), et _notifyDestroyRunCommand().
|
private |
Définition à la ligne 83 du fichier internal/RunCommandImpl.h.
|
private |
Définition à la ligne 84 du fichier internal/RunCommandImpl.h.
|
private |
Définition à la ligne 80 du fichier internal/RunCommandImpl.h.
|
private |
Définition à la ligne 90 du fichier internal/RunCommandImpl.h.
|
private |
Évènements pour le début et la fin de l'exécution.
Définition à la ligne 105 du fichier internal/RunCommandImpl.h.
Référencé par notifyBeginLaunchKernel(), notifyEndExecuteKernel(), et notifyLaunchKernelSyclEvent().
|
private |
Évènements pour la fin de l'exécution.
Définition à la ligne 107 du fichier internal/RunCommandImpl.h.
Référencé par notifyEndExecuteKernel(), et notifyEndLaunchKernel().
|
private |
Définition à la ligne 81 du fichier internal/RunCommandImpl.h.
|
private |
Indique si la commande s'exécute sur accélérateur.
Définition à la ligne 116 du fichier internal/RunCommandImpl.h.
|
private |
Indique si on souhaite le profiling.
Définition à la ligne 99 du fichier internal/RunCommandImpl.h.
Référencé par notifyBeginLaunchKernel(), notifyEndExecuteKernel(), et notifyEndLaunchKernel().
|
private |
Indique si on utilise les évènements séquentiels pour calculer le temps d'exécution.
Définition à la ligne 102 du fichier internal/RunCommandImpl.h.
|
private |
Définition à la ligne 41 du fichier internal/RunCommandImpl.h.
|
private |
Définition à la ligne 42 du fichier internal/RunCommandImpl.h.