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
MnemeRecordPreloadHIP.cpp File Reference
#include "MnemeAnnotationRuntime.hpp"
#include "mneme/DeviceTraits.hpp"
#include "mneme/MnemeCrashHandler.hpp"
#include "mneme/MnemeKernelTimer.hpp"
#include "mneme/MnemeLLVMUtils.hpp"
#include "mneme/MnemeLogger.hpp"
#include "mneme/MnemeManagedPlacement.hpp"
#include "mneme/MnemeRecord.hpp"
#include <cstdlib>
#include <dlfcn.h>
#include <hip/hip_runtime.h>
#include <utility>

Classes

class  MnemeRecorderHIPPreload

Typedefs

using Recorder = MnemeRecorderHIPPreload
using MmapFn = void *(*)(void *, size_t, int, int, int, off_t)
using MunmapFn = int (*)(void *, size_t)

Functions

 __attribute__ ((constructor)) static void configureKernelTiming()
void * mmap (void *Addr, size_t Len, int Prot, int Flags, int Fd, off_t Off) noexcept
void * mmap64 (void *Addr, size_t Len, int Prot, int Flags, int Fd, off_t Off) noexcept
int munmap (void *Addr, size_t Len) noexcept
hipError_t hipMalloc (void **ptr, size_t size)
hipError_t hipMallocManaged (void **ptr, size_t size, unsigned int flags)
hipError_t hipHostMalloc (void **ptr, size_t size, unsigned int flags)
hipError_t hipHostAlloc (void **ptr, size_t size, unsigned int flags)
hipError_t hipMallocHost (void **ptr, size_t size)
hipError_t hipMemAllocHost (void **ptr, size_t size)
hipError_t hipExtMallocWithFlags (void **ptr, size_t sizeBytes, unsigned int flags)
hipError_t hipMallocPitch (void **ptr, size_t *pitch, size_t width, size_t height)
hipError_t hipMemAllocPitch (hipDeviceptr_t *dptr, size_t *pitch, size_t widthInBytes, size_t height, unsigned int elementSizeBytes)
hipError_t hipMalloc3D (hipPitchedPtr *pitchedDevPtr, hipExtent extent)
hipError_t hipMallocAsync (void **dev_ptr, size_t size, hipStream_t stream)
hipError_t hipMallocFromPoolAsync (void **dev_ptr, size_t size, hipMemPool_t mem_pool, hipStream_t stream)
hipError_t hipFree (void *ptr)
hipError_t hipFreeAsync (void *dev_ptr, hipStream_t stream)
hipError_t hipHostFree (void *ptr)
hipError_t hipFreeHost (void *ptr)
hipError_t hipSetDevice (int deviceID)
hipError_t hipGetDevice (int *deviceID)
hipError_t __proteus_launch_kernel (void *Kernel, dim3 GridDim, dim3 BlockDim, void **KernelArgs, uint64_t ShmemSize, void *Stream)
bool mneme_set_metadata_for_ptr (const void *ptr, mneme::Metadata md)
bool mneme_set_metadata_for_region (const void *ptr, size_t bytes, mneme::Metadata md)
bool mneme_get_metadata_for_ptr (const void *ptr, mneme::Metadata *md)
bool mneme_erase_metadata_for_ptr (const void *ptr)

Typedef Documentation

◆ MmapFn

using MmapFn = void *(*)(void *, size_t, int, int, int, off_t)

◆ MunmapFn

using MunmapFn = int (*)(void *, size_t)

◆ Recorder

Function Documentation

◆ __attribute__()

__attribute__ ( (constructor) )

◆ __proteus_launch_kernel()

hipError_t __proteus_launch_kernel ( void * Kernel,
dim3 GridDim,
dim3 BlockDim,
void ** KernelArgs,
uint64_t ShmemSize,
void * Stream )

◆ hipExtMallocWithFlags()

hipError_t hipExtMallocWithFlags ( void ** ptr,
size_t sizeBytes,
unsigned int flags )

◆ hipFree()

hipError_t hipFree ( void * ptr)

◆ hipFreeAsync()

hipError_t hipFreeAsync ( void * dev_ptr,
hipStream_t stream )

◆ hipFreeHost()

hipError_t hipFreeHost ( void * ptr)

◆ hipGetDevice()

hipError_t hipGetDevice ( int * deviceID)

◆ hipHostAlloc()

hipError_t hipHostAlloc ( void ** ptr,
size_t size,
unsigned int flags )

◆ hipHostFree()

hipError_t hipHostFree ( void * ptr)

◆ hipHostMalloc()

hipError_t hipHostMalloc ( void ** ptr,
size_t size,
unsigned int flags )

◆ hipMalloc()

hipError_t hipMalloc ( void ** ptr,
size_t size )

◆ hipMalloc3D()

hipError_t hipMalloc3D ( hipPitchedPtr * pitchedDevPtr,
hipExtent extent )

◆ hipMallocAsync()

hipError_t hipMallocAsync ( void ** dev_ptr,
size_t size,
hipStream_t stream )

◆ hipMallocFromPoolAsync()

hipError_t hipMallocFromPoolAsync ( void ** dev_ptr,
size_t size,
hipMemPool_t mem_pool,
hipStream_t stream )

◆ hipMallocHost()

hipError_t hipMallocHost ( void ** ptr,
size_t size )

◆ hipMallocManaged()

hipError_t hipMallocManaged ( void ** ptr,
size_t size,
unsigned int flags )

◆ hipMallocPitch()

hipError_t hipMallocPitch ( void ** ptr,
size_t * pitch,
size_t width,
size_t height )

◆ hipMemAllocHost()

hipError_t hipMemAllocHost ( void ** ptr,
size_t size )

◆ hipMemAllocPitch()

hipError_t hipMemAllocPitch ( hipDeviceptr_t * dptr,
size_t * pitch,
size_t widthInBytes,
size_t height,
unsigned int elementSizeBytes )

◆ hipSetDevice()

hipError_t hipSetDevice ( int deviceID)

◆ mmap()

void * mmap ( void * Addr,
size_t Len,
int Prot,
int Flags,
int Fd,
off_t Off )
noexcept

◆ mmap64()

void * mmap64 ( void * Addr,
size_t Len,
int Prot,
int Flags,
int Fd,
off_t Off )
noexcept

◆ mneme_erase_metadata_for_ptr()

bool mneme_erase_metadata_for_ptr ( const void * ptr)

◆ mneme_get_metadata_for_ptr()

bool mneme_get_metadata_for_ptr ( const void * ptr,
mneme::Metadata * md )

◆ mneme_set_metadata_for_ptr()

bool mneme_set_metadata_for_ptr ( const void * ptr,
mneme::Metadata md )

◆ mneme_set_metadata_for_region()

bool mneme_set_metadata_for_region ( const void * ptr,
size_t bytes,
mneme::Metadata md )

◆ munmap()

int munmap ( void * Addr,
size_t Len )
noexcept