Created
June 7, 2023 05:09
-
-
Save asuna/1c92bb69e8b1556afefed4e506ec1313 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM Get the list of GPU devices | |
for /f "skip=1 tokens=1" %%i in ('nvidia-smi --query-gpu=index --format=csv,noheader,nounits') do ( | |
set GPU_INDEX=%%i | |
echo Setting GPU !GPU_INDEX! to TCC mode | |
nvidia-smi --id=!GPU_INDEX! --compute-mode=exclusive_process | |
) | |
echo All GPUs have been set to TCC mode | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment