@@ -175,7 +175,7 @@ void Core::dma_cycle() {
175175 }
176176 }
177177 /* Generate memfetch */
178- auto access_vec = _dma.get_memory_access (_core_cycle);
178+ auto access_vec = _dma.get_memory_access (_core_cycle, _config. icnt_injection_ports_per_core );
179179 for (auto access : *access_vec) {
180180 access->set_start_cycle (_core_cycle);
181181 _request_queue.push (access);
@@ -411,24 +411,43 @@ void Core::print_stats() {
411411 std::vector<float > sa_utilization;
412412 update_stats ();
413413 spdlog::info (" ===== Instructions count =====" );
414- for (int i=0 ; i < static_cast <size_t >(Opcode::COUNT); i++) {
415- if (i == static_cast <size_t >(Opcode::COMP))
416- spdlog::info (" Core [{}] : {} inst count {} (GEMM: {}, Vector: {}), skipped inst count {}" , _id, opcode_to_string (static_cast <Opcode>(i)), _stat_inst_count.at (i), _stat_gemm_inst, _stat_inst_count.at (i) - _stat_gemm_inst, _stat_tot_skipped_inst.at (i));
417- else
418- spdlog::info (" Core [{}] : {} inst count {}, skipped inst count {}" , _id, opcode_to_string (static_cast <Opcode>(i)), _stat_inst_count.at (i), _stat_tot_skipped_inst.at (i));
414+ for (int i = 0 ; i < static_cast <size_t >(Opcode::COUNT); i++) {
415+ auto opcode = static_cast <Opcode>(i);
416+ auto inst = _stat_inst_count.at (i);
417+ auto skipped = _stat_tot_skipped_inst.at (i);
418+ auto name = opcode_to_string (opcode);
419+
420+ if (opcode == Opcode::COMP) {
421+ auto gemm = _stat_gemm_inst;
422+ auto vector = inst - gemm;
423+ if (skipped)
424+ spdlog::info (" Core [{}] : {:8} inst_count {} (GEMM: {}, Vector: {}), skipped inst_count {}" ,
425+ _id, name, inst, gemm, vector, skipped);
426+ else
427+ spdlog::info (" Core [{}] : {:8} inst_count {} (GEMM: {}, Vector: {})" ,
428+ _id, name, inst, gemm, vector);
429+ }
430+ else {
431+ if (skipped)
432+ spdlog::info (" Core [{}] : {:8} inst_count {}, skipped inst_count {}" ,
433+ _id, name, inst, skipped);
434+ else
435+ spdlog::info (" Core [{}] : {:8} inst_count {}" ,
436+ _id, name, inst);
437+ }
419438 }
420439 spdlog::info (" ========= Core stat =========" );
421440 for (int i=0 ; i<_num_systolic_array_per_core; i++)
422441 sa_utilization.push_back (static_cast <float >(_stat_tot_sa_compute_cycle.at (i) * 100 ) / _core_cycle);
423442 for (int i=0 ; i<_num_systolic_array_per_core; i++)
424- spdlog::info (" Core [{}] : Systolic array [{}] Utilization (%) {:.2f}, active cycle {}, idle cycle {}" , _id, i, sa_utilization.at (i),
443+ spdlog::info (" Core [{}] : Systolic array [{}] utilization (%) {:.2f}, active_cycles {}, idle_cycles {}" , _id, i, sa_utilization.at (i),
425444 _stat_tot_sa_compute_cycle.at (i), _stat_tot_sa_compute_idle_cycle.at (i));
426445 float dram_bw = _config.dram_req_size * _stat_tot_mem_response * _config.core_freq_mhz / (_core_cycle * 1000 ); // B/cycle
427- spdlog::info (" Core [{}] : DMA active cycle {} DMA idle cycle {} DRAM BW {:.3f} GB/s ({})" , _id, _stat_tot_dma_cycle, _stat_tot_dma_idle_cycle, dram_bw, _stat_tot_mem_response);
428- spdlog::info (" Core [{}] : Vector Unit utilization(%) {:.2f}, active cycle {}, idle_cycle {}" , _id,
446+ spdlog::info (" Core [{}] : DMA active_cycles, {} DMA idle_cycles {}, DRAM BW {:.3f} GB/s ({} responses )" , _id, _stat_tot_dma_cycle, _stat_tot_dma_idle_cycle, dram_bw, _stat_tot_mem_response);
447+ spdlog::info (" Core [{}] : Vector unit utilization(%) {:.2f}, active cycle {}, idle_cycle {}" , _id,
429448 static_cast <float >(_stat_tot_vu_compute_cycle * 100 ) / _core_cycle, _stat_tot_vu_compute_cycle, _stat_tot_vu_compute_idle_cycle);
430- spdlog::info (" Core [{}] : NUMA local access count : {}, NUMA remote access count : {}" , _id, _stat_numa_hit, _stat_numa_miss );
431- spdlog::info (" Core [{}] : Total cycle {}" , _id, _core_cycle);
449+ spdlog::info (" Core [{}] : NUMA local memory : {} requests, remote memory : {} requests " , _id, _stat_numa_local_access, _stat_numa_remote_access );
450+ spdlog::info (" Core [{}] : Total_cycles {}" , _id, _core_cycle);
432451}
433452
434453void Core::print_current_stats () {
@@ -442,12 +461,12 @@ void Core::print_current_stats() {
442461
443462 spdlog::info (" ========= Core stat =========" );
444463 for (int i=0 ; i<_num_systolic_array_per_core; i++)
445- spdlog::info (" Core [{}] : Systolic array [{}] Utilization (%) {:.2f}, active cycle {}, idle cycle {}" , _id, i, sa_utilization.at (i),
464+ spdlog::info (" Core [{}] : Systolic array [{}] utilization (%) {:.2f}, active_cycles {}, idle_cycles {}" , _id, i, sa_utilization.at (i),
446465 _stat_sa_compute_cycle.at (i), _stat_sa_compute_idle_cycle.at (i));
447- spdlog::info (" Core [{}] : DMA active cycle {} DMA idle cycle {} DRAM BW {:.3f} GB/s ({})" , _id, _stat_dma_cycle, _stat_dma_idle_cycle, dram_bw, _stat_mem_response);
448- spdlog::info (" Core [{}] : Vector Unit Utilization(%) {:.2f}, active cycle {}, idle_cycle {}" , _id,
466+ spdlog::info (" Core [{}] : DMA active_cycles {}, DMA idle_cycles {}, DRAM BW {:.3f} GB/s ({} responses )" , _id, _stat_dma_cycle, _stat_dma_idle_cycle, dram_bw, _stat_mem_response);
467+ spdlog::info (" Core [{}] : Vector unit Utilization(%) {:.2f}, active_cycles {}, idle_cycles {}" , _id,
449468 static_cast <float >(_stat_vu_compute_cycle * 100 ) / _config.core_print_interval , _stat_vu_compute_cycle, _stat_vu_compute_idle_cycle);
450- spdlog::info (" Core [{}] : Total cycle {}" , _id, _core_cycle);
469+ spdlog::info (" Core [{}] : Total_cycles {}" , _id, _core_cycle);
451470 update_stats ();
452471}
453472
0 commit comments