Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Cupti.h
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/* Cupti.h (C) 2000-2024 */
9/* */
10/* Intégration de CUPTI. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_ACCELERATOR_CUDA_RUNTIME_INTERNAL_CUPTI_H
13#define ARCANE_ACCELERATOR_CUDA_RUNTIME_INTERNAL_CUPTI_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/FixedArray.h"
18
19#include "arcane/accelerator/cuda/CudaAccelerator.h"
20
21#ifdef ARCANE_HAS_CUDA_CUPTI
22#include <cuda.h>
23#include <cupti.h>
24#endif
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29namespace Arcane::Accelerator::Cuda
30{
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
38{
39 public:
40
41 void init(Int32 level, bool do_print)
42 {
43 m_profiling_level = level;
44 m_do_print = do_print;
45 }
46 bool isActive() const { return m_is_active; }
47
48 public:
49
50#ifdef ARCANE_HAS_CUDA_CUPTI
51 void start();
52 void stop();
53 void flush();
54#else
55 void start() {}
56 void stop() {}
57 void flush() {}
58#endif
59
60 private:
61
62#ifdef ARCANE_HAS_CUDA_CUPTI
65#endif
66 bool m_is_active = false;
67 bool m_do_print = true;
68 int m_profiling_level = 0;
69};
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/
73
74} // namespace Arcane::Accelerator::Cuda
75
76/*---------------------------------------------------------------------------*/
77/*---------------------------------------------------------------------------*/
78
79#endif
Classe singleton pour gérer CUPTI.
Definition Cupti.h:38
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
std::int32_t Int32
Type entier signé sur 32 bits.