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

Posixify madvise and pagesize. #3037

Merged
merged 3 commits into from Sep 7, 2023

Conversation

przemoc
Copy link
Contributor

@przemoc przemoc commented Sep 5, 2023

No description provided.

sed -i 's,\<madvise\>,posix_&,g;s,\<MADV_,POSIX_&,g' llama.cpp
…m BSD

sed -i 's,getpagesize(),sysconf(_SC_PAGESIZE),g' ggml.c
…om BSD

sed -i 's,getpagesize(),sysconf(_SC_PAGESIZE),g' ggml-metal.m
@przemoc
Copy link
Contributor Author

przemoc commented Sep 5, 2023

After #3037 will be merged, #2035 will be rebased on top of master.

@przemoc
Copy link
Contributor Author

przemoc commented Sep 6, 2023

@ggerganov, are there any concerns with merging this (#3037)?
On whisper.cpp side you already merged ggerganov/whisper.cpp#1251.

@ggerganov ggerganov merged commit fec2fb1 into ggerganov:master Sep 7, 2023
26 checks passed
@przemoc przemoc deleted the posixify-madvise-and-pagesize branch September 7, 2023 08:28
Sam2much96 pushed a commit to Sam2much96/llama.cpp that referenced this pull request Sep 11, 2023
* llama : use posix_madvise() instead of madvise() derived from BSD

sed -i 's,\<madvise\>,posix_&,g;s,\<MADV_,POSIX_&,g' llama.cpp

* ggml : use sysconf(_SC_PAGESIZE) instead of getpagesize() derived from BSD

sed -i 's,getpagesize(),sysconf(_SC_PAGESIZE),g' ggml.c

* metal : use sysconf(_SC_PAGESIZE) instead of getpagesize() derived from BSD

sed -i 's,getpagesize(),sysconf(_SC_PAGESIZE),g' ggml-metal.m
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.

None yet

3 participants