reverted the failsafe removal, since they dropped support for dll check
This commit is contained in:
parent
b6914ebd04
commit
e2fd30b5d1
4 changed files with 32 additions and 11 deletions
10
Makefile
10
Makefile
|
@ -341,15 +341,15 @@ $(info )
|
||||||
|
|
||||||
ggml.o: ggml.c ggml.h ggml-cuda.h k_quants.h
|
ggml.o: ggml.c ggml.h ggml-cuda.h k_quants.h
|
||||||
$(CC) $(CFLAGS) $(FULLCFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) $(FULLCFLAGS) -c $< -o $@
|
||||||
ggml_openblas.o: ggml.c ggml.h
|
ggml_openblas.o: ggml.c ggml.h ggml-cuda.h k_quants.h
|
||||||
$(CC) $(CFLAGS) $(FULLCFLAGS) $(OPENBLAS_FLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) $(FULLCFLAGS) $(OPENBLAS_FLAGS) -c $< -o $@
|
||||||
ggml_failsafe.o: ggml.c ggml.h
|
ggml_failsafe.o: ggml.c ggml.h ggml-cuda.h k_quants.h
|
||||||
$(CC) $(CFLAGS) $(NONECFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) $(NONECFLAGS) -c $< -o $@
|
||||||
ggml_noavx2.o: ggml.c ggml.h
|
ggml_noavx2.o: ggml.c ggml.h ggml-cuda.h k_quants.h
|
||||||
$(CC) $(CFLAGS) $(SIMPLECFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) $(SIMPLECFLAGS) -c $< -o $@
|
||||||
ggml_clblast.o: ggml.c ggml.h
|
ggml_clblast.o: ggml.c ggml.h ggml-cuda.h k_quants.h
|
||||||
$(CC) $(CFLAGS) $(FULLCFLAGS) $(CLBLAST_FLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) $(FULLCFLAGS) $(CLBLAST_FLAGS) -c $< -o $@
|
||||||
ggml_cublas.o: ggml.c ggml.h
|
ggml_cublas.o: ggml.c ggml.h ggml-cuda.h k_quants.h
|
||||||
$(CC) $(CFLAGS) $(FULLCFLAGS) $(CUBLAS_FLAGS) $(HIPFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) $(FULLCFLAGS) $(CUBLAS_FLAGS) $(HIPFLAGS) -c $< -o $@
|
||||||
|
|
||||||
#quants K
|
#quants K
|
||||||
|
|
25
klite.embd
25
klite.embd
|
@ -7847,12 +7847,25 @@ Kobold Lite is under the AGPL v3.0 License for the purposes of koboldcpp. Please
|
||||||
|
|
||||||
if(foundself!=null && foundself.length>0)
|
if(foundself!=null && foundself.length>0)
|
||||||
{
|
{
|
||||||
myturnchat = true;
|
//exception: check to see if it's actually opponent naming us and not our turn
|
||||||
chatunits.push({
|
if(localsettings.chatopponent!="" && tempfullsearchable.startsWith(localsettings.chatopponent+": "))
|
||||||
name:foundself[0].substring(0,foundself[0].length-2),
|
{
|
||||||
msg:tempfullsearchable.split(foundself[0])[1],
|
myturnchat = false;
|
||||||
myturn:myturnchat});
|
chatunits.push({
|
||||||
}else if(foundopponent != null && foundopponent.length > 0)
|
name:localsettings.chatopponent,
|
||||||
|
msg:tempfullsearchable.split(localsettings.chatopponent+": ")[1],
|
||||||
|
myturn:myturnchat});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
myturnchat = true;
|
||||||
|
chatunits.push({
|
||||||
|
name:foundself[0].substring(0,foundself[0].length-2),
|
||||||
|
msg:tempfullsearchable.split(foundself[0])[1],
|
||||||
|
myturn:myturnchat});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(foundopponent != null && foundopponent.length > 0)
|
||||||
{
|
{
|
||||||
myturnchat = false;
|
myturnchat = false;
|
||||||
chatunits.push({
|
chatunits.push({
|
||||||
|
|
|
@ -612,6 +612,7 @@ struct llama_mmap {
|
||||||
throw std::runtime_error(format("MapViewOfFile failed: %s", llama_format_win_err(error).c_str()));
|
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 _WIN32_WINNT >= _WIN32_WINNT_WIN8
|
||||||
if (prefetch) {
|
if (prefetch) {
|
||||||
// Advise the kernel to preload the mapped memory
|
// Advise the kernel to preload the mapped memory
|
||||||
|
@ -626,6 +627,9 @@ struct llama_mmap {
|
||||||
#else
|
#else
|
||||||
#pragma message("warning: You are building for pre-Windows 8; prefetch not supported")
|
#pragma message("warning: You are building for pre-Windows 8; prefetch not supported")
|
||||||
#endif // _WIN32_WINNT >= _WIN32_WINNT_WIN8
|
#endif // _WIN32_WINNT >= _WIN32_WINNT_WIN8
|
||||||
|
#else
|
||||||
|
printf("\nPrefetchVirtualMemory skipped in compatibility mode.\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
~llama_mmap() {
|
~llama_mmap() {
|
||||||
|
|
|
@ -271,6 +271,7 @@ struct llama_v3_mmap {
|
||||||
throw std::runtime_error(format_old("MapViewOfFile failed: %s", llama_v3_format_win_err(error).c_str()));
|
throw std::runtime_error(format_old("MapViewOfFile failed: %s", llama_v3_format_win_err(error).c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef USE_FAILSAFE
|
||||||
if (prefetch) {
|
if (prefetch) {
|
||||||
// The PrefetchVirtualMemory API is only present on Windows 8 and above, so we
|
// The PrefetchVirtualMemory API is only present on Windows 8 and above, so we
|
||||||
// will dynamically load it using GetProcAddress.
|
// will dynamically load it using GetProcAddress.
|
||||||
|
@ -294,6 +295,9 @@ struct llama_v3_mmap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
printf("\nPrefetchVirtualMemory skipped in compatibility mode.\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
~llama_v3_mmap() {
|
~llama_v3_mmap() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue