solution
sol_3860713_1787981813753161157_4
01
source
Submitted source
723 bytes
show source
#include <cstddef>
#include <cstdint>
extern "C" void nk_sparse_dot_u32f32(
const std::uint32_t *a,
const std::uint32_t *b,
const float *a_weights,
const float *b_weights,
std::size_t a_length,
std::size_t b_length,
double *product
) {
std::size_t i = 0;
std::size_t j = 0;
double sum = 0.0;
while (i < a_length && j < b_length) {
const std::uint32_t ai = a[i];
const std::uint32_t bj = b[j];
if (ai == bj) {
sum += static_cast<double>(a_weights[i]) * static_cast<double>(b_weights[j]);
++i;
++j;
} else if (ai < bj) {
++i;
} else {
++j;
}
}
*product = sum;
}
02
jobs
Systems
03 jobs
03
counters
Performance counters
31 counters
cyclesi
183,682,995Show more
branch_instructionsi
46,447,108branch_missesi
5,711,173cycle_activity.stalls_l1d_missi
996,806cycle_activity.stalls_l2_missi
692,923cycle_activity.stalls_l3_missi
562,423cycle_activity.stalls_totali
83,392,602dtlb_load_misses.walk_completedi
799exe_activity.bound_on_loadsi
15,811,849exe_activity.bound_on_storesi
15,608instructionsi
116,124,155machine_clearsi
800mem_inst_retired.split_loadsi
1,214mem_load_retired.l1_missi
90,710mem_load_retired.l2_missi
5,702mem_load_retired.l3_missi
3,812tma_backend_boundi
99,278,784tma_bad_speculationi
321,164,523tma_branch_mispredict_slotsi
321,903,505tma_frontend_boundi
604,476,850tma_memory_boundi
12,345,006tma_retiringi
85,021,647tma_slotsi
1,104,221,352uops_dispatched.port_0i
12,000,137uops_dispatched.port_1i
9,068,955uops_dispatched.port_2_3_10i
60,329,088uops_dispatched.port_4_9i
821,731uops_dispatched.port_5_11i
31,942,929uops_dispatched.port_6i
80,700,354uops_dispatched.port_7_8i
820,640uops_retired.msi
0
04
top down
Top-down analysis
Raptor Cove P-core
05
profile
load profile
03
counters
Performance counters
26 counters
cyclesi
172,934,002Show more
branch_instructionsi
46,502,940branch_missesi
5,114,641dtlb_load_misses.walk_completedi
1,291instructionsi
116,242,515mem_bound_stalls.load_dram_hiti
558,713mem_bound_stalls.load_l2_hiti
2,604,714mem_bound_stalls.load_llc_hiti
35,136mem_inst_retired.split_loadsi
1,169mem_load_retired.l1_missi
329,164mem_load_retired.l2_missi
4,737mem_load_retired.l3_missi
3,991tma_backend_boundi
4,512,505tma_backend_bound_alloc_restrictionsi
234,416tma_backend_bound_non_memory_scheduleri
1,577,820tma_backend_bound_registeri
340tma_backend_bound_reorder_bufferi
969,025tma_backend_bound_serializationi
1,324,940tma_bad_speculationi
463,346,684tma_bad_speculation_branch_mispredicti
463,299,091tma_bad_speculation_machine_clearsi
47,593tma_frontend_bandwidthi
235,460,399tma_frontend_boundi
287,570,016tma_frontend_latencyi
52,109,617tma_memory_boundi
322,845tma_retiringi
116,867,597
04
top down
Top-down analysis
Gracemont E-core
05
profile
load profile
03
counters
Performance counters
19 counters
cyclesi
153,827,543Show more
amd.de_src_op_disp.alli
194,677,220amd.dram_fillsi
10,094amd.ex_no_retire.load_not_completei
29,830,170amd.ex_no_retire.not_completei
55,166,501amd.frontend_empty_cyclesi
48,512,700amd.l1d_accessesi
53,754,990amd.resyncs_or_nc_redirectsi
690branch_instructionsi
46,482,812branch_missesi
5,158,916dtlb_load_misses.walk_completedi
1,103instructionsi
116,298,239mem_load_retired.l1_missi
57,201mem_load_retired.l2_missi
56,615mem_load_retired.l3_missi
10,094tma_backend_boundi
31,880,196tma_frontend_boundi
697,373,956tma_retiringi
98,841,778uops_retired.msi
395,018
04
top down
Top-down analysis
AMD Zen 4
05
profile
load profile