Skip to content

fix(linked): support readelf without demangling - #875

Merged
voltjia merged 3 commits into
feat/linked-moore-silu-and-mulfrom
fix/linked-readelf-demangling
Aug 7, 2026
Merged

voltjia merged 3 commits into
feat/linked-moore-silu-and-mulfrom
fix/linked-readelf-demangling

Conversation

@voltjia

@voltjia voltjia commented Aug 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Inspect dynamic symbols with readelf --dyn-syms --wide.
  • Demangle raw names in one GNU- or LLVM-compatible c++filt process.
  • Preserve exact ABI matching across independent nm and readelf symbol inventories.

Motivation

Some supported vendor environments provide a readelf version without the optional --demangle flag. Batch demangling keeps linked-operator discovery portable without weakening its exact-symbol validation.

Depends on #874. N/A - no linked issue.

Type of Change

  • feat - new feature / new operator / new platform
  • fix - bug fix
  • perf - performance improvement (no behavioral change)
  • refactor - code restructuring without behavior change
  • test - adding or fixing tests only
  • docs - documentation only
  • build / ci - build system or CI configuration
  • chore - tooling, formatting, or other non-code changes
  • Breaking change

Platforms Affected

  • CPU (WITH_CPU)
  • NVIDIA (WITH_NVIDIA)
  • Iluvatar (WITH_ILUVATAR)
  • MetaX (WITH_METAX)
  • Cambricon (WITH_CAMBRICON)
  • Moore (WITH_MOORE)
  • Ascend (WITH_ASCEND)
  • Hygon (WITH_HYGON)
  • PyTorch C++ bindings (WITH_TORCH)
  • Build system / CMake / CI
  • Python bindings / user-facing API

Smoke Test Result

N/A - this PR changes configure-time symbol inspection only; it does not alter an operator runtime path.

Test Results on Supported Platforms

Focused validation at 9de22dd5:

python -m pytest --noconftest tests/test_resolve_linked_ops.py tests/test_generate_wrappers.py -q
39 passed

ruff format --check scripts/resolve_linked_ops.py tests/test_resolve_linked_ops.py
2 files already formatted

ruff check scripts/resolve_linked_ops.py tests/test_resolve_linked_ops.py
All checks passed!

At current head 9de22dd5, build, Ruff, Clang Format, and main/shadow CI for MetaX, Ascend, Cambricon, and Moore pass.

Benchmark / Performance Impact

N/A - configure-time portability fix; runtime paths are unchanged.

Notes for Reviewers

  • Exact demangled signatures must appear in both independent symbol inventories.
  • c++filt receives raw readelf function symbols in one batch.
  • This PR contains no library mapping, operator adapter, or runtime changes.

@voltjia
voltjia force-pushed the fix/linked-readelf-demangling branch from da50764 to b5bf71e Compare August 5, 2026 11:51
@voltjia voltjia mentioned this pull request Aug 6, 2026
7 of 20 tasks
@voltjia
voltjia force-pushed the fix/linked-readelf-demangling branch from b5bf71e to 72497c5 Compare August 6, 2026 08:34
@voltjia
voltjia force-pushed the fix/linked-readelf-demangling branch from 72497c5 to 9de22dd Compare August 6, 2026 08:46
@voltjia
voltjia marked this pull request as ready for review August 6, 2026 09:09
@voltjia
voltjia requested a review from a team August 6, 2026 09:09
@voltjia voltjia changed the title fix(linked): support readelf without demangling fix(linked): support readelf without demangling Aug 6, 2026
@voltjia
voltjia merged commit e2ac311 into master Aug 7, 2026
16 of 20 checks passed
@voltjia
voltjia deleted the fix/linked-readelf-demangling branch August 7, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants