Skip to content

add wgpu support - #28

Merged
illuzen merged 72 commits into
mainfrom
illuzen/gpu
Dec 19, 2025
Merged

illuzen merged 72 commits into
mainfrom
illuzen/gpu

Conversation

@illuzen

@illuzen illuzen commented Dec 11, 2025

Copy link
Copy Markdown
Contributor
  • various cleanup and refactor of miner structure
  • remove unused engines
  • add wgpu support, using wgsl to implement poseidon2

I don't recommend reading all the commits, it was quite tedious with many retracements. One design decision is that we encode felts (Goldilocks field elements) as a pair of u32 since native wgsl does not support u64. There is an extension we can turn on but it will exclude certain gpu models if we use it, so we use u32 instead so we can try supporting android miners.


println!("\nAll tests completed!");

// generate_correct_wgsl_constants();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this commented code needed here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes if we want to later check that they were copied correctly

@n13 n13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested and ran this, LGTM!

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