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

Cmake: Unable to build on Windows with -DWHISPER_HIPBLAS=ON #2202

Open
newfla opened this issue Jun 1, 2024 · 2 comments
Open

Cmake: Unable to build on Windows with -DWHISPER_HIPBLAS=ON #2202

newfla opened this issue Jun 1, 2024 · 2 comments

Comments

@newfla
Copy link

newfla commented Jun 1, 2024

Hi,
I'm strugling with windows building using rocm/hipblas feature.
Windows SDK version 10.0.19041.0
Rocm 5.7 for Windows
Is this a known problem? Do you think some configuration might be missing in CMkelists.txt?
My impression is that it's not using hipcc to compile the sources

Logs:

cmake -B build -DWHISPER_HIPBLAS=ON

PS C:\Users\newfl\Downloads\code\whisper.cpp> cmake -B build -DWHISPER_HIPBLAS=ON
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22631.
CMake Warning at CMakeLists.txt:385 (message):
  Only LLVM is supported for HIP, hint: CC=/opt/rocm/llvm/bin/clang


CMake Warning at CMakeLists.txt:388 (message):
  Only LLVM is supported for HIP, hint: CXX=/opt/rocm/llvm/bin/clang++


CMake Deprecation Warning at C:/Program Files/AMD/ROCm/5.7/lib/cmake/hip/hip-config.cmake:20 (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.
Call Stack (most recent call first):
  CMakeLists.txt:391 (find_package)


perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LC_ALL = (unset),
        (possibly more locale environment variables)
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the system default locale ("Italian_Italy.1252").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LC_ALL = (unset),
        (possibly more locale environment variables)
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the system default locale ("Italian_Italy.1252").
CMake Deprecation Warning at C:/Program Files/AMD/ROCm/5.7/lib/cmake/hip/hip-config-amd.cmake:21 (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.
Call Stack (most recent call first):
  C:/Program Files/AMD/ROCm/5.7/lib/cmake/hip/hip-config.cmake:150 (include)
  CMakeLists.txt:391 (find_package)


-- hip::amdhip64 is SHARED_LIBRARY
CMake Deprecation Warning at C:/Program Files/AMD/ROCm/5.7/lib/cmake/hip/hip-config.cmake:20 (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.
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.29/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  C:/Program Files/AMD/ROCm/5.7/lib/cmake/hipblas/hipblas-config.cmake:90 (find_dependency)
  CMakeLists.txt:392 (find_package)


CMake Deprecation Warning at C:/Program Files/AMD/ROCm/5.7/lib/cmake/hip/hip-config-amd.cmake:21 (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.
Call Stack (most recent call first):
  C:/Program Files/AMD/ROCm/5.7/lib/cmake/hip/hip-config.cmake:150 (include)
  C:/Program Files/CMake/share/cmake-3.29/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  C:/Program Files/AMD/ROCm/5.7/lib/cmake/hipblas/hipblas-config.cmake:90 (find_dependency)
  CMakeLists.txt:392 (find_package)


-- hip::amdhip64 is SHARED_LIBRARY
-- HIP and hipBLAS found
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- x86 detected
-- Configuring done (0.5s)
-- Generating done (0.5s)
-- Build files have been written to: C:/Users/newfl/Downloads/code/whisper.cpp/build

cmake --build build -j --config Release

PS C:\Users\newfl\Downloads\code\whisper.cpp> cmake --build build -j --config Release
Microsoft (R) Build Engine versione 16.11.2+f32259642 per .NET Framework
Copyright (C) Microsoft Corporation. Tutti i diritti sono riservati.

  1>Checking Build System
  Building Custom Rule C:/Users/newfl/Downloads/code/whisper.cpp/CMakeLists.txt
  cl : warning della riga di comando D9002 : l'opzione sconosciuta '-x' verrà ignorata
  hip
c1 : fatal error C1083: Non è possibile aprire il file origine: 'hip': No such file or directory [C:\Users\newfl\Downloads\code\whisper.cpp\build\whisper.vcxproj]
  ggml.c
  ggml-alloc.c
  ggml-backend.c
  ggml-quants.c
  Generazione del codice in corso...

@ulatekh
Copy link
Contributor

ulatekh commented Jun 4, 2024

Only LLVM is supported for HIP

Seems pretty obvious.

@newfla
Copy link
Author

newfla commented Jun 5, 2024

Is there a way to compile under windows enabling rocm?
What I don't understand is why cmake ignores the CMAKE_C_COMPILER/CMAKE_CXX_COMPILER settings. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants