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

[Bug(CMake 3.17)] nvcc fatal : Unknown option '-mf16c' #1079

Closed
4 tasks done
fumiama opened this issue Apr 20, 2023 · 3 comments
Closed
4 tasks done

[Bug(CMake 3.17)] nvcc fatal : Unknown option '-mf16c' #1079

fumiama opened this issue Apr 20, 2023 · 3 comments
Labels

Comments

@fumiama
Copy link
Contributor

fumiama commented Apr 20, 2023

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest code. Development is very rapid so there are no tagged versions as of now.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new bug or useful enhancement to share.

Expected Behavior

Successfully compiled.

cmake3 --build . --config Release

Current Behavior

Got error as title.

$ cmake3 --build . --config Release
-- cuBLAS found
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- x86 detected
-- GGML CUDA sources found, configuring CUDA architecture
-- Configuring done
-- Generating done
-- Build files have been written to: /users/fumiama/src/llama.cpp/build
[  4%] Building CUDA object CMakeFiles/ggml.dir/ggml-cuda.cu.o
nvcc fatal   : Unknown option '-mf16c'
gmake[2]: *** [CMakeFiles/ggml.dir/ggml-cuda.cu.o] 错误 1
gmake[1]: *** [CMakeFiles/ggml.dir/all] 错误 2
gmake: *** [all] 错误 2

Environment and Context

  • Physical (or virtual) hardware you are using: Centos7.6

  • Operating System, e.g. for Linux:

$ uname -a
Linux localhost.localdomain 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • SDK version, e.g. for Linux:
$ cmake3 --version
cmake3 version 3.17.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).

$ gcc --version
gcc (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Jan__6_16:45:21_PST_2023
Cuda compilation tools, release 12.0, V12.0.140
Build cuda_12.0.r12.0/compiler.32267302_0
@slaren
Copy link
Member

slaren commented Apr 20, 2023

I guess that the add_compile_options need to be filtered to not apply to cuda, similar to what was done for MSVC.

@fumiama fumiama changed the title [Bug(CMake)] nvcc fatal : Unknown option '-mf16c' [Bug(CMake 3.17)] nvcc fatal : Unknown option '-mf16c' Apr 20, 2023
@fumiama
Copy link
Contributor Author

fumiama commented Apr 20, 2023

I guess that the add_compile_options need to be filtered to not apply to cuda, similar to what was done for MSVC.

Sure and according to my latest test, cmake 3.26.3 does not have this issue. Maybe it only happens under cmake 3.17.x.

@github-actions github-actions bot added the stale label Mar 25, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

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

No branches or pull requests

2 participants