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

Optimize Metal MSM Implementation for Enhanced GPU Utilization #1

Open
vivianjeng opened this issue Jul 2, 2024 · 2 comments
Open

Comments

@vivianjeng
Copy link
Contributor

Problem

copied from zkmopro/mopro#153

The current implementation of Metal MSM leverages GPU resources only partially, leading to suboptimal performance. To fully exploit GPU capabilities, we need to optimize the MSM process by addressing identified overheads and implementing enhancements.

Details

Current Implementation

The Metal MSM implementation currently derives from Lambdawork's metal backend and Arkworks' MSM implementation. Metal is used only for the MSM accumulation phase on the GPU, while other phases run on the CPU. This partial GPU utilization limits potential performance gains.

Identified Overheads

  1. Parsing points and scalars for GPU computation.
  2. Converting GPU-calculated buckets back to Arkworks-compatible types.

Optimization Goals

  1. Full GPU Implementation: Implement the entire MSM process on the GPU to reduce data conversion overhead by only parsing the final MSM result back to Arkworks-compatible types.
  2. Initialization Speed: Accelerate the initialization of points and scalars for GPU computation.
  3. Advanced Techniques: Apply optimization techniques such as precomputation of points.

By addressing these areas, we aim to significantly enhance MSM computation speed using Metal.

Acceptance Criteria

  1. The entire MSM process is implemented on the GPU, minimizing data conversion overhead.
  2. Initialization of points and scalars for GPU computation is significantly faster.
  3. The final implementation is compatible with Arkworks and passes all relevant tests.
@mahmudsudo
Copy link

can i take on this issue ?

@vivianjeng
Copy link
Contributor Author

@mahmudsudo Thank you for showing your interest.
@moven0831 and @FoodChain1028 have already taken this issue and implemented them.
If you are looking for collaboration, please join the tg group: https://t.me/zkmopro
We can talk more about this.

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

No branches or pull requests

2 participants