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
trace.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
5namespace mneme::trace {
6
7uint64_t timestamp() noexcept;
8
9void complete(const char *Name, uint64_t Start, uint64_t End,
10 const char *Args = nullptr, int64_t Iteration = -1) noexcept;
11
12void flush() noexcept;
13void disable(const char *Reason) noexcept;
14
15// Native scopes only buffer events; serialization and I/O happen at flush().
16class Scope {
17 const char *Name;
18 int64_t Iteration;
19 uint64_t Start;
20 int Owner;
21
22public:
23 explicit Scope(const char *Name, int64_t Iteration = -1) noexcept;
24 ~Scope() noexcept;
25
26 Scope(const Scope &) = delete;
27 Scope &operator=(const Scope &) = delete;
28};
29
30} // namespace mneme::trace
Scope(const Scope &)=delete
Scope(const char *Name, int64_t Iteration=-1) noexcept
Definition trace.cpp:309
Scope & operator=(const Scope &)=delete
Definition trace.cpp:23
void disable(const char *Reason) noexcept
Definition trace.cpp:146
uint64_t timestamp() noexcept
Definition trace.cpp:156
void complete(const char *Name, uint64_t Start, uint64_t End, const char *Args, int64_t Iteration) noexcept
Definition trace.cpp:168
void flush() noexcept
Definition trace.cpp:186