revert klite newline bug, trying to add win7 support
This commit is contained in:
parent
844f92688a
commit
bf482d1786
4 changed files with 14 additions and 3 deletions
5
Makefile
5
Makefile
|
@ -53,6 +53,7 @@ NONECFLAGS =
|
|||
|
||||
OPENBLAS_FLAGS = -DGGML_USE_OPENBLAS -I/usr/local/include/openblas
|
||||
CLBLAST_FLAGS = -DGGML_USE_CLBLAST
|
||||
FAILSAFE_FLAGS = -DUSE_FAILSAFE
|
||||
|
||||
#lets try enabling everything
|
||||
CFLAGS += -pthread -s
|
||||
|
@ -262,6 +263,8 @@ common.o: examples/common.cpp examples/common.h
|
|||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
expose.o: expose.cpp expose.h
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
gpttype_adapter_failsafe.o: gpttype_adapter.cpp
|
||||
$(CXX) $(CXXFLAGS) $(FAILSAFE_FLAGS) -c $< -o $@
|
||||
gpttype_adapter.o: gpttype_adapter.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
gpttype_adapter_clblast.o: gpttype_adapter.cpp
|
||||
|
@ -280,7 +283,7 @@ koboldcpp: ggml.o ggml_v2.o ggml_v1.o expose.o common.o gpttype_adapter.o $(OBJS
|
|||
$(DEFAULT_BUILD)
|
||||
koboldcpp_openblas: ggml_openblas.o ggml_v2_openblas.o ggml_v1.o expose.o common.o gpttype_adapter.o
|
||||
$(OPENBLAS_BUILD)
|
||||
koboldcpp_failsafe: ggml_failsafe.o ggml_v2_failsafe.o ggml_v1_failsafe.o expose.o common.o gpttype_adapter.o
|
||||
koboldcpp_failsafe: ggml_failsafe.o ggml_v2_failsafe.o ggml_v1_failsafe.o expose.o common.o gpttype_adapter_failsafe.o
|
||||
$(FAILSAFE_BUILD)
|
||||
koboldcpp_openblas_noavx2: ggml_openblas_noavx2.o ggml_v2_openblas_noavx2.o ggml_v1_failsafe.o expose.o common.o gpttype_adapter.o
|
||||
$(OPENBLAS_NOAVX2_BUILD)
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -219,6 +219,7 @@ struct llama_mmap {
|
|||
throw std::runtime_error(format("MapViewOfFile failed: %s", llama_format_win_err(error).c_str()));
|
||||
}
|
||||
|
||||
#ifndef USE_FAILSAFE
|
||||
#if _WIN32_WINNT >= _WIN32_WINNT_WIN8
|
||||
if (prefetch) {
|
||||
// Advise the kernel to preload the mapped memory
|
||||
|
@ -233,6 +234,9 @@ struct llama_mmap {
|
|||
#else
|
||||
#pragma message("warning: You are building for pre-Windows 8; prefetch not supported")
|
||||
#endif // _WIN32_WINNT >= _WIN32_WINNT_WIN8
|
||||
#else
|
||||
printf("\nPrefetchVirtualMemory skipped in failsafe mode.");
|
||||
#endif
|
||||
}
|
||||
|
||||
~llama_mmap() {
|
||||
|
|
|
@ -209,6 +209,7 @@ struct llama_v2_mmap {
|
|||
throw std::runtime_error(format("MapViewOfFile failed: %s", llama_v2_format_win_err(error).c_str()));
|
||||
}
|
||||
|
||||
#ifndef USE_FAILSAFE
|
||||
#if _WIN32_WINNT >= _WIN32_WINNT_WIN8
|
||||
if (prefetch) {
|
||||
// Advise the kernel to preload the mapped memory
|
||||
|
@ -223,6 +224,9 @@ struct llama_v2_mmap {
|
|||
#else
|
||||
#pragma message("warning: You are building for pre-Windows 8; prefetch not supported")
|
||||
#endif // _WIN32_WINNT >= _WIN32_WINNT_WIN8
|
||||
#else
|
||||
printf("\nPrefetchVirtualMemory skipped in failsafe mode.");
|
||||
#endif
|
||||
}
|
||||
|
||||
~llama_v2_mmap() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue