summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/mem_fetch.h
diff options
context:
space:
mode:
authorJRPan <[email protected]>2024-08-20 20:43:32 -0400
committerGitHub <[email protected]>2024-08-21 00:43:32 +0000
commit38b4df5653ecbd9907a3d39b125640cd4fb7d012 (patch)
tree4f6e55736c1b6b33c4b43a668f79d7a84e665b29 /src/gpgpu-sim/mem_fetch.h
parent42a0cde4b463794d041b544309afb69c315f78bc (diff)
Stream stats (#71)
* Temp commit for Justin and Cassie to sync on code changes for adding per-stream status. * Resolved compile errors. * Removed redundant parameter * Passed cuda_stream_id from accelsim to gpgpusim * Cleaned up unused changes * Changed vector to map, having operator problems. * StreamID defaults to zero * Implemented streams to inc_stats and so on * Fixed TOTAL_ACCESS counts * Implemented GLOBAL_TIMER. * Fixed m_shader->get_kernel SEGFAULT issue in shader.cc. * Use warp_init to track streamID instead of issue_warp * Removed temp debug print * Modified cache_stats to only print data from latest finished stream Added optional arg to cache_stats::print_stats, cache_stats::print_fail_stats and their upstream functions. When streamID is specified, print stats from that stream. When not specified, print all stats. NOTE: current implementation depending on streamid never equals -1 * Removed default arg values of streamID * modified constructor of mem_fetch to pass in streamID * changed get_streamid to get_streamID * Added TODO to gpgpusim_entrypoint.cc and power_stat.cc * Only collect power stats when enabled * print last finished stream in PTX mode using last_streamID * take out additional printf * Add a field to baseline cache to indicate cache level * save gpu object in cache * Print stream ID only once per kernel * rm test print * use -1 for default stream id * cleanup debug prints * remove GLOABL_TIMER * Automated clang-format * Should be correct to print everything in power model * addressing concerns & errors * Automated clang-format * add m_stats_pw in operator+ * Automated Format --------- Co-authored-by: Justin Qiao <[email protected]> Co-authored-by: Justin Qiao <[email protected]> Co-authored-by: Tim Rogers <[email protected]> Co-authored-by: JRPan <[email protected]> Co-authored-by: purdue-jenkins <[email protected]>
Diffstat (limited to 'src/gpgpu-sim/mem_fetch.h')
-rw-r--r--src/gpgpu-sim/mem_fetch.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gpgpu-sim/mem_fetch.h b/src/gpgpu-sim/mem_fetch.h
index 283fe80..7704218 100644
--- a/src/gpgpu-sim/mem_fetch.h
+++ b/src/gpgpu-sim/mem_fetch.h
@@ -54,9 +54,10 @@ class memory_config;
class mem_fetch {
public:
mem_fetch(const mem_access_t &access, const warp_inst_t *inst,
- unsigned ctrl_size, unsigned wid, unsigned sid, unsigned tpc,
- const memory_config *config, unsigned long long cycle,
- mem_fetch *original_mf = NULL, mem_fetch *original_wr_mf = NULL);
+ unsigned long long streamID, unsigned ctrl_size, unsigned wid,
+ unsigned sid, unsigned tpc, const memory_config *config,
+ unsigned long long cycle, mem_fetch *original_mf = NULL,
+ mem_fetch *original_wr_mf = NULL);
~mem_fetch();
void set_status(enum mem_fetch_status status, unsigned long long cycle);
@@ -105,6 +106,7 @@ class mem_fetch {
unsigned get_timestamp() const { return m_timestamp; }
unsigned get_return_timestamp() const { return m_timestamp2; }
unsigned get_icnt_receive_time() const { return m_icnt_receive_time; }
+ unsigned long long get_streamID() const { return m_streamID; }
enum mem_access_type get_access_type() const { return m_access.get_type(); }
const active_mask_t &get_access_warp_mask() const {
@@ -163,6 +165,8 @@ class mem_fetch {
// requesting instruction (put last so mem_fetch prints nicer in gdb)
warp_inst_t m_inst;
+ unsigned long long m_streamID;
+
static unsigned sm_next_mf_request_uid;
const memory_config *m_mem_config;