Skip to content

Constants are stored two times with JSON Runtime #7981

@echuraev

Description

@echuraev

Hello,

I faced the problem that the TVM export methods doesn’t strip original collection of constant tensor in case of usage external runtime like BNNS/ACL and others. First time we store constants in GraphRuntimeFactory when write it to the library and second time in MetadataModule. This leads to double size of final exported files and also increases memory footprint in runtime. In fact, it is enough to store constants only in MetadataModule, and we can strip the original constants. Maybe we could remove original constants from GraphRuntimeFactoryand store them only in MetadataModule?

On the screenshot you can see that the weights were load two times in runtime:
изображение

This problem can be critical for different mobile devices with limited size of RAM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions