Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

-
- Minor tweak display for device name in TUI by [@XuehaiPan](https://github.com/XuehaiPan).

### Fixed

-
- Fix snapshot cache for GPU processes with shared host process by [@XuehaiPan](https://github.com/XuehaiPan) in [#172](https://github.com/XuehaiPan/nvitop/pull/172).

### Removed

Expand Down
3 changes: 2 additions & 1 deletion nvitop/api/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,8 @@ def as_snapshot(
snapshots with :meth:`GpuProcess.take_snapshots`, which caches the results and reduces
redundant queries. See also :meth:`take_snapshots` and :meth:`failsafe`.
"""
host_process_snapshot_cache = host_process_snapshot_cache or {}
if host_process_snapshot_cache is None:
host_process_snapshot_cache = {}
try:
host_snapshot = host_process_snapshot_cache[self.pid]
except KeyError:
Expand Down