Skip to content

Commit

Permalink
Fix find command on Windows with full path (#1281)
Browse files Browse the repository at this point in the history
Co-authored-by: chen, suyue <[email protected]>
(cherry picked from commit 0ecff3c)
  • Loading branch information
Spycsh authored and chensuyue committed Sep 27, 2023
1 parent 49e950e commit 46ff865
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neural_compressor/utils/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def get_number_of_sockets(self) -> int:
"""Get number of sockets in platform."""
cmd = "lscpu | grep 'Socket(s)' | cut -d ':' -f 2"
if psutil.WINDOWS:
cmd = 'wmic cpu get DeviceID | find /c "CPU"'
cmd = r'wmic cpu get DeviceID | C:\Windows\System32\find.exe /C "CPU"'

with subprocess.Popen(
args=cmd,
Expand Down

0 comments on commit 46ff865

Please sign in to comment.