From 1320d3a8339b371034aa66dfe3493d4728095a7a Mon Sep 17 00:00:00 2001 From: patientx Date: Sun, 10 Aug 2025 22:13:59 +0300 Subject: [PATCH] Update install-n.bat --- install-n.bat | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/install-n.bat b/install-n.bat index b0b520995..16bf851c7 100644 --- a/install-n.bat +++ b/install-n.bat @@ -38,11 +38,15 @@ pip uninstall numpy -y --quiet pip install numpy==1.26.4 --quiet echo :: %time:~0,8% :: - Detecting Python version and installing appropriate triton package -for /f "tokens=2 delims=." %%a in ('python -c "import sys; print(sys.version)"') do ( - set "PY_MINOR=%%a" + +for /f "tokens=1,2 delims=." %%a in ('python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"') do ( + set "PY_MAJOR=%%a" + set "PY_MINOR=%%b" goto :version_detected ) + :version_detected +echo :: %time:~0,8% :: - Detected Python %PY_MAJOR%.%PY_MINOR% if "%PY_MINOR%"=="12" ( echo :: %time:~0,8% :: - Python 3.12 detected, installing triton for 3.12 @@ -52,8 +56,8 @@ if "%PY_MINOR%"=="12" ( pip install --force-reinstall https://github.com/lshqqytiger/triton/releases/download/a9c80202/triton-3.4.0+gita9c80202-cp311-cp311-win_amd64.whl ) else ( echo :: %time:~0,8% :: - WARNING: Unsupported Python version 3.%PY_MINOR%, skipping triton installation - echo :: %time:~0,8% :: - Full version string: - python -c "import sys; print(sys.version)" + echo :: %time:~0,8% :: - Full version info: + python -c "import sys; print(f'Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}')" ) :: patching triton & torch (from sfinktah ; https://github.com/sfinktah/amd-torch ) @@ -139,3 +143,4 @@ set MIOPEN_LOG_LEVEL=3 .\zluda\zluda.exe -- python main.py --auto-launch --use-quad-cross-attention +