Ambiguous .o File Selection When LAUNCH_KERNEL_PATH Is Configured to Import Operator Debugging Information

Symptom

When debugging a large operator such as fused_infer_attention_score, it is difficult to determine which file to import because a large number of .o files are generated after compilation (as shown below).

(py39) $ find ./ -name *.o
./op_impl/ai_core/tbe/kernel/ascend910b/fused_infer_attention_score/FusedInferAttentionScore_c9779e9cf662582fdc59feae83d98a97.o
./op_impl/ai_core/tbe/kernel/ascend910b/fused_infer_attention_score/FusedInferAttentionScore_c9779e9cf662582fdc59feae83d98a97_relocatable.o
./op_impl/ai_core/tbe/kernel/ascend910b/fused_infer_attention_score/FusedInferAttentionScore_436344defac760e81ad543718775dedf_relocatable.o
./op_impl/ai_core/tbe/kernel/ascend910b/fused_infer_attention_score/FusedInferAttentionScore_ecc807936618ac360a79b21656f3ff04_relocatable.o
./op_impl/ai_core/tbe/kernel/ascend910b/fused_infer_attention_score/FusedInferAttentionScore_29c62fc24e72bbc0878b0bd85b4a328d.o
./op_impl/ai_core/tbe/kernel/ascend910b/fused_infer_attention_score/FusedInferAttentionScore_3b093497fc536d61a77a7a3293a524da_relocatable.o
./op_impl/ai_core/tbe/kernel/ascend910b/fused_infer_attention_score/FusedInferAttentionScore_b7875fc3902e4412f7a0663e4d08c4c5_relocatable.o
./op_impl/ai_core/tbe/kernel/ascend910b/fused_infer_attention_score/FusedInferAttentionScore_8cd36e66e4ceb2d60ef96db29a147347.o
./op_impl/ai_core/tbe/kernel/ascend910b/fused_infer_attention_score/FusedInferAttentionScore_ed7b89d48fbae9f46c581ea00e7f9149_relocatable.o
./op_impl/ai_core/tbe/kernel/ascend910b/fused_infer_attention_score/FusedInferAttentionScore_885c5eb692c9d72249a97ae03b5ea7c7.o
./op_impl/ai_core/tbe/kernel/ascend910b/fused_infer_attention_score/FusedInferAttentionScore_e5777797aa0db1ccf2f4b8b25a0e9c0d.o
...

Possible Cause

Because the operator is large, a large number of .o files are generated after compilation. It is difficult for users to determine which .o file to import.

Solution

Use msDebug to directly start the operator program. You do not need to set breakpoints. Run the r command to run the operator program. Pay attention to the following information displayed on the screen. [Launch of Kernel FusedInferAttentionScore_8cd36e66e4ceb2d60ef96db29a147347_110000 on Device 0] indicates the operator name FusedInferAttentionScore_8cd36e66e4ceb2d60ef96db29a147347_110000. Therefore, the .o file loaded in the operator program is FusedInferAttentionScore_8cd36e66e4ceb2d60ef96db29a147347.o.

(py39) $ msdebug -- bash build.sh --run_example fused_infer_attention_score eager cust
msdebug(MindStudio Debugger) is part of MindStudio Operator-dev Tools.
The tool provides developers with a mechanism for debugging Ascend kernels running on actual hardware.
This enables developers to debug Ascend kernels without being affected by potential changes brought by simulation and emulation environments.
(msdebug) target create "bash"
Current executable set to '/usr/bin/bash' (aarch64).
(msdebug) settings set -- target.run-args  "build.sh" "--run_example" "fused_infer_attention_score" "eager" "cust"
(msdebug) r
Process 2395539 launched: '/usr/bin/bash' (aarch64)
Process 2395539 stopped and restarted: thread 1 received signal: SIGCHLD
...
[2026-02-24 20:13:25] Start to run example,name:fused_infer_attention_score mode:eager
[2026-02-24 20:13:25] Start compile and run example file: ../attention/fused_infer_attention_score/examples/test_aclnn_fused_infer_attention_score.cpp
[2026-02-24 20:13:25] pkg_mode:cust vendor_name:custom
[2026-02-24 20:13:28] [Launch of Kernel FusedInferAttentionScore_8cd36e66e4ceb2d60ef96db29a147347_110000 on Device 0]
[2026-02-24 20:13:30] result[0] is: 1.000000
[2026-02-24 20:13:30] result[1] is: 1.000000
...
[2026-02-24 20:13:30] result[31] is: 1.000000
[2026-02-24 20:13:30] run test_aclnn_fused_infer_attention_score, execute samples success
[2026-02-24 20:13:30] Example completed successfully
Process 2395539 stopped and restarted: thread 1 received signal: SIGCHLD
Process 2395539 exited with status = 0 (0x00000000) 
(msdebug)