mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-21 06:45:24 -06:00
fix(cli): fix GPU process type filtering
Signed-off-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
This commit is contained in:
parent
a019b2a718
commit
20f33ecb75
1 changed files with 4 additions and 4 deletions
|
|
@ -315,13 +315,13 @@ def main(): # pylint: disable=too-many-branches,too-many-statements,too-many-lo
|
|||
|
||||
filters = []
|
||||
if args.compute:
|
||||
filters.append(lambda process: 'C' in process.type)
|
||||
filters.append(lambda process: 'C' in process.type or 'X' in process.type)
|
||||
if args.no_compute:
|
||||
filters.append(lambda process: 'C' not in process.type)
|
||||
filters.append(lambda process: 'C' not in process.type and 'X' not in process.type)
|
||||
if args.graphics:
|
||||
filters.append(lambda process: 'G' in process.type)
|
||||
filters.append(lambda process: 'G' in process.type or 'X' in process.type)
|
||||
if args.no_graphics:
|
||||
filters.append(lambda process: 'G' not in process.type)
|
||||
filters.append(lambda process: 'G' not in process.type and 'X' not in process.type)
|
||||
if args.user is not None:
|
||||
users = set(args.user)
|
||||
filters.append(lambda process: process.username in users)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue