8000 [MemoryZ] Show the current and max entries rendered (#153446) · pytorch/pytorch@316c152 · GitHub
[go: up one dir, main page]

Skip to content

Commit 316c152

Browse files
mzzchypytorchmergebot
authored andcommitted
[MemoryZ] Show the current and max entries rendered (#153446)
Summary: as title Test Plan: {F1977904091} Differential Revision: D74626081 Pull Request resolved: #153446 Approved by: https://github.com/sraikund16
1 parent c797f12 commit 316c152

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

torch/utils/viz/MemoryViz.js

Expand all lines: torch/utils/viz/MemoryViz.js
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,7 @@ function create_trace_view(
12281228
dst.selectAll('svg').remove();
12291229
dst.selectAll('div').remove();
12301230

1231+
max_entries = Math.min(max_entries, data.elements_length);
12311232
const d = dst.append('div');
12321233
d.append('input')
12331234
.attr('type', 'range')
@@ -1237,7 +1238,9 @@ function create_trace_view(
12371238
.on('change', function () {
12381239
create_trace_view(dst, snapshot, device, plot_segments, this.value);
12391240
});
1240-
d.append('label').text('Detail');
1241+
d.append('label').text(
1242+
`Detail: ${max_entries} of ${data.elements_length} entries`,
1243+
);
12411244

12421245
const grid_container = dst
12431246
.append('div')

0 commit comments

Comments
 (0)
0