Skip to content

docs(args): fix stale cap literals missed by #1056#1064

Merged
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
ChaoZheng109:fix-arg-cap-stale-strings
Jun 18, 2026
Merged

docs(args): fix stale cap literals missed by #1056#1064
ChaoZheng109 merged 1 commit into
hw-native-sys:mainfrom
ChaoZheng109:fix-arg-cap-stale-strings

Conversation

@ChaoZheng109

@ChaoZheng109 ChaoZheng109 commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

What

Fixes two stale cap literals left behind by #1056 (which raised
CORE_MAX_TENSOR_ARGS 16→32 and lowered CORE_MAX_SCALAR_ARGS 32→16).
#1056 updated the scalar-limit error strings but missed:

  • pto_types.h (a2a3 + a5): the tensor-limit error string still read
    "exceeds MAX_TENSOR_ARGS=16". The cap is now 32 — a user who hits
    the tensor-arg cap would otherwise get a misleading message.
  • pto_runtime2_types.h (a2a3 + a5): the PTO2TaskPayload::init
    memcpy comment said "Both arrays are 1024B" (dates from an old
    128-scalar cap). The scalar arrays are now MAX_SCALAR_ARGS * 8 =
    128B.

Comment/string only — no ABI or behavior change.

⚠️ Stacked on #1056

These literals are only correct on top of #1056's cap change. On
main, CORE_MAX_TENSOR_ARGS is still 16 and the scalar arrays are 256B,
so the current text is correct there. This branch is stacked on #1056:

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ff0bf71c-c912-4b84-9198-bbd83b1477ed

📥 Commits

Reviewing files that changed from the base of the PR and between e549000 and 1795a8e.

📒 Files selected for processing (4)
  • src/a2a3/runtime/tensormap_and_ringbuffer/runtime/pto_runtime2_types.h
  • src/a2a3/runtime/tensormap_and_ringbuffer/runtime/pto_types.h
  • src/a5/runtime/tensormap_and_ringbuffer/runtime/pto_runtime2_types.h
  • src/a5/runtime/tensormap_and_ringbuffer/runtime/pto_types.h

📝 Walkthrough

Walkthrough

Four single-line fixes across two pairs of mirrored header files in the a2a3 and a5 runtime paths: the cache-line rounding comment in PTO2TaskPayload::init is corrected from 1024B to 128B, and the set_error string for exceeding tensor argument limits is updated from MAX_TENSOR_ARGS=16 to MAX_TENSOR_ARGS=32. No executable logic, data layout, or public declarations are changed.

Changes

Comment and Error String Corrections

Layer / File(s) Summary
Cache-line comment correction
src/a2a3/runtime/tensormap_and_ringbuffer/runtime/pto_runtime2_types.h, src/a5/runtime/tensormap_and_ringbuffer/runtime/pto_runtime2_types.h
The inline comment in PTO2TaskPayload::init describing tensor/scalar array sizes for cache-line rounding is corrected from 1024B to 128B in both the a2a3 and a5 copies.
MAX_TENSOR_ARGS error string correction
src/a2a3/runtime/tensormap_and_ringbuffer/runtime/pto_types.h, src/a5/runtime/tensormap_and_ringbuffer/runtime/pto_types.h
The set_error message reporting the tensor argument limit is updated from MAX_TENSOR_ARGS=16 to MAX_TENSOR_ARGS=32 in both the a2a3 and a5 copies.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • hw-native-sys/simpler#1056: Updates PTO2TaskPayload cache-line layout with static_assert changes tightening tensor/scalar region sizing to 128B, directly establishing the correct value this PR now documents in comments.

Poem

🐇 A comment once said "one-oh-two-four bytes wide,"
But the truth was one-twenty-eight, it lied!
And sixteen for tensor args? No, thirty-two's right,
So I hopped through the headers and set them aright.
Now the docs match the code—what a glorious sight! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the changeset: fixing stale documentation literals (cap values in comments and error strings) that were missed in a previous change.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining what stale literals were fixed, why they matter, and their impact.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

hw-native-sys#1056 raised CORE_MAX_TENSOR_ARGS to 32 and lowered CORE_MAX_SCALAR_ARGS
to 16. It updated the scalar-limit error strings but left two stale
literals behind:

- pto_types.h: the tensor-limit error string still read
  "exceeds MAX_TENSOR_ARGS=16"; the cap is now 32 (a2a3 + a5).
- pto_runtime2_types.h: the PTO2TaskPayload::init memcpy comment said
  "Both arrays are 1024B" (dates from a 128-scalar cap). The scalar
  arrays are now MAX_SCALAR_ARGS * 8 = 128B (a2a3 + a5).

Comment/string only; no ABI or behavior change.
@ChaoZheng109 ChaoZheng109 force-pushed the fix-arg-cap-stale-strings branch from d03deca to 1795a8e Compare June 18, 2026 09:08
@ChaoZheng109 ChaoZheng109 merged commit 1e43649 into hw-native-sys:main Jun 18, 2026
16 checks passed
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.

1 participant