From 3a88acd2ee2fa46ac34da755fa49b7193e17a525 Mon Sep 17 00:00:00 2001 From: Zhou Wei <52485244+zhouwei25@users.noreply.github.com> Date: Thu, 19 Nov 2020 20:55:52 +0800 Subject: [PATCH] open unittests on windows (#28750) --- paddle/scripts/paddle_build.bat | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/paddle/scripts/paddle_build.bat b/paddle/scripts/paddle_build.bat index ff5562a250..b22221adf0 100644 --- a/paddle/scripts/paddle_build.bat +++ b/paddle/scripts/paddle_build.bat @@ -152,6 +152,7 @@ rem ------initialize cmake variable for mkl------ set WITH_MKL=ON set WITH_GPU=OFF set MSVC_STATIC_CRT=ON +set WITH_CLCACHE=OFF call :cmake || goto cmake_error call :build || goto build_error @@ -265,7 +266,7 @@ echo Build third_party successfully! set build_times=1 :build_paddle echo Build Paddle the %build_times% time: -if "%WITH_GPU%"=="OFF" ( +if "%WITH_CLCACHE%"=="OFF" ( msbuild /m:%PARALLEL_PROJECT_COUNT% /p:Configuration=Release /verbosity:minimal paddle.sln ) else ( msbuild /m:%PARALLEL_PROJECT_COUNT% /p:TrackFileAccess=false /p:CLToolExe=clcache.exe /p:CLToolPath=%PYTHON_ROOT%\Scripts /p:Configuration=Release /verbosity:minimal paddle.sln @@ -339,7 +340,7 @@ exit /b 1 rem --------------------------------------------------------------------------------------------- :unit_test -@ECHO OFF +@ECHO ON echo ======================================== echo Step 4. Running unit tests ... echo ======================================== @@ -383,14 +384,14 @@ if "%WITH_GPU%"=="ON" ( :parallel_test_base_gpu echo ======================================== -echo Running GPU unit tests in parallel way ... +echo Running GPU unit tests... echo ======================================== set FLAGS_fraction_of_gpu_memory_to_use=0.75 - -nvidia-smi -L -for /F %%# in ('nvidia-smi -L ^| findstr "GPU" /C /I') do set CUDA_DEVICE_COUNT=%%# -if !errorlevel! NEQ 0 exit /b 8 +set PATH=C:\Program Files\NVIDIA Corporation\NVSMI;%PATH% +cmd /C nvidia-smi -L +if %errorlevel% NEQ 0 exit /b 8 +for /F %%# in ('cmd /C nvidia-smi -L ^|find "GPU" /C') do set CUDA_DEVICE_COUNT=%%# rem TODO: fix these unittest that is bound to fail rem /*==================Disabled Windows==============================*/ -- GitLab