Skip to content

Conversation

@yinghai
Copy link
Contributor

@yinghai yinghai commented Aug 17, 2018

Summary: onnxTensorDescriptorV1.name points to the string buffer. We use a vector of strings to serve as the storage. This means we cannot reallocate the vector because that may invalidate the onnxTensorDescriptorV1.name pointers. Solution is to reserve a large enough vector so that it won't reallocate.

Differential Revision: D9381838

Copy link
Contributor

@bddppq bddppq left a comment

Choose a reason for hiding this comment

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

Mind adding a comment?

Summary:
Pull Request resolved: pytorch#10630

`onnxTensorDescriptorV1.name` points to the string buffer. We use a vector of strings to serve as the storage. This means we cannot reallocate the vector because that may invalidate the `onnxTensorDescriptorV1.name` pointers. Solution is to reserve a large enough vector so that it won't reallocate.

Differential Revision: D9381838

fbshipit-source-id: 059f4e947e23d5ef36577ab6ab6a32e3e0042b62
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.

3 participants