[Performance Optimization] Add fast md5sum #78602
Open
ForFishes wants to merge 3 commits intoPaddlePaddle:developfrom
Open
[Performance Optimization] Add fast md5sum #78602ForFishes wants to merge 3 commits intoPaddlePaddle:developfrom
ForFishes wants to merge 3 commits intoPaddlePaddle:developfrom
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
sneaxiy
reviewed
Apr 8, 2026
paddle/utils/md5_gpu.cu
Outdated
| unsigned char h_result[16]; | ||
| cudaMemcpyAsync(h_result, d_result, 16, cudaMemcpyDeviceToHost, cuda_stream); | ||
| cudaStreamSynchronize(cuda_stream); | ||
| cudaFree(d_result); |
Collaborator
There was a problem hiding this comment.
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); |
Collaborator
There was a problem hiding this comment.
Can we implement md5_cpu so that we can use this API in other hardwares?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
Performance Optimization
PR Types
New features
Description
[Distributed] Add fast md5sum
是否引起精度变化
否