Skip to content

Conversation

@hawkadrian
Copy link

Describe your changes

Adds snapshot tests using insta to document computed values of trace layout constants.

  • Documents all trace widths and offsets
  • Documents column ranges for all chiplets
  • Specifically documents capacity portion of RPO inside hasher chiplet
  • Creates 10 snapshot files that serve as reference documentation

Resolves #2221

@huitseeker huitseeker requested a review from adr1anh November 10, 2025 05:31
- Eval operation index: 5
- ID 0 index: 6
- ID 1 index: 9
- ID 2 index: 12
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be a bit clearer if we ordered the columns by index, to show the overlap depending on the current block.

Other Constants:
Number of columns: 16
ACE init label: 8
Instruction ID1 offset: 1073741824
Copy link
Contributor

Choose a reason for hiding this comment

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

This is just a power of 2, not sure it's necessary.

Bitwise Chiplet:
Trace offset: 53
Selector index: 53
Input A range: 56..60
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we reporting this here as well as in the Bitwise trace snapshot? We should either put all the info here, or in the individual chiplet snapshots. The same applies to the other chiplets.

Column Indices:
- In span column: 16
- Group count column: 17
- Operation index column: 18
Copy link
Contributor

Choose a reason for hiding this comment

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

Order these by index, and maybe format with the index before the label

Capacity length: 4
Capacity column range: 55..59
Capacity domain index: 1
Note: The capacity portion contains the first 4 elements of the
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment doesn't seem necessary


Other Constants:
Trace width: 5
Kernel procedure call label: 16
Copy link
Contributor

Choose a reason for hiding this comment

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

Format in binary in the same way it's defined by the constant

Trace offset: 54

Column Indices:
- Is read column: 54
Copy link
Contributor

Choose a reason for hiding this comment

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

Order by index

Value column range: 61..65

Other Constants:
Trace width: 15
Copy link
Contributor

Choose a reason for hiding this comment

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

Move up to first section

Comment on lines 24 to 25

Value Columns:
Copy link
Contributor

Choose a reason for hiding this comment

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

Value are columns so remove the separation

@huitseeker huitseeker requested a review from adr1anh December 16, 2025 17:07
@bobbinth
Copy link
Contributor

bobbinth commented Jan 4, 2026

@hawkadrian, @adr1anh - is this PR still relevant?

@hawkadrian
Copy link
Author

@hawkadrian, @adr1anh - is this PR still relevant?

yes it is, will fix conflicts soon

@huitseeker
Copy link
Contributor

@hawkadrian once you're done with your rebase, please comment on #2495 so we can assign you

@hawkadrian hawkadrian force-pushed the feat/document-trace-constants-with-insta branch from b9eed2f to 1f0bd35 Compare January 10, 2026 22:31
@hawkadrian
Copy link
Author

I did rebase. In theory everything should work like a clockwok now

@adr1anh
Copy link
Contributor

adr1anh commented Jan 11, 2026

Thanks for rebasing. It seems like the ci tests are still failing. We use make lint to check that the code compiles, and you can iterate with make test until everything passes.

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.

Document values of constants using insta

4 participants