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

[Cherry-pick][release/v2.12] Update set model from buffer api #10044

Conversation

shentanyue
Copy link
Collaborator

PR devices

Framework

PR types

Others

PR changes

API

Description

之前的 set_model_from_buffer 内部存储会使用 std::string 数据结构,会将传入的 buffer 再拷贝构造一份,造成内存上的重复消耗。
目前改为 const char* 进行数据传递,buffer 的内存释放由用户侧管理。

@paddle-bot
Copy link

paddle-bot bot commented Feb 28, 2023

Thanks for your contribution!

@shentanyue shentanyue changed the title [release/v2.12] Update set model from buffer api [Cherry-pick][release/v2.12] Update set model from buffer api Mar 1, 2023
Copy link
Collaborator

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

@shentanyue shentanyue merged commit 899ab48 into PaddlePaddle:release/v2.12 Mar 1, 2023
@shentanyue shentanyue deleted the update_set_model_from_buffer_api_2_12 branch March 1, 2023 03:01
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