Skip to content

[Performance Optimization] Add fast md5sum #78602

Open
ForFishes wants to merge 3 commits intoPaddlePaddle:developfrom
ForFishes:fast_md5
Open

[Performance Optimization] Add fast md5sum #78602
ForFishes wants to merge 3 commits intoPaddlePaddle:developfrom
ForFishes:fast_md5

Conversation

@ForFishes
Copy link
Copy Markdown
Member

PR Category

Performance Optimization

PR Types

New features

Description

[Distributed] Add fast md5sum

是否引起精度变化

@paddle-bot
Copy link
Copy Markdown

paddle-bot bot commented Apr 8, 2026

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

unsigned char h_result[16];
cudaMemcpyAsync(h_result, d_result, 16, cudaMemcpyDeviceToHost, cuda_stream);
cudaStreamSynchronize(cuda_stream);
cudaFree(d_result);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please add PADDLE_ENFORCE_GPU_SUCCESS check for all CUDA APIs.

// Compute MD5 directly on GPU device memory.
// |data|: device pointer; |len|: byte count; |stream|: CUDA stream.
// Synchronizes stream before returning. Returns 32-char hex digest.
std::string md5_gpu(const void* data, size_t len, void* stream);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we implement md5_cpu so that we can use this API in other hardwares?

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