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

Share const tensor in graph #574

Merged
merged 1 commit into from
Apr 19, 2023
Merged

Share const tensor in graph #574

merged 1 commit into from
Apr 19, 2023

Conversation

chxin66
Copy link
Contributor

@chxin66 chxin66 commented Apr 11, 2023

Tensor with same md5 will be created once and shared

Type: New feature

@chxin66 chxin66 force-pushed the md5 branch 10 times, most recently from 47b3587 to b7f4bd4 Compare April 12, 2023 07:03
Copy link
Contributor

@sunshinemyson sunshinemyson left a comment

Choose a reason for hiding this comment

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

This feature is not about MD5SUM itself, it is about share tensor cross create tensor calls.
Refine commit message: summary should explain the feature not the approach.

refine you compile flag according to feature.

@chxin66 chxin66 force-pushed the md5 branch 6 times, most recently from 92b3eb3 to b873cd0 Compare April 12, 2023 09:44
@sunshinemyson sunshinemyson changed the title Check md5sum for const tensor Share const tensor in graph Apr 15, 2023
@chxin66 chxin66 force-pushed the md5 branch 3 times, most recently from 723b6d6 to 0449485 Compare April 18, 2023 06:17
Copy link
Contributor

@sunshinemyson sunshinemyson left a comment

Choose a reason for hiding this comment

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

fix the variable name

Tensor can be shared between different operations, if tensor have
identical data and quantization parameter, they should share same
low-level tensor object to save memory.

In tim-vx, introduce a tensor cache which key is md5sum and value is
low-level tensor object. If up-coming tensor have same md5sum, the
cached tensor object reused for tensor creation.

Type: New feature

Signed-off-by: Chen Xin <[email protected]>
@sunshinemyson sunshinemyson merged commit f1fd224 into VeriSilicon:main Apr 19, 2023
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