Skip to content

fix and speed up compilaton #8354

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

diimdeep
Copy link

@diimdeep diimdeep commented Jul 7, 2024

unicode-data.cpp takes very long to compile on x86_64 low powered Mac with clang 17.0.6 and aarch64 linux GNU 12.2.0 goes OOM on 1GB RAM SBC

Review Complexity : Low

unicode-data.cpp takes very long to compile on x86_64 macos with clang 17.0.6 
and aarch64 linux GNU 12.2.0 goes OOM on 1GB RAM SBC
@slaren
Copy link
Member

slaren commented Jul 7, 2024

This will require testing to prove that this change does not affect performance.

@@ -28,3 +28,5 @@ if (BUILD_SHARED_LIBS)
set_target_properties(llama PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_compile_definitions(llama PRIVATE LLAMA_SHARED LLAMA_BUILD)
endif()

set_source_files_properties(unicode-data.cpp PROPERTIES COMPILE_FLAGS -O1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

-O1 is a non-portable compiler flag.

@mofosyne mofosyne added the Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix label Jul 13, 2024
@USBhost
Copy link

USBhost commented Jul 24, 2024

Yeah unicode takes forever to compile on clang. But fine on gcc for some reason.

@mofosyne mofosyne added the bugfix fixes an issue or bug label Aug 5, 2024
Copy link

@vignesh1507 vignesh1507 left a comment

Choose a reason for hiding this comment

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

I agree with the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix fixes an issue or bug Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants