Arcane  v3.14.11.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Accelerator.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* Accelerator.cc (C) 2000-2024 */
9/* */
10/* Déclarations générales pour le support des accélérateurs. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/accelerator/AcceleratorGlobal.h"
15
17
18#include "arcane/AcceleratorRuntimeInitialisationInfo.h"
19
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
48/*---------------------------------------------------------------------------*/
49/*---------------------------------------------------------------------------*/
50
57
58/*---------------------------------------------------------------------------*/
59/*---------------------------------------------------------------------------*/
60
61Arcane::String Arcane::Accelerator::impl::
62getBadPolicyMessage(eExecutionPolicy policy)
63{
64 switch (policy) {
65 case eExecutionPolicy::CUDA:
66 return "Requesting CUDA kernel execution but the kernel is not compiled with CUDA."
67 " You need to compile the file containing this kernel with CUDA compiler.";
68 case eExecutionPolicy::HIP:
69 return "Requesting HIP kernel execution but the kernel is not compiled with HIP."
70 " You need to compile the file containing this kernel with HIP compiler.";
71 case eExecutionPolicy::SYCL:
72 return "Requesting SYCL kernel execution but the kernel is not compiled with SYCL."
73 " You need to compile the file containing this kernel with SYCL compiler.";
74 default:
75 break;
76 }
77 return String::format("Invalid execution policy '{0}'", policy);
78}
79
80/*---------------------------------------------------------------------------*/
81/*---------------------------------------------------------------------------*/
Types et fonctions pour gérer les synchronisations sur les accélérateurs.
Gestionnaire d'exécution pour accélérateur.
Definition core/Runner.h:53
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Interface du gestionnaire de traces.
Chaîne de caractères unicode.
void initializeRunner(Runner &runner, ITraceMng *tm, const AcceleratorRuntimeInitialisationInfo &acc_info)
Initialise runner en fonction de la valeur de acc_info.
void arcaneInitializeRunner(Accelerator::Runner &runner, ITraceMng *tm, const AcceleratorRuntimeInitialisationInfo &acc_info)
Initialise runner avec les informations de acc_info.
eExecutionPolicy
Politique d'exécution pour un Runner.