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
MnemeSnapshotFormat.hpp File Reference
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <filesystem>
#include <memory>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include <llvm/ADT/ArrayRef.h>
#include <llvm/ADT/SmallVector.h>
#include <llvm/ADT/StringRef.h>
#include <llvm/Support/MemoryBuffer.h>
#include <llvm/Support/raw_ostream.h>
#include "mneme/DeviceTraits.hpp"
#include "mneme/MnemeConfig.hpp"
#include "mneme/MnemeKernelInfo.hpp"
#include "mneme/MnemeLogger.hpp"
#include "mneme/MnemeMemory.hpp"
#include "mneme/MnemeSnapshotRecords.hpp"
#include "mneme/MnemeUtils.hpp"
#include <proteus/KernelMetadata.h>

Go to the source code of this file.

Classes

struct  mneme::ReplayGlobalVar
struct  mneme::Snapshot< VendorTypes >
struct  mneme::SnapshotHeader
class  mneme::SnapshotReader< VendorTypes >
class  mneme::BaseSnapshotSource< VendorTypes >
class  mneme::BytesReaderV0< VendorTypes >
class  mneme::BytesReaderV1< VendorTypes >
class  mneme::DiffReaderV1< VendorTypes >
class  mneme::DiffReaderV2< VendorTypes >
class  mneme::SnapshotFormatRegistry< VendorTypes >
struct  mneme::SnapshotInput< VendorTypes >
class  mneme::SnapshotWriter< VendorTypes >
class  mneme::FormatWriter< VendorTypes >
class  mneme::FormatWriter< VendorTypes >::CountingRawOStream
class  mneme::BytesWriter< VendorTypes >
class  mneme::DiffWriter< VendorTypes >
class  mneme::BestWriter< VendorTypes >

Namespaces

namespace  mneme
namespace  mneme::snapshot_detail

Typedefs

using mneme::GlobalSnapshotData

Enumerations

enum class  mneme::SnapshotKind : uint32_t { mneme::Bytes = 1 , mneme::Diff = 2 }

Functions

std::pair< std::string, ReplayGlobalVar > mneme::readGlobalVarRecord (const char *&Buffer)
void mneme::snapshot_detail::readGlobals (const char *&Buffer, std::unordered_map< std::string, ReplayGlobalVar > &GlobalVars)
void mneme::snapshot_detail::readArgs (const char *&Buffer, KernelInfo &KInfo)
template<DeviceVendors VendorTypes>
Snapshot< VendorTypes > mneme::snapshot_detail::loadDiffBase (const BaseSnapshotSource< VendorTypes > &Base, const std::string &KernelName, const std::string &Filename)
void mneme::snapshot_detail::expectCount (size_t Actual, size_t Expected, const std::string &Filename, const char *What)
void mneme::snapshot_detail::applyDiffRanges (const char *&Buffer, llvm::MutableArrayRef< uint8_t > Target)
void mneme::snapshot_detail::applyGlobalDiffs (const char *&Buffer, std::unordered_map< std::string, ReplayGlobalVar > &GlobalVars, const std::string &Filename)
template<DeviceVendors VendorTypes>
MnemeMemoryBlob< VendorTypes > & mneme::snapshot_detail::readDiffBlobHeader (const char *&Buffer, BlobsByAddress< VendorTypes > &DeviceMemory)
template<DeviceVendors VendorTypes>
llvm::MutableArrayRef< uint8_t > mneme::snapshot_detail::hostBytes (MnemeMemoryBlob< VendorTypes > &Blob)
void mneme::snapshot_detail::expectPayloadEnd (const char *Buffer, const llvm::MemoryBuffer &File, const std::string &Filename)
GlobalVarHeader mneme::globalVarHeader (const std::string &Name, const proteus::runtime::GlobalMetadata &GV)
template<DeviceVendors VendorTypes>
std::vector< uint8_t > mneme::readGlobalFromDevice (const proteus::runtime::GlobalMetadata &GV)
template<DeviceVendors VendorTypes>
std::unique_ptr< SnapshotWriter< VendorTypes > > mneme::makeEpilogueWriter (EpilogueSnapshotType Type, std::shared_ptr< const GlobalSnapshotData > PrologueGlobals)