# REQUIRES: ascend-debugger
# RUN: source ~/Ascend_Daily/ascend-toolkit/set_env.sh; bash ~/test/test_case_matmul_framework_aclnn.sh
# RUN: cd ~/samples/operator/MatMulCustomSample/FrameworkLaunch/AclNNInvocation/output/
# RUN: LAUNCH_KERNEL_PATH=../../MatmulCustomMultiCore/build_out/op_kernel/binary/ascend910b/bin/matmul_custom/MatmulCustom_1396c02f7d7795e4c5cf7dddc5abe6da.o msdebug execute_matmul_op -s %s | FileCheck %s -dump-input=always
b matmul_custom.cpp:10
# CHECK-LABEL: b matmul_custom.cpp:10
# CHECK-NEXT: Breakpoint {{[1-9]+}}:
run
# CHECK-LABEL: run
# CHECK: [Launch of Kernel {{[0-9a-zA-Z_]+}} on Device {{[0-9]+}}]
# CHECK: Process {{[0-9]+}} stopped
# CHECK-NEXT: [Switching to focus on Kernel {{[0-9a-zA-Z_]+}}, CoreId {{[0-9]+}}, Type {{[aivc]+}}]
# CHECK-NEXT: * thread #1, name = '{{.*}}', stop reason = breakpoint {{[1-9]+}}.{{[1-9]}}
# CHECK-NEXT: frame #0: 0x{{[0-9a-f]+}} {{[^(]+\(.*\)}} at matmul_custom.cpp:10:{{[1-9]+}}
br delete
y
ascend info devices
# CHECK-LABEL: ascend info devices
# CHECK-NEXT: Device Aic_Num Aiv_Num Aic_Mask Aiv_Mask
# CHECK-NEXT:* {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} 0x{{[0-9a-f]+}} 0x{{[0-9a-f]+}}
ascend info cores
# CHECK-LABEL: ascend info cores
# CHECK-NEXT: CoreId Type Device Stream Task Block PC stop reason
# CHECK-NEXT:{{[\*]?}} {{[0-9]+}} aic {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} 0x{{[0-9a-f]+}} breakpoint {{[1-9]+}}.{{[1-9]+}}
# CHECK-NEXT:{{[\*]?}} {{[0-9]+}} aiv {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} 0x{{[0-9a-f]+}} breakpoint {{[1-9]+}}.{{[1-9]+}}
# CHECK-NEXT:{{[\*]?}} {{[0-9]+}} aiv {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} 0x{{[0-9a-f]+}} breakpoint {{[1-9]+}}.{{[1-9]+}}
ascend info tasks
# CHECK-LABEL: ascend info tasks
# CHECK-NEXT: Device Stream Task Invocation
# CHECK-NEXT:* {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} {{[0-9a-zA-Z_]+}}
ascend info stream
# CHECK-LABEL: ascend info stream
# CHECK-NEXT: Device Stream Type
# CHECK-NEXT:* {{[0-9]+}} {{[0-9]+}} aiv
ascend info blocks
# CHECK-LABEL: ascend info blocks
# CHECK-NEXT: Device Stream Task Block
# CHECK-NEXT:{{[\*]?}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}}
# CHECK-NEXT:{{[\*]?}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}}
# CHECK-NEXT:{{[\*]?}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}}
ascend info blocks -d
# CHECK-LABEL: ascend info blocks -d
# CHECK-NEXT: Current stop state of all blocks:
# CHECK: [{{[\*]?[' ']?}}CoreId {{[0-9]+}}, Block {{[0-9]+}}]
# CHECK-NEXT: * thread #1, name = 'execute_matmul_', stop reason = breakpoint {{[1-9]+}}.{{[1-9]+}}
# CHECK-NEXT: frame #0: 0x{{[0-9a-f]+}} MatmulCustom_{{[0-9a-f]+}}.o`MatmulKernel<half, half, float, float>::MatmulKernel(this=0x{{[0-9a-f]+}}) (.cube) at matmul_custom.cpp:10:{{[1-9]+}}
# CHECK-NEXT: 7 template<typename aType, typename bType, typename cType, typename biasType>
# CHECK-NEXT: 8 class MatmulKernel{
# CHECK-NEXT: 9 public:
# CHECK-NEXT: -> 10 __aicore__ inline MatmulKernel(){};
# CHECK-NEXT: ^
# CHECK-NEXT: 11 __aicore__ inline void Init(GM_ADDR a, GM_ADDR b, GM_ADDR bias, GM_ADDR c, GM_ADDR workspace, const TCubeTiling& tiling);
# CHECK-NEXT: 12 template <bool setTmpSpace = false>
# CHECK-NEXT: 13 __aicore__ inline void Process(TPipe* pipe);
# CHECK: [{{[\*]?[' ']?}}CoreId {{[0-9]+}}, Block {{[0-9]+}}]
# CHECK-NEXT: * thread #1, name = 'execute_matmul_', stop reason = breakpoint {{[1-9]+}}.{{[1-9]+}}
# CHECK-NEXT: frame #0: 0x{{[0-9a-f]+}} MatmulCustom_{{[0-9a-f]+}}.o`MatmulKernel<half, half, float, float>::MatmulKernel(this=0x{{[0-9a-f]+}}) (.vector) at matmul_custom.cpp:10:{{[1-9]+}}
# CHECK-NEXT: 7 template<typename aType, typename bType, typename cType, typename biasType>
# CHECK-NEXT: 8 class MatmulKernel{
# CHECK-NEXT: 9 public:
# CHECK-NEXT: -> 10 __aicore__ inline MatmulKernel(){};
# CHECK-NEXT: ^
# CHECK-NEXT: 11 __aicore__ inline void Init(GM_ADDR a, GM_ADDR b, GM_ADDR bias, GM_ADDR c, GM_ADDR workspace, const TCubeTiling& tiling);
# CHECK-NEXT: 12 template <bool setTmpSpace = false>
# CHECK-NEXT: 13 __aicore__ inline void Process(TPipe* pipe);
# CHECK: [{{[\*]?[' ']?}}CoreId {{[0-9]+}}, Block {{[0-9]+}}]
# CHECK-NEXT: * thread #1, name = 'execute_matmul_', stop reason = breakpoint {{[1-9]+}}.{{[1-9]+}}
# CHECK-NEXT: frame #0: 0x{{[0-9a-f]+}} MatmulCustom_{{[0-9a-f]+}}.o`MatmulKernel<half, half, float, float>::MatmulKernel(this=0x{{[0-9a-f]+}}) (.vector) at matmul_custom.cpp:10:{{[1-9]+}}
# CHECK-NEXT: 7 template<typename aType, typename bType, typename cType, typename biasType>
# CHECK-NEXT: 8 class MatmulKernel{
# CHECK-NEXT: 9 public:
# CHECK-NEXT: -> 10 __aicore__ inline MatmulKernel(){};
# CHECK-NEXT: ^
# CHECK-NEXT: 11 __aicore__ inline void Init(GM_ADDR a, GM_ADDR b, GM_ADDR bias, GM_ADDR c, GM_ADDR workspace, const TCubeTiling& tiling);
# CHECK-NEXT: 12 template <bool setTmpSpace = false>
# CHECK-NEXT: 13 __aicore__ inline void Process(TPipe* pipe);
quit
y