@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / dc96fd54c6
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 14:45 UTC

[Misc] Avoid stripping meaningful whitespace from `nvidia-smi topo -m` output in collect_env.py (#16272)

Signed-off-by: imkero <kerorek@outlook.com>

Kero Liang committed Apr 9, 2025 at 00:08 UTC dc96fd54c689991ead97da6e2e8718e96f00faaa
1 file changed +7 -1
collect_env.py
+7 -1
@@ -105,8 +105,14 @@ def run(command):
105 else:
106 enc = locale.getpreferredencoding()
107 output = raw_output.decode(enc)
108 + if command == 'nvidia-smi topo -m':
109 + # don't remove the leading whitespace of `nvidia-smi topo -m`
110 + # because they are meaningful
111 + output = output.rstrip()
112 + else:
113 + output = output.strip()
114 err = raw_err.decode(enc)
109 - return rc, output.strip(), err.strip()
115 + return rc, output, err.strip()
116
117
118 def run_and_read_all(run_lambda, command):