Skip to content

tf.profile should also return byte usage as observed by the texture manager #722

Open
@annxingyuan

Description

@annxingyuan

The TextureManager keeps track of the status of each texture, and therefore has a truer record of byte usage than the engine, because even though we call dispose on tensors, they might still be sitting around, which means the real memory footprint could be larger than what the engine thinks. We should surface the TextureManager's record of byte usage in tf.profile.

Since this refers to the number of bytes allocated physically for webgl use, it should be surfaced with a webgl prefix, e.g. like webglBytesUsed. This field should be produced by the backend and bubbled up in the engine.

Also, numBytes is wrong for packed ops - it should be based on texture shape not logical shape

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions