various minor fixes

This commit is contained in:
Concedo 2025-06-08 01:11:42 +08:00
parent 301450b1eb
commit a80dfa5c10
3 changed files with 47 additions and 18 deletions

View file

@ -714,19 +714,31 @@ ifeq ($(OS),Windows_NT)
@echo 'Vulkan Shaders Rebuilt for Windows...' @echo 'Vulkan Shaders Rebuilt for Windows...'
else else
@echo 'Now rebuilding vulkan shaders for Linux...' @echo 'Now rebuilding vulkan shaders for Linux...'
@chmod +x vulkan-shaders-gen
@echo 'Checking if system glslc-linux binary is usable...' @echo 'Checking if system glslc-linux binary is usable...'
@GLSLC_BIN=$$( \ @GLSLC_BIN=$$( \
if command -v glslc >/dev/null 2>&1 && glslc --version 2>/dev/null | grep -q "glslang"; then \ if [ -n "$$LLAMA_USE_BUNDLED_GLSLC" ]; then \
echo "glslc"; \
elif [ -x ./glslc-linux ]; then \
chmod +x ./glslc-linux; \ chmod +x ./glslc-linux; \
if ./glslc-linux --version 2>/dev/null | grep -q "glslang"; then \ if [ -x ./glslc-linux ] && ./glslc-linux --version 2>/dev/null | grep -q "glslang"; then \
echo "./glslc-linux"; \ echo "./glslc-linux"; \
elif command -v glslc >/dev/null 2>&1; then \
echo "glslc"; \
else \ else \
echo ""; \ echo ""; \
fi; \ fi; \
else \ else \
echo ""; \ if command -v glslc >/dev/null 2>&1 && glslc --version 2>/dev/null | grep -q "glslang"; then \
echo "glslc"; \
elif [ -x ./glslc-linux ]; then \
chmod +x ./glslc-linux; \
if ./glslc-linux --version 2>/dev/null | grep -q "glslang"; then \
echo "./glslc-linux"; \
else \
echo ""; \
fi; \
else \
echo ""; \
fi; \
fi); \ fi); \
if [ -z "$$GLSLC_BIN" ]; then \ if [ -z "$$GLSLC_BIN" ]; then \
echo "Error: No usable glslc found. Vulkan shaders cannot be compiled!"; \ echo "Error: No usable glslc found. Vulkan shaders cannot be compiled!"; \
@ -746,15 +758,32 @@ ifeq ($(OS),Windows_NT)
@echo 'Vulkan Shaders (no extensions) Rebuilt for Windows...' @echo 'Vulkan Shaders (no extensions) Rebuilt for Windows...'
else else
@echo 'Now rebuilding vulkan shaders (no extensions) for Linux...' @echo 'Now rebuilding vulkan shaders (no extensions) for Linux...'
@chmod +x vulkan-shaders-gen-noext glslc-linux @chmod +x vulkan-shaders-gen-noext
@echo 'Checking if bundled glslc-linux binary is usable...' @echo 'Checking if system glslc-linux binary is usable...'
@GLSLC_BIN=$$(if ./glslc-linux --version >/dev/null 2>&1; then \ @GLSLC_BIN=$$( \
echo "./glslc-linux"; \ if [ -n "$$LLAMA_USE_BUNDLED_GLSLC" ]; then \
elif command -v glslc >/dev/null 2>&1; then \ chmod +x ./glslc-linux; \
echo "glslc"; \ if [ -x ./glslc-linux ] && ./glslc-linux --version 2>/dev/null | grep -q "glslang"; then \
else \ echo "./glslc-linux"; \
echo ""; \ elif command -v glslc >/dev/null 2>&1; then \
fi); \ echo "glslc"; \
else \
echo ""; \
fi; \
else \
if command -v glslc >/dev/null 2>&1 && glslc --version 2>/dev/null | grep -q "glslang"; then \
echo "glslc"; \
elif [ -x ./glslc-linux ]; then \
chmod +x ./glslc-linux; \
if ./glslc-linux --version 2>/dev/null | grep -q "glslang"; then \
echo "./glslc-linux"; \
else \
echo ""; \
fi; \
else \
echo ""; \
fi; \
fi); \
if [ -z "$$GLSLC_BIN" ]; then \ if [ -z "$$GLSLC_BIN" ]; then \
echo "Error: No usable glslc found. Vulkan shaders (no extensions) cannot be compiled!"; \ echo "Error: No usable glslc found. Vulkan shaders (no extensions) cannot be compiled!"; \
else \ else \

View file

@ -53,7 +53,7 @@
"ContextSize = 4096 #@param [4096,8192] {allow-input: true}\n", "ContextSize = 4096 #@param [4096,8192] {allow-input: true}\n",
"FlashAttention = True #@param {type:\"boolean\"}\n", "FlashAttention = True #@param {type:\"boolean\"}\n",
"Multiplayer = False #@param {type:\"boolean\"}\n", "Multiplayer = False #@param {type:\"boolean\"}\n",
"DeleteExistingModels = False #@param {type:\"boolean\"}\n", "DeleteExistingModels = True #@param {type:\"boolean\"}\n",
"FACommand = \"\"\n", "FACommand = \"\"\n",
"MPCommand = \"\"\n", "MPCommand = \"\"\n",
"#@markdown <hr>\n", "#@markdown <hr>\n",
@ -146,7 +146,7 @@
"\n", "\n",
"if DeleteExistingModels:\n", "if DeleteExistingModels:\n",
" print(\"Deleting all cached models to redownload...\")\n", " print(\"Deleting all cached models to redownload...\")\n",
" patterns = ['*.gguf', '*.bin']\n", " patterns = ['*.gguf', '*.bin', '*.ggml']\n",
" for pattern in patterns:\n", " for pattern in patterns:\n",
" for file_path in glob.glob(pattern):\n", " for file_path in glob.glob(pattern):\n",
" try:\n", " try:\n",

View file

@ -40,9 +40,9 @@ if [ -n "$ARCHES_CU12" ]; then
fi fi
if [ "$KCPP_CUDA" = "rocm" ]; then if [ "$KCPP_CUDA" = "rocm" ]; then
bin/micromamba run -r conda -p conda/envs/linux make -j$(nproc) LLAMA_VULKAN=1 LLAMA_CLBLAST=1 LLAMA_HIPBLAS=1 LLAMA_PORTABLE=1 LLAMA_ADD_CONDA_PATHS=1 $LLAMA_NOAVX2_FLAG $ARCHES_FLAG bin/micromamba run -r conda -p conda/envs/linux make -j$(nproc) LLAMA_VULKAN=1 LLAMA_CLBLAST=1 LLAMA_HIPBLAS=1 LLAMA_PORTABLE=1 LLAMA_USE_BUNDLED_GLSLC=1 LLAMA_ADD_CONDA_PATHS=1 $LLAMA_NOAVX2_FLAG $ARCHES_FLAG
else else
bin/micromamba run -r conda -p conda/envs/linux make -j$(nproc) LLAMA_VULKAN=1 LLAMA_CLBLAST=1 LLAMA_CUBLAS=1 LLAMA_PORTABLE=1 LLAMA_ADD_CONDA_PATHS=1 $LLAMA_NOAVX2_FLAG $ARCHES_FLAG bin/micromamba run -r conda -p conda/envs/linux make -j$(nproc) LLAMA_VULKAN=1 LLAMA_CLBLAST=1 LLAMA_CUBLAS=1 LLAMA_PORTABLE=1 LLAMA_USE_BUNDLED_GLSLC=1 LLAMA_ADD_CONDA_PATHS=1 $LLAMA_NOAVX2_FLAG $ARCHES_FLAG
fi fi
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then