Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

DYN: don't issue a hash request #1523

Open
plafer opened this issue Oct 1, 2024 · 4 comments
Open

DYN: don't issue a hash request #1523

plafer opened this issue Oct 1, 2024 · 4 comments
Labels
enhancement New feature or request processor Related to Miden VM processor

Comments

@plafer
Copy link
Contributor

plafer commented Oct 1, 2024

Originally posted by @plafer in #1516 (comment)

It seems like DYN could not issue any hash request, and also not have an associated END, since we're only hashing dummy values? So DYN would still populate the block hash table, but have no other effect on the trace.

@plafer plafer added enhancement New feature or request processor Related to Miden VM processor labels Oct 1, 2024
@bobbinth
Copy link
Contributor

bobbinth commented Oct 1, 2024

To clarify, is the issue here that we could optimize things a bit more by not filling the hasher chiplet with rows to compute hash of of zeros?

@plafer
Copy link
Contributor Author

plafer commented Oct 15, 2024

Exactly. We will basically save 8 hasher chiplet rows per DYN (and 1 main trace row from not having a corresponding END)

@plafer
Copy link
Contributor Author

plafer commented Oct 15, 2024

Also, I believe DYN could be made an operation that is included in basic blocks then?

In #1091, we need the decoder helper registers to save the word loaded from memory (for the chiplets bus and block hash table). However, technically, since DYN is currently a control block, we shouldn't be using its helper registers.

@bobbinth
Copy link
Contributor

Exactly. We will basically save 8 hasher chiplet rows per DYN (and 1 main trace row from not having a corresponding END)

Makes sense. One other thing we can try to do in the future is to use multiplicities somehow in the hasher chiplet so that we would not need to have a trace for computing the same hash more than once.

I believe DYN could be made an operation that is included in basic blocks then?

This would be tricky as basic blocks don't have children and DYN could invoke an arbitrary block (e..g, a JOIN block). So, we'd need to end the current basic block, then execute the dynamic block, and then execute the rest basic block - but this would be basically the same thing as having DYN be its own node (i.e., not in basic block).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request processor Related to Miden VM processor
Projects
None yet
Development

No branches or pull requests

2 participants