Commit df84945
committed
Fix: assert/LOG paths failing when pto2_current_runtime() is null on AICPU
Problem: assert_impl and related code in orchestration/common.cpp use LOG_*
macros that dereference pto2_current_runtime()->ops. On the device path,
pto2_submit_mixed_task and other runtime code run in libaicpu_kernel.so, but
only the orchestration plugin (libdevice_orch_*.so) had g_pto2_current_runtime
set via dlsym(pto2_framework_bind_runtime). Each .so carries its own copy of
common.cpp, so the AICPU image's g_ stayed nullptr and assertion reporting
could crash or misbehave.
Fix: In AicpuExecutor, call the link-resolved pto2_framework_bind_runtime(rt)
for this DSO before orch_bind_runtime_, and pto2_framework_bind_runtime(nullptr)
before pto2_runtime_destroy, mirroring the orchestration SO bind. Same change
for a5 tensormap_and_ringbuffer.1 parent d18163c commit df84945
2 files changed
Lines changed: 14 additions & 4 deletions
File tree
- src
- a2a3/runtime/tensormap_and_ringbuffer/aicpu
- a5/runtime/tensormap_and_ringbuffer/aicpu
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| |||
2112 | 2116 | | |
2113 | 2117 | | |
2114 | 2118 | | |
| 2119 | + | |
2115 | 2120 | | |
2116 | 2121 | | |
2117 | 2122 | | |
| |||
2353 | 2358 | | |
2354 | 2359 | | |
2355 | 2360 | | |
2356 | | - | |
2357 | | - | |
| 2361 | + | |
| 2362 | + | |
2358 | 2363 | | |
2359 | 2364 | | |
2360 | 2365 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| |||
2091 | 2095 | | |
2092 | 2096 | | |
2093 | 2097 | | |
| 2098 | + | |
2094 | 2099 | | |
2095 | 2100 | | |
2096 | 2101 | | |
| |||
2330 | 2335 | | |
2331 | 2336 | | |
2332 | 2337 | | |
2333 | | - | |
2334 | | - | |
| 2338 | + | |
| 2339 | + | |
2335 | 2340 | | |
2336 | 2341 | | |
2337 | 2342 | | |
| |||
0 commit comments