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 : use list(APPEND ...) instead of set() + dedup linker #9463

Merged
merged 5 commits into from
Sep 14, 2024

Conversation

ggerganov
Copy link
Owner

@ggerganov ggerganov commented Sep 13, 2024

ref #9339 (comment)

  • Using list(APPEND X Y) is considered better practice compared to set(X X Y).
  • Add list(REMOVE_DUPLICATES ${GGML_EXTRA_LIBS}) to deduplicate flags coming from Accelerate and Metal branches (and possibly other cases too)

@@ -504,7 +506,8 @@ if (GGML_HIPBLAS)
message(FATAL_ERROR "Static linking not supported for HIP/ROCm")
endif()

set(GGML_EXTRA_LIBS ${GGML_EXTRA_LIBS} PUBLIC hip::host roc::rocblas roc::hipblas)
# TODO: this "PUBLIC" here seems wrong
list(APPEND GGML_EXTRA_LIBS PUBLIC hip::host roc::rocblas roc::hipblas)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am surprised this hack works at all. But I guess its strings internally...
But that also means that everything following will be made public.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup me too. I don't have HIP environment setup to test and find ways to avoid it.

@Xarbirus
Copy link
Contributor

@ggerganov , I added SYCL fix in #9469

* try fix sycl build

* use CMAKE_CXX_FLAGS as a string variable

---------

Co-authored-by: Georgi Gerganov <[email protected]>
@Xarbirus
Copy link
Contributor

And this one #9471 please.

@ggerganov ggerganov merged commit 1f4111e into master Sep 14, 2024
53 checks passed
@ggerganov
Copy link
Owner Author

@Xarbirus Looks like we broke the Docker CI with this change:

https://github.com/ggerganov/llama.cpp/actions/runs/10860757616/job/30141751962

Do you have any suggestions for a fix?

Will tag also the Intel team for suggestions: @abhilash1910 @airMeng @NeoZhangJianyu @luoyu-intel

@Xarbirus Xarbirus mentioned this pull request Sep 14, 2024
4 tasks
@Xarbirus
Copy link
Contributor

I have only one suggestion: #9487 (set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsycl")), PTAL

@Xarbirus Xarbirus mentioned this pull request Sep 15, 2024
4 tasks
@airMeng airMeng mentioned this pull request Sep 16, 2024
4 tasks
dsx1986 pushed a commit to dsx1986/llama.cpp that referenced this pull request Oct 29, 2024
…ov#9463)

* cmake : use list(APPEND ...) instead of set() + dedup linker

ggml-ci

* cmake : try fix sycl

* cmake : try to fix sycl 2

* cmake : fix sycl build (ggerganov#9469)

* try fix sycl build

* use CMAKE_CXX_FLAGS as a string variable

---------

Co-authored-by: Georgi Gerganov <[email protected]>

* one more CMAKE_CXX_FLAGS fix (ggerganov#9471)

---------

Co-authored-by: Michael Podvitskiy <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants