Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 11 - Failled to built whisper.cpp for Nvidia cublas #1287

Closed
mirek190 opened this issue Sep 14, 2023 · 16 comments
Closed

Windows 11 - Failled to built whisper.cpp for Nvidia cublas #1287

mirek190 opened this issue Sep 14, 2023 · 16 comments
Assignees
Labels
question Further information is requested solution This issue contains a potential solution

Comments

@mirek190
Copy link

  • Installed and updated Visual studio 2022
  • Installed cuda_12.2.0_536.25_windows and later also cuda_12.2.2_537.13_windows
  • Installed cmake cmake-3.27.4-windows-x86_64

Getting errors ...

PS E:\AUDIO_AI\whisper.cpp> cmake . --fresh -DWHISPER_CUBLAS=ON
-- Building for: Visual Studio 17 2022
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is MSVC 19.37.32824.0
-- The CXX compiler identification is MSVC 19.37.32824.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.42.0.windows.2")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found CUDAToolkit: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/include (found version "12.2.91")
-- cuBLAS found
CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:753 (message):
  Compiling the CUDA compiler identification source file
  "CMakeCUDACompilerId.cu" failed.

  Compiler:

  Build flags:

  Id flags: --keep;--keep-dir;tmp -v



  The output was:

  1

  MSBuild version 17.7.2+d6990bcfa for .NET Framework

  Build started 14/09/2023 21:18:24.



  Project
  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  on node 1 (default targets).

  PrepareForBuild:

    Creating directory "Debug\".
    Creating directory "Debug\CompilerIdCUDA.tlog\".

  InitializeBuildStatus:

    Creating "Debug\CompilerIdCUDA.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
    Touching "Debug\CompilerIdCUDA.tlog\unsuccessfulbuild".

  AddCudaCompileDeps:

    C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64\cl.exe /E /nologo /showIncludes /TP /D__CUDACC__ /D__CUDACC_VER_MAJOR__=12 /D__CUDACC_VER_MINOR__=2 /D_MBCS /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin" /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" /I. /FIcuda_runtime.h /c E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CMakeCUDACompilerId.cu

  Project
  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (1) is building
  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (1:2) on node 1 (CudaBuildCore target(s)).

  CudaBuildCore:

    Compiling CUDA source file CMakeCUDACompilerId.cu...
    Creating directory "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\x64\Debug".

  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686: Unable to create Xaml task.
  Compilation failed.
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686: Source file
  'C:\windows\TEMP\ivmjs1ch.0.cs' could not be found
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686:
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB4175: The task factory "XamlTaskFactory"
  could not be loaded from the assembly "Microsoft.Build.Tasks.v4.0,
  Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".  Object
  reference not set to an instance of an object.
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  Done Building Project
  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (CudaBuildCore target(s)) -- FAILED.

  Done Building Project
  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (default targets) -- FAILED.



  Build FAILED.




  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (default target) (1) ->


  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (CudaBuildCore target) (1:2) ->

  (CudaBuildCore target) ->

    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 12.2.targets(799,9): error MSB3686: Unable to create Xaml task.  Compilation failed.   [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]

  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686: Source file
  'C:\windows\TEMP\ivmjs1ch.0.cs' could not be found
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686:
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 12.2.targets(799,9): error MSB4175: The task factory "XamlTaskFactory" could not be loaded from the assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Object reference not set to an instance of an object. [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]



      0 Warning(s)
      2 Error(s)



  Time Elapsed 00:00:00.82





Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
  C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:178 (enable_language)


-- Configuring incomplete, errors occurred!
PS E:\AUDIO_AI\whisper.cpp>

or

PS E:\AUDIO_AI\whisper.cpp> cmake -S E:\AUDIO_AI\whisper.cpp -B E:\AUDIO_AI\whisper.cpp\build -D WHISPER_CUBLAS=1
-- Building for: Visual Studio 17 2022
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is MSVC 19.37.32824.0
-- The CXX compiler identification is MSVC 19.37.32824.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.42.0.windows.2")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found CUDAToolkit: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/include (found version "12.2.91")
-- cuBLAS found
CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:753 (message):
  Compiling the CUDA compiler identification source file
  "CMakeCUDACompilerId.cu" failed.

  Compiler:

  Build flags:

  Id flags: --keep;--keep-dir;tmp -v



  The output was:

  1

  MSBuild version 17.7.2+d6990bcfa for .NET Framework

  Build started 14/09/2023 21:22:33.



  Project
  "E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  on node 1 (default targets).

  PrepareForBuild:

    Creating directory "Debug\".
    Creating directory "Debug\CompilerIdCUDA.tlog\".

  InitializeBuildStatus:

    Creating "Debug\CompilerIdCUDA.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
    Touching "Debug\CompilerIdCUDA.tlog\unsuccessfulbuild".

  AddCudaCompileDeps:

    C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64\cl.exe /E /nologo /showIncludes /TP /D__CUDACC__ /D__CUDACC_VER_MAJOR__=12 /D__CUDACC_VER_MINOR__=2 /D_MBCS /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin" /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" /I. /FIcuda_runtime.h /c E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CMakeCUDACompilerId.cu

  Project
  "E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (1) is building
  "E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (1:2) on node 1 (CudaBuildCore target(s)).

  CudaBuildCore:

    Compiling CUDA source file CMakeCUDACompilerId.cu...
    Creating directory "E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\x64\Debug".

  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686: Unable to create Xaml task.
  Compilation failed.
  [E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686: Source file
  'C:\windows\TEMP\sraifh4g.0.cs' could not be found
  [E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686:
  [E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB4175: The task factory "XamlTaskFactory"
  could not be loaded from the assembly "Microsoft.Build.Tasks.v4.0,
  Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".  Object
  reference not set to an instance of an object.
  [E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  Done Building Project
  "E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (CudaBuildCore target(s)) -- FAILED.

  Done Building Project
  "E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (default targets) -- FAILED.



  Build FAILED.




  "E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (default target) (1) ->


  "E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (CudaBuildCore target) (1:2) ->

  (CudaBuildCore target) ->

    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 12.2.targets(799,9): error MSB3686: Unable to create Xaml task.  Compilation failed.   [E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]

  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686: Source file
  'C:\windows\TEMP\sraifh4g.0.cs' could not be found
  [E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686:
  [E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 12.2.targets(799,9): error MSB4175: The task factory "XamlTaskFactory" could not be loaded from the assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Object reference not set to an instance of an object. [E:\AUDIO_AI\whisper.cpp\build\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]



      0 Warning(s)
      2 Error(s)



  Time Elapsed 00:00:00.83





Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
  C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:178 (enable_language)


-- Configuring incomplete, errors occurred!
PS E:\AUDIO_AI\whisper.cpp>

Any help please ....

@bobqianic
Copy link
Collaborator

According to some reports, adding -D CMAKE_CUDA_COMPILER=$(which nvcc) to cmake fixed this.

@bobqianic bobqianic added the question Further information is requested label Sep 15, 2023
@mirek190
Copy link
Author

mirek190 commented Sep 15, 2023

Adding your suggestion -D CMAKE_CUDA_COMPILER=$(which nvcc)

cmake . --fresh -DWHISPER_CUBLAS=ON -D CMAKE_CUDA_COMPILER="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe

or

cmake -S E:\AUDIO_AI\whisper.cpp -B E:\AUDIO_AI\whisper.cpp\build -D WHISPER_CUBLAS=1 -D CMAKE_CUDA_COMPILER="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe"

I am getting the seme errors like in the first post....

@bobqianic
Copy link
Collaborator

I am getting the seme errors like in the first post....

Oh, I noticed you're using Windows. In those reports I mentioned earlier, there's actually a solution specifically for Windows users.

set CUDATOOLKITDIR = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1

@mirek190
Copy link
Author

I used as you suggested

cmake . --fresh -DWHISPER_CUBLAS=ON -D CMAKE_CUDA_COMPILER="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe" -D CUDATOOLKITDIR="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2" 

Still the same errors like in the first post.

PS E:\AUDIO_AI\whisper.cpp> cmake . --fresh -DWHISPER_CUBLAS=ON -D CMAKE_CUDA_COMPILER="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe" -D CUDATOOLKITDIR="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2"
-- Building for: Visual Studio 17 2022
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is MSVC 19.37.32824.0
-- The CXX compiler identification is MSVC 19.37.32824.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.42.0.windows.2")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found CUDAToolkit: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/include (found version "12.2.91")
-- cuBLAS found
CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:753 (message):
  Compiling the CUDA compiler identification source file
  "CMakeCUDACompilerId.cu" failed.

  Compiler: C:\Program Files\NVIDIA GPU Computing
  Toolkit\CUDA\v12.2\bin\nvcc.exe

  Build flags:

  Id flags: --keep;--keep-dir;tmp -v



  The output was:

  1

  MSBuild version 17.7.2+d6990bcfa for .NET Framework

  Build started 16/09/2023 16:36:58.



  Project
  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  on node 1 (default targets).

  PrepareForBuild:

    Creating directory "Debug\".
    Creating directory "Debug\CompilerIdCUDA.tlog\".

  InitializeBuildStatus:

    Creating "Debug\CompilerIdCUDA.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
    Touching "Debug\CompilerIdCUDA.tlog\unsuccessfulbuild".

  AddCudaCompileDeps:

    C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64\cl.exe /E /nologo /showIncludes /TP /D__CUDACC__ /D__CUDACC_VER_MAJOR__=12 /D__CUDACC_VER_MINOR__=2 /D_MBCS /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin" /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" /I. /FIcuda_runtime.h /c E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CMakeCUDACompilerId.cu

  Project
  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (1) is building
  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (1:2) on node 1 (CudaBuildCore target(s)).

  CudaBuildCore:

    Compiling CUDA source file CMakeCUDACompilerId.cu...
    Creating directory "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\x64\Debug".

  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686: Unable to create Xaml task.
  Compilation failed.
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686: Source file
  'C:\windows\TEMP\ux0cosmt.0.cs' could not be found
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686:
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB4175: The task factory "XamlTaskFactory"
  could not be loaded from the assembly "Microsoft.Build.Tasks.v4.0,
  Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".  Object
  reference not set to an instance of an object.
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  Done Building Project
  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (CudaBuildCore target(s)) -- FAILED.

  Done Building Project
  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (default targets) -- FAILED.



  Build FAILED.




  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (default target) (1) ->


  "E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
  (CudaBuildCore target) (1:2) ->

  (CudaBuildCore target) ->

    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 12.2.targets(799,9): error MSB3686: Unable to create Xaml task.  Compilation failed.   [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]

  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686: Source file
  'C:\windows\TEMP\ux0cosmt.0.cs' could not be found
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


  C:\Program Files\Microsoft Visual
  Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
  12.2.targets(799,9): error MSB3686:
  [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]


    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 12.2.targets(799,9): error MSB4175: The task factory "XamlTaskFactory" could not be loaded from the assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Object reference not set to an instance of an object. [E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj]



      0 Warning(s)
      2 Error(s)



  Time Elapsed 00:00:00.35





Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
  C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:178 (enable_language)


-- Configuring incomplete, errors occurred!
PS E:\AUDIO_AI\whisper.cpp>

errors

CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:753 (message):
Compiling the CUDA compiler identification source file
"CMakeCUDACompilerId.cu" failed.

Done Building Project
"E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
(CudaBuildCore target(s)) -- FAILED.

Done Building Project
"E:\AUDIO_AI\whisper.cpp\CMakeFiles\3.27.4\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
(default targets) -- FAILED.

@bobqianic bobqianic added the help wanted Extra attention is needed label Sep 16, 2023
@mirek190
Copy link
Author

any idea how to fix it?

@bobqianic
Copy link
Collaborator

any idea how to fix it?

No, I've labeled this issue as help wanted. I've tried, but I can't reproduce this issue on my Windows 11 machine. It makes me think the problem might be due to a specific configuration error on your end. Maybe try reinstalling the CUDA toolkit and Visual Studio? It's worth a shot.

@mirek190
Copy link
Author

what cuda toolkit version you are using and Visual studio community?

I was trying cuda toolkit 12.2 and 12.2.

@mirek190
Copy link
Author

any idea how to fix it?

No, I've labeled this issue as help wanted. I've tried, but I can't reproduce this issue on my Windows 11 machine. It makes me think the problem might be due to a specific configuration error on your end. Maybe try reinstalling the CUDA toolkit and Visual Studio? It's worth a shot.

Sooo If you can built for Nvidia with success can you provide me redy binary please?

@mirek190
Copy link
Author

...I give up ....

I tried everything .

Someone built whisper with cubas on windows with success?

@bobqianic bobqianic self-assigned this Sep 21, 2023
@mirek190
Copy link
Author

I assume anyone succeeded ....

@arithy
Copy link

arithy commented Sep 23, 2023

This issue can be caused by too long a value in the environment variable PATH.
In my case, it was resolved by removing unnecessary entries from PATH.

@mirek190
Copy link
Author

mirek190 commented Sep 26, 2023

Hello

I finally fixed it!
It seems my Windows 11 system variables paths were corrupted ....
I reinstalled win 11 with option "keep installed applications and user files "

Now with VS 2022 , Cuda toolkit 11.6.1 and cmake ...
I can compile the version with cuda !
first downloaded repo and then :

mkdir build
cmake.exe -B build -D WHISPER_CUBLAS=1
cmake.exe --build build --config release

WORKS!

@bobqianic
Copy link
Collaborator

I finally fixed it!

Great!

@bobqianic bobqianic added solution This issue contains a potential solution and removed help wanted Extra attention is needed labels Sep 27, 2023
@bobqianic bobqianic linked a pull request Oct 20, 2023 that will close this issue
4 tasks
@bobqianic bobqianic removed a link to a pull request Oct 20, 2023
4 tasks
@thewh1teagle
Copy link
Contributor

thewh1teagle commented Jun 7, 2024

I experienced the same issue with cuda11, but it worked fine with cuda12.

To resolve this, set CudaToolkitDir to match CUDA_PATH. For example:

$env:CudaToolkitDir = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8"
$env:NVCC_APPEND_FLAGS = "-allow-unsupported-compiler"
$env:CMAKE_CUDA_COMPILER = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc.exe"

@LLLYF
Copy link

LLLYF commented Aug 19, 2024

Hello

I finally fixed it! It seems my Windows 11 system variables paths were corrupted .... I reinstalled win 11 with option "keep installed applications and user files "

Now with VS 2022 , Cuda toolkit 11.6.1 and cmake ... I can compile the version with cuda ! first downloaded repo and then :

mkdir build cmake.exe -B build -D WHISPER_CUBLAS=1 cmake.exe --build build --config release

WORKS!

Sorry to bother you, sir, I meet some problems when I follow your command
image

@altunenes
Copy link

Hello
I finally fixed it! It seems my Windows 11 system variables paths were corrupted .... I reinstalled win 11 with option "keep installed applications and user files "
Now with VS 2022 , Cuda toolkit 11.6.1 and cmake ... I can compile the version with cuda ! first downloaded repo and then :
mkdir build cmake.exe -B build -D WHISPER_CUBLAS=1 cmake.exe --build build --config release
WORKS!

Sorry to bother you, sir, I meet some problems when I follow your command image

Please uninstall all Cuda-related things on your pc. Remove/clean the path. And install the latest Cuda and Cudnn. Dont do anything else, next -next and ok. it SHOULD work in that case.

Probably you played too much on your PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested solution This issue contains a potential solution
Projects
None yet
Development

No branches or pull requests

6 participants