Skip to content

tools: debug_stream: set explicit ctypes layout - #11188

Open
jsarha wants to merge 1 commit into
thesofproject:mainfrom
jsarha:debug_stream_reader_fix
Open

tools: debug_stream: set explicit ctypes layout#11188
jsarha wants to merge 1 commit into
thesofproject:mainfrom
jsarha:debug_stream_reader_fix

Conversation

@jsarha

@jsarha jsarha commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

The packed structs need extra definitions in python 3.14.

Copilot AI lite review requested due to automatic review settings September 11, 2026 07:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The invalid ctypes layout prevents the module from importing in Python 3.14.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This pull request updates packed ctypes structures for Python 3.14 compatibility.

Changes:

  • Adds explicit layouts to CPUInfo, ThreadInfo, and TextMsg.
  • The configured "gcc" layout is invalid and causes import-time failure.
File summaries
File Summary
tools/debug_stream/debug_stream.py Adds layout declarations to packed debug-stream structures.
Review details

Suppressed comments (2)

tools/debug_stream/debug_stream.py:69

  • "gcc" is not a valid ctypes layout name in Python 3.14 (the accepted names are "ms" and "gcc-sysv"), so importing this module raises ValueError while defining ThreadInfo. Since this structure already uses _pack_, select the compatible MS layout explicitly.
    _layout_ = "gcc"

tools/debug_stream/debug_stream.py:83

  • "gcc" is not a valid ctypes layout name in Python 3.14 (the accepted names are "ms" and "gcc-sysv"), so importing this module raises ValueError while defining TextMsg. Since this structure already uses _pack_, select the compatible MS layout explicitly.
    _layout_ = "gcc"
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/debug_stream/debug_stream.py Outdated
"""

_pack_ = 1
_layout_ = "gcc"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously gcc-sysv is the correct choice. Github reviewer does not appear to have too much context about this project.

@jsarha
jsarha marked this pull request as draft September 11, 2026 07:47
@jsarha
jsarha force-pushed the debug_stream_reader_fix branch from eb1004a to a3fdd1d Compare September 11, 2026 07:57
The packed structs need extra definitions in python 3.14.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
@jsarha
jsarha force-pushed the debug_stream_reader_fix branch from a3fdd1d to 8e4dcb5 Compare September 11, 2026 09:56
@jsarha

jsarha commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

This PR silences a warning on python-3.14, but unfortunately it did not help to get debug_stream working on NVL. Anyway I have tested that this still works on PTL and python-3.12.

@jsarha
jsarha marked this pull request as ready for review September 11, 2026 11:23
@intel-sofci

Copy link
Copy Markdown

PR 11188: test results

Run date: 2026-09-11 14:18 UTC

Tested commit: 8e4dcb5862a38606bd15a5918135a795acd6f24b

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

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