Mneme
Mneme a tool allowing recording the execution of a GPU (CUDA/HIP) kernel and replaying that kernel as an independent executable.
Loading...
Searching...
No Matches
cupti_profile.cpp File Reference
#include <algorithm>
#include <atomic>
#include <condition_variable>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <memory>
#include <mutex>
#include <optional>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include <cuda_runtime.h>
#include "mneme/MnemeDispatchTracer.hpp"
#include "mneme/MnemeLogger.hpp"

Classes

class  mneme::MnemeCuptiProfiler

Namespaces

namespace  mneme

Macros

#define API_EXPORT(RTYPE)
#define CHECK_CUDA(call)

Typedefs

using u64 = unsigned long long

Functions

 API_EXPORT (int64_t) MnemePy_startProfile(const char *KernelName)
 API_EXPORT (void) MnemePy_stopProfile(u64 Token
 if (prof.size() !=Size)
 for (u64 i=0;i< std::min< u64 >(Size, static_cast< u64 >(prof.size()));++i)
return inst numRecords (token, expected)

Variables

int64_t * ProfileData
int64_t u64 Size
auto prof = inst.stop(Token)
int64_t expected

Macro Definition Documentation

◆ API_EXPORT

#define API_EXPORT ( RTYPE)
Value:
RTYPE

◆ CHECK_CUDA

#define CHECK_CUDA ( call)
Value:
do { \
cudaError_t _e = (call); \
if (_e != cudaSuccess) { \
fprintf(stderr, "CUDA error %d (%s) at %s:%d: %s\n", \
(int)_e, cudaGetErrorString(_e), __FILE__, __LINE__, #call); \
std::abort(); \
} \
} while (0)

Typedef Documentation

◆ u64

using u64 = unsigned long long

Function Documentation

◆ API_EXPORT() [1/2]

API_EXPORT ( int64_t ) const

◆ API_EXPORT() [2/2]

API_EXPORT ( void )

◆ for()

for ( )

◆ if()

if ( prof.size() ! = Size)

◆ numRecords()

return inst numRecords ( token ,
expected  )

Variable Documentation

◆ expected

int64_t expected
Initial value:
{
static MnemeCuptiProfiler & instance()
Definition cupti_profile.cpp:86

◆ prof

auto prof = inst.stop(Token)

◆ ProfileData

int64_t* ProfileData

◆ Size

int64_t u64 Size
Initial value: