Simplify AicpuExecutor API and unify naming conventions - #7
Closed
ChaoZheng109 wants to merge 1 commit into
Closed
ChaoZheng109 wants to merge 1 commit into
ChaoZheng109 wants to merge 1 commit into
Conversation
ChaoZheng109
force-pushed
the
runtime-args2
branch
from
January 28, 2026 06:46
0346308 to
dce3fc7
Compare
## Summary This PR simplifies the AICPU executor interface and improves code consistency through refactoring and renaming. ## Changes - **Rename**: `runtimeexecutor.cpp` → `aicpu_executor.cpp`, `RuntimeExecutor` → `AicpuExecutor` - **Remove redundant parameter**: Removed `runtimeCtx` from `KernelArgs` structure - **Simplify API**: Reduced redundant input parameters in executor methods - **Unify naming**: Changed global variable `g_executor` → `g_aicpu_executor` for better clarity ## Files Changed - `src/runtime/aicpu/runtimeexecutor.cpp` → `src/runtime/aicpu/aicpu_executor.cpp` - `src/platform/a2a3/aicpu/kernel.cpp` - `src/platform/a2a3/common/kernel_args.h` - `src/platform/a2a3/host/devicerunner.cpp` - `example/main.py` ## Impact - Cleaner and more consistent naming convention - Simplified function signatures with fewer parameters - No functional behavior changes
ChaoZheng109
force-pushed
the
runtime-args2
branch
from
January 28, 2026 06:52
dce3fc7 to
b3c7cca
Compare
ChaoWao
added a commit
to ChaoWao/simpler-fork
that referenced
this pull request
Jun 26, 2026
…tgun - running-onboard: redirect device logs via ASCEND_PROCESS_LOG_PATH (export == --env); add a 507018 triage table (deadlock-detect vs SPIN-timeout vs OS op-timeout vs forward-progress stall) so a generic host 507018 is classified from the device log. - new dfx-analyze skill: reach for simpler's built-in DFX tools (device_log_timing, swimlane_converter, sched_overhead_analysis, deps_viewer, dump_viewer) instead of hand-rolling timing/instrumentation in the runtime. - codestyle rule hw-native-sys#7: never log on AICPU hot paths (floods device_log -> op-timeout, masking the behavior under study). - multi-repo-setup: non-editable reinstall can silently skip the runtime .so rebuild; verify the built .so changed or cmake --build the cache + sync to both load locations.
ChaoWao
added a commit
that referenced
this pull request
Jun 26, 2026
…tgun (#1163) - running-onboard: redirect device logs via ASCEND_PROCESS_LOG_PATH (export == --env); add a 507018 triage table (deadlock-detect vs SPIN-timeout vs OS op-timeout vs forward-progress stall) so a generic host 507018 is classified from the device log. - new dfx-analyze skill: reach for simpler's built-in DFX tools (device_log_timing, swimlane_converter, sched_overhead_analysis, deps_viewer, dump_viewer) instead of hand-rolling timing/instrumentation in the runtime. - codestyle rule #7: never log on AICPU hot paths (floods device_log -> op-timeout, masking the behavior under study). - multi-repo-setup: non-editable reinstall can silently skip the runtime .so rebuild; verify the built .so changed or cmake --build the cache + sync to both load locations.
3 tasks
ChaoWao
added a commit
that referenced
this pull request
Jul 29, 2026
…1578) RemoteSocketTransport tests start a helper server thread, then construct a RemoteL3SocketTransport whose constructor throws on a connect or HELLO timeout — routine on a loaded box. The unwind destroyed the local std::thread while it was still joinable, so std::terminate aborted the whole binary mid-suite: #5 std::terminate () #6 std::thread::~thread() () #7 RemoteSocketTransport_ClosedPeerWriteDoesNotRaiseSigpipe_Test::TestBody() Reproduced at 2/96 with 32 concurrent copies on a loaded 320-core box; the run that aborts takes every other case in the binary with it, and the message ("terminate called without an active exception", printed because no handler has caught the in-flight exception yet) reads like a hang rather than a timeout. start_stalling_server also captured the test's stack std::atomic<bool> stop flag by reference, so the same unwind left a running thread polling a dead object. ScopedServerThread owns both the thread and the stop flag, and joins in its destructor, which closes both holes: the flag now outlives the thread, and no unwind can reach a joinable std::thread. Joining alone would swap the abort for a hang, because a thread parked in accept() never returns when the client's connect is exactly what failed. accept_until_stop polls the listener in 20 ms slices and rechecks the stop flag, so stop_and_join always makes progress. It reads the flag only after a poll slice, so a connection already pending still wins: ClosedPeerWriteDoesNotRaiseSigpipe calls stop_and_join right after a successful connect and depends on that connection being accepted and RST. Add ServerThreadIsJoinedWhenTestBodyUnwinds, which throws out of a scope holding a live server thread that never sees a client. It covers both halves — reverted to the old bare-std::thread idiom it aborts with the production message, and a join that could not reap a parked accept() would trip its elapsed bound instead. ut-cpp 65/65 green; 192 concurrent runs of the binary now abort 0 times.
This was referenced Aug 18, 2026
5 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR simplifies the AICPU executor interface and improves code consistency through refactoring and renaming.
Changes
runtimeexecutor.cpp→aicpu_executor.cpp,RuntimeExecutor→AicpuExecutorruntimeCtxfromKernelArgsstructureg_executor→g_aicpu_executorfor better clarityFiles Changed
src/runtime/aicpu/runtimeexecutor.cpp→src/runtime/aicpu/aicpu_executor.cppsrc/platform/a2a3/aicpu/kernel.cppsrc/platform/a2a3/common/kernel_args.hsrc/platform/a2a3/host/devicerunner.cppexample/main.pyImpact