Skip to content

feat: Memory access instrumentation #1371

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 4 commits into from

Conversation

stephenh-axiom-xyz
Copy link
Contributor

Collect and emit memory-related metrics for analysis.

  • Emits number of reads and writes per opcode
  • TODO: Visualize gaps in memory due to alignment issues

@stephenh-axiom-xyz stephenh-axiom-xyz added the run-benchmark triggers benchmark workflows on the pr label Feb 15, 2025

This comment has been minimized.

This comment has been minimized.

Copy link

group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair (-23 [-1.7%]) 1,333 143,584 8,290,183 - - -
fibonacci_program (-5 [-0.1%]) 4,888 1,500,095 51,485,080 (-8 [-0.2%]) 3,772 615,387 33,541,339
regex_program (+120 [+0.9%]) 13,845 1,914,103 165,455,373 (-415 [-2.6%]) 15,660 2,056,397 154,574,149
ecrecover_program (-5 [-0.2%]) 2,470 284,567 15,055,723 (-402 [-3.6%]) 10,897 1,603,960 117,320,460

Commit: 67e665c

Benchmark Workflow

@@ -28,6 +28,8 @@ pub struct VmMetrics {
#[allow(dead_code)]
pub(crate) current_fn: FnBound,
pub(crate) current_trace_cells: Vec<usize>,
// Maps opcode to number of (instances, reads, writes)
pub opcode_mem_accesses: BTreeMap<String, (usize, usize, usize)>,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think what we likely care more about is where these reads and write are located (which addresses), and what their alignment and block sizes look like.

@jonathanpwang
Copy link
Contributor

closing to be revisited later

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
run-benchmark triggers benchmark workflows on the pr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants