## num_cores=1:数值检查通过;kernel 段 37 个 bundle;vld 8、vmul 8、vst 8;vsyncadd.remote 1 bundle 0: prelude-prefix-start bundle 9: routine:wait-for-active-dma bundle 16: routine:program-exit bundle 19: routine:allocation-table-find bundle 28: routine:allocation-table-get-or-add bundle 54: routine:allocation-table-cut-and-add bundle 71: routine:branch-impl bundle 122: routine:branch bundle 128: trampoline:program-start bundle 503: function jit(scale)/scale/mpmd_map [symbol 4, scale.1]; image bundles [503, 507) bundle 504: entry bundle: %scale.1 = custom-call(%x_hbm.1) bundle 507: end function jit(scale)/scale/mpmd_map [symbol 4, scale.1] bundle 508: function jit(scale)/scale/mpmd_map [symbol 4, scale.1]; image bundles [508, 525) bundle 525: end function jit(scale)/scale/mpmd_map [symbol 4, scale.1] bundle 525: exit bundle: %scale.1 = custom-call(%x_hbm.1) bundle 526: function jit(scale)/scale/mpmd_map [symbol 4, scale.1]; image bundles [526, 542) bundle 542: end function jit(scale)/scale/mpmd_map [symbol 4, scale.1] bundle 660: 清单结束(共 660 个 bundle) # function jit(scale)/scale/mpmd_map [symbol 4, scale.1]; image bundles [503, 507) { misc: vtrace 0x80000000 } # entry bundle: %scale.1 = custom-call(%x_hbm.1) { s1: sld s6, [smem:0x1] } { s0: sne.s32 p0, s6, 0 } { s0: @p0 sbr.rel L_020d } # end function jit(scale)/scale/mpmd_map [symbol 4, scale.1] # ... 省略 runtime 代码 1 个 bundle # function jit(scale)/scale/mpmd_map [symbol 4, scale.1]; image bundles [508, 525) { s0: simm.s32 s7, 0 ; # materialized constant .encoding { s0.y = lo(imm0) } } { s0: dma.simple [vmem:s7], [hbm:s0], length=64, dst_flag=[sflag:52] } { misc: vwait.ge [sflag:52], 64 ; # chapter02/01_megacore/01_pallas_two_cores.py:42:12-42:66 [dma_wait; LLO 65] .encoding { misc.value = imm2 } } { vld: vld.8x128 v0, [vmem:0x0] ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 27] misc: vsyncadd.s32 [sflag:52], -64 ; # chapter02/01_megacore/01_pallas_two_cores.py:42:12-42:66 [dma_wait; LLO 66] .encoding { misc.value = imm2 } } { va0: vmul.8x128.f32 v1, 2.0, v0 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 35] vld: vld.8x128 v2, [vmem:0x8] } # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 28] { va0: vmul.8x128.f32 v3, 2.0, v2 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 36] vld: vld.8x128 v4, [vmem:0x10] } # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 29] { va0: vmul.8x128.f32 v5, 2.0, v4 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 37] vst: vst.8x128 [vmem:0x0], v1 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 43] vld: vld.8x128 v6, [vmem:0x18] ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 30] .encoding { vst.offset = imm2 } } { va0: vmul.8x128.f32 v7, 2.0, v6 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 38] vst: vst.8x128 [vmem:0x8], v3 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 44] vld: vld.8x128 v8, [vmem:0x20] ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 31] .encoding { vst.offset = imm2 } } { va0: vmul.8x128.f32 v9, 2.0, v8 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 39] vst: vst.8x128 [vmem:0x10], v5 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 45] vld: vld.8x128 v10, [vmem:0x28] ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 32] .encoding { vst.offset = imm2 } } { va0: vmul.8x128.f32 v11, 2.0, v10 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 40] vst: vst.8x128 [vmem:0x18], v7 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 46] vld: vld.8x128 v12, [vmem:0x30] ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 33] .encoding { vst.offset = imm2 } } { va0: vmul.8x128.f32 v13, 2.0, v12 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 41] vst: vst.8x128 [vmem:0x20], v9 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 47] vld: vld.8x128 v14, [vmem:0x38] ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 34] .encoding { vst.offset = imm2 } } { va0: vmul.8x128.f32 v15, 2.0, v14 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 42] vst: vst.8x128 [vmem:0x28], v11 } # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 48] { vst: vst.8x128 [vmem:0x30], v13 } # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 49] { vst: vst.8x128 [vmem:0x38], v15 } # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 50] { s0: dma.simple [hbm:s1], [vmem:s7], length=64, dst_flag=[sflag:52] } { misc: vwait.ge [sflag:52], 64 ; # chapter02/01_megacore/01_pallas_two_cores.py:44:12-44:66 [dma_wait; LLO 67] .encoding { misc.value = imm2 } } { misc: vsyncadd.s32 [sflag:52], -64 ; # chapter02/01_megacore/01_pallas_two_cores.py:44:12-44:66 [dma_wait; LLO 68] .encoding { misc.value = imm2 } } # end function jit(scale)/scale/mpmd_map [symbol 4, scale.1] # ... 省略 runtime 代码 1 个 bundle # function jit(scale)/scale/mpmd_map [symbol 4, scale.1]; image bundles [526, 542) { s1: sld s20, [smem:0x0] } { s1: sld s21, [smem:0x1] } { s0: sand.u32 s24, 0xfff, s20 } { s0: sadd.s32 s22, 1, s21 ; s1: sshll.u32 s27, s24, 0x12 } { s0: sand.u32 s23, 0x1, s22 } # smod.u32 w/div 2 { s0: sand.u32 s25, 0x3, s23 } { s0: sshll.u32 s26, s25, 0x10 } { s0: sadd.s32 s28, 131072, s26 } { s0: sshrl.u32 s29, s28, 0x2 } { s0: sor.u32 s30, 0x2d, s29 } { s0: sor.u32 s2, s30, s27 } { misc: vsyncadd.remote.s32 [sflag:s2], 1 } { misc: vwait.ge [sflag:45], 1 ; .encoding { misc.value = imm2 } } { misc: vsyncadd.s32 [sflag:45], -1 ; .encoding { misc.value = imm2 } } { misc: cfence } { misc: vtrace 0x90000000 } # end function jit(scale)/scale/mpmd_map [symbol 4, scale.1] ## num_cores=2:数值检查通过;kernel 段 43 个 bundle;vld 4、vmul 4、vst 4;vsyncadd.remote 2 bundle 0: prelude-prefix-start bundle 9: routine:wait-for-active-dma bundle 16: routine:program-exit bundle 19: routine:allocation-table-find bundle 28: routine:allocation-table-get-or-add bundle 54: routine:allocation-table-cut-and-add bundle 71: routine:branch-impl bundle 122: routine:branch bundle 128: trampoline:program-start bundle 503: function jit(scale)/scale/mpmd_map [symbol 4, scale.1]; image bundles [503, 546) bundle 504: entry bundle: %scale.1 = custom-call(%x_hbm.1) bundle 529: exit bundle: %scale.1 = custom-call(%x_hbm.1) bundle 546: end function jit(scale)/scale/mpmd_map [symbol 4, scale.1] bundle 660: 清单结束(共 660 个 bundle) # function jit(scale)/scale/mpmd_map [symbol 4, scale.1]; image bundles [503, 546) { misc: vtrace 0x80000000 } # entry bundle: %scale.1 = custom-call(%x_hbm.1) { s1: sld s6, [smem:0x1] } { s1: sld s7, [smem:0x0] } { s0: sadd.s32 s8, 1, s6 } { s0: sand.u32 s9, 0x1, s8 ; # smod.u32 w/div 2 s1: sand.u32 s10, 0xfff, s7 } { s0: sand.u32 s11, 0x3, s9 ; s1: sshll.u32 s13, s10, 0x12 } { s0: sshll.u32 s12, s11, 0x10 } { s0: sadd.s32 s14, 131072, s12 } { s0: sshrl.u32 s15, s14, 0x2 } { s0: sor.u32 s16, 0x2d, s15 } { s0: sor.u32 s17, s16, s13 } { misc: vsyncadd.remote.s32 [sflag:s17], 1 } { misc: vwait.ge [sflag:45], 1 ; .encoding { misc.value = imm2 } } { s0: sshll.u32 s18, s6, 0x5 ; # chapter02/01_megacore/01_pallas_two_cores.py:41:27-41:38 [mul; LLO 62] s1: simm.s32 s22, 0 ; # materialized constant misc: vsyncadd.s32 [sflag:45], -1 ; .encoding { misc.value = imm2 ; s1.y = lo(imm0) } } { s0: sadd.s32 s21, s18, s0 } # chapter02/01_megacore/01_pallas_two_cores.py:42:12-42:59 [dma_start; LLO 21] | chapter02/01_megacore/01_pallas_two_cores.py:42:12-42:66 [dma_wait; LLO 21] { s0: dma.simple [vmem:s22], [hbm:s21], length=32, dst_flag=[sflag:52] } { misc: vwait.ge [sflag:52], 32 ; # chapter02/01_megacore/01_pallas_two_cores.py:42:12-42:66 [dma_wait; LLO 64] .encoding { misc.value = imm2 } } { s0: sadd.s32 s25, s18, s1 ; # chapter02/01_megacore/01_pallas_two_cores.py:44:12-44:59 [dma_start; LLO 46] | chapter02/01_megacore/01_pallas_two_cores.py:44:12-44:66 [dma_wait; LLO 46] vld: vld.8x128 v0, [vmem:0x0] ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 34] misc: vsyncadd.s32 [sflag:52], -32 ; # chapter02/01_megacore/01_pallas_two_cores.py:42:12-42:66 [dma_wait; LLO 65] .encoding { misc.value = imm2 } } { va0: vmul.8x128.f32 v1, 2.0, v0 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 38] vld: vld.8x128 v2, [vmem:0x8] } # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 35] { va0: vmul.8x128.f32 v3, 2.0, v2 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 39] vld: vld.8x128 v4, [vmem:0x10] } # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 36] { va0: vmul.8x128.f32 v5, 2.0, v4 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 40] vst: vst.8x128 [vmem:0x0], v1 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 42] vld: vld.8x128 v6, [vmem:0x18] ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:37 [get; LLO 37] .encoding { vst.offset = imm2 } } { va0: vmul.8x128.f32 v7, 2.0, v6 ; # chapter02/01_megacore/01_pallas_two_cores.py:43:26-43:43 [mul; LLO 41] vst: vst.8x128 [vmem:0x8], v3 } # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 43] { vst: vst.8x128 [vmem:0x10], v5 } # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 44] { vst: vst.8x128 [vmem:0x18], v7 } # chapter02/01_megacore/01_pallas_two_cores.py:43:12-43:23 [swap; LLO 45] { s0: dma.simple [hbm:s25], [vmem:s22], length=32, dst_flag=[sflag:52] } { misc: vwait.ge [sflag:52], 32 ; # chapter02/01_megacore/01_pallas_two_cores.py:44:12-44:66 [dma_wait; LLO 66] .encoding { misc.value = imm2 } } # exit bundle: %scale.1 = custom-call(%x_hbm.1) { misc: vsyncadd.s32 [sflag:52], -32 ; # chapter02/01_megacore/01_pallas_two_cores.py:44:12-44:66 [dma_wait; LLO 67] .encoding { misc.value = imm2 } } { s1: sld s20, [smem:0x0] } { s1: sld s21, [smem:0x1] } { s0: sand.u32 s24, 0xfff, s20 } { s0: sadd.s32 s22, 1, s21 ; s1: sshll.u32 s27, s24, 0x12 } { s0: sand.u32 s23, 0x1, s22 } # smod.u32 w/div 2 { s0: sand.u32 s25, 0x3, s23 } { s0: sshll.u32 s26, s25, 0x10 } { s0: sadd.s32 s28, 131072, s26 } { s0: sshrl.u32 s29, s28, 0x2 } { s0: sor.u32 s30, 0x2d, s29 } { s0: sor.u32 s2, s30, s27 } { misc: vsyncadd.remote.s32 [sflag:s2], 1 } { misc: vwait.ge [sflag:45], 1 ; .encoding { misc.value = imm2 } } { misc: vsyncadd.s32 [sflag:45], -1 ; .encoding { misc.value = imm2 } } { misc: cfence } { misc: vtrace 0x90000000 } # end function jit(scale)/scale/mpmd_map [symbol 4, scale.1]