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

Test Merkle-tree padding for all device #668

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yshekel
Copy link
Collaborator

@yshekel yshekel commented Nov 28, 2024

cuda-backend-branch: emir/merkle-padding


const unsigned nof_leaves_in_hash = layer0_hash.default_input_chunk_size() / leaf_size;

ICICLE_LOG_VERBOSE << "19 hashes (Total hashes in layer 0 - 1) - full";
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove the 19 here? the changes made in the tree above now yield 100 hashes in the lowest level instead of the previous 20.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I refined the tests. Seems like there is a lot of redundancy


const unsigned nof_leaves_in_hash = layer0_hash.default_input_chunk_size() / leaf_size;

ICICLE_LOG_VERBOSE << "19 hashes (Total hashes in layer 0 - 1) - full";
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here - remove 19 and keep the text in the parenthesis.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

same

int output_store_min_layer = 0;
constexpr int leaf_size = 250;
constexpr int nof_leaves = 100;
const std::vector<int> test_cases_nof_input_leaves = {1, 8, 32,
Copy link
Contributor

Choose a reason for hiding this comment

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

Add 16 and 17 (or just add 33) to test edge cases in the CPU given the chunk size of 16 when building the tree

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.

2 participants