diff --git a/.github/workflows/linux_special.yml b/.github/workflows/linux_special.yml index 50f8413..853b060 100644 --- a/.github/workflows/linux_special.yml +++ b/.github/workflows/linux_special.yml @@ -121,7 +121,6 @@ jobs: with: path: | desktop/src-tauri/openblas - desktop/src-tauri/clblast desktop/src-tauri/ffmpeg key: ${{ runner.os }}-pre-build diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index 03097a1..93aafa5 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -100,7 +100,6 @@ jobs: with: path: | desktop/src-tauri/openblas - desktop/src-tauri/clblast desktop/src-tauri/ffmpeg key: ${{ matrix.platform }}-pre-build diff --git a/.gitignore b/.gitignore index b62c5b3..ddd2de7 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,6 @@ openblas/ *.7z .env !samples/* -clblast/ vulkan_sdk/ vulkan_runtime/ schemas/ diff --git a/.vscode/launch.json b/.vscode/launch.json index 3795912..85d9be3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -59,10 +59,9 @@ "env": { "FFMPEG_DIR": "${workspaceFolder}\\desktop\\src-tauri\\ffmpeg", "OPENBLAS_PATH": "${workspaceFolder}\\desktop\\src-tauri\\openblas", - "CLBlast_DIR": "${workspaceFolder}\\desktop\\src-tauri\\clblast", "LIBCLANG_PATH": "C:\\Program Files\\LLVM\\bin", - "PATH": "${env:PATH};${workspaceFolder}\\desktop\\src-tauri\\openblas\\bin;${workspaceFolder}\\desktop\\src-tauri\\clblast\\bin;${workspaceFolder}\\desktop\\src-tauri\\ffmpeg\\bin\\x64", - "RUSTFLAGS": "-L ${workspaceFolder}\\desktop\\src-tauri\\clblast\\lib -L ${workspaceFolder}\\desktop\\src-tauri\\openblas\\lib" + "PATH": "${env:PATH};${workspaceFolder}\\desktop\\src-tauri\\openblas\\bin;${workspaceFolder}\\desktop\\src-tauri\\ffmpeg\\bin\\x64", + "RUSTFLAGS": "-L ${workspaceFolder}\\desktop\\src-tauri\\openblas\\lib" }, }, "args": [], diff --git a/core/build.rs b/core/build.rs index d977c9b..b0df595 100644 --- a/core/build.rs +++ b/core/build.rs @@ -49,9 +49,6 @@ fn main() { // ffmpeg let ffmpeg_dir = env::var("FFMPEG_DIR").unwrap_or_default(); let ffmpeg_dir = PathBuf::from(ffmpeg_dir); - // clblast - let clblast_dir = env::var("CLBlast_DIR").unwrap_or_default(); - let clblast_dir = PathBuf::from(clblast_dir); // openblas let openblas_dir = env::var("OPENBLAS_PATH").unwrap_or_default(); @@ -94,7 +91,6 @@ fn main() { format!("{}\\*.dll", ffmpeg_dir.join("bin\\x64").to_str().unwrap()), format!("{}\\*.exe", ffmpeg_dir.join("bin\\x64").to_str().unwrap()), format!("{}\\*.dll", openblas_dir.join("..\\bin").to_str().unwrap()), - format!("{}\\*.dll", clblast_dir.join("..\\..\\..\\bin").to_str().unwrap()), ]; for pattern in patterns { for entry in glob::glob(&pattern).unwrap().flatten() { diff --git a/desktop/src-tauri/tauri.windows.conf.json b/desktop/src-tauri/tauri.windows.conf.json index dbe9407..a85b358 100644 --- a/desktop/src-tauri/tauri.windows.conf.json +++ b/desktop/src-tauri/tauri.windows.conf.json @@ -6,7 +6,8 @@ } }, "resources": { - "ffmpeg\\bin\\x64\\*": "./" + "ffmpeg\\bin\\x64\\*": "./", + "vulkan_runtime\\x64\\*.dll": "./" } } } \ No newline at end of file diff --git a/docs/BUILDING.md b/docs/BUILDING.md index e53d6df..1f33f37 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -32,6 +32,14 @@ _Vulkan (Linux)_ sudo apt-get install -y mesa-vulkan-drivers ``` +_Vulkan (Windows)_ + +**Run as admin once!!!** + +```console +bun run scripts\pre_build.js --vulkan +``` + ## Build Install dependencies from `desktop` folder @@ -66,7 +74,6 @@ See [whisper.cpp#nvidia-support](https://github.com/ggerganov/whisper.cpp?tab=re "resources": { "ffmpeg\\bin\\x64\\*.dll": "./", "openblas\\bin\\*.dll": "./", - "clblast\\bin\\*.dll": "./", "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.5\\bin\\cudart64_*": "./", "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.5\\bin\\cublas64_*": "./", "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.5\\bin\\cublasLt64_*": "./" @@ -130,7 +137,6 @@ Rust analyzer failed to run on windows "rust-analyzer.cargo.extraEnv": { "FFMPEG_DIR": "${workspaceFolder}\\desktop\\src-tauri\\ffmpeg", "OPENBLAS_PATH": "${workspaceFolder}\\desktop\\src-tauri\\openblas", - "CLBlast_DIR": "${workspaceFolder}\\desktop\\src-tauri\\clblast", "LIBCLANG_PATH": "C:\\Program Files\\LLVM\\bin" } ``` @@ -226,7 +232,6 @@ cargo +nightly -Zunstable-options update --breaking "rust-analyzer.runnables.extraEnv": { "FFMPEG_DIR": "${workspaceFolder}\\desktop\\src-tauri\\ffmpeg", "OPENBLAS_PATH": "${workspaceFolder}\\desktop\\src-tauri\\openblas", - "CLBlast_DIR": "${workspaceFolder}\\desktop\\src-tauri\\clblast", "LIBCLANG_PATH": "C:\\Program Files\\LLVM\\bin" }, "rust-analyzer.runnables.extraArgs": ["--release"] @@ -238,7 +243,6 @@ cargo +nightly -Zunstable-options update --breaking ```console bun run scripts/pre_build.js # Export env -$env:PATH += ";$pwddesktop\src-tauri\clblast\bin" $env:PATH += ";$pwd\desktop\src-tauri\openblas\bin" cargo test --target x86_64-pc-windows-msvc --features "vulkan" -p vibe_core --release -- --nocapture ``` diff --git a/scripts/pre_build.js b/scripts/pre_build.js index c1a9e30..52dc786 100755 --- a/scripts/pre_build.js +++ b/scripts/pre_build.js @@ -20,7 +20,6 @@ function hasFeature(name) { const config = { ffmpegRealname: 'ffmpeg', openblasRealname: 'openblas', - clblastRealname: 'clblast', vulkanRuntimeRealName: 'vulkan_runtime', vulkanSdkRealName: 'vulkan_sdk', windows: { @@ -30,9 +29,6 @@ const config = { openBlasName: 'OpenBLAS-0.3.26-x64', openBlasUrl: 'https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.26/OpenBLAS-0.3.26-x64.zip', - clblastName: 'CLBlast-1.6.2-windows-x64', - clblastUrl: 'https://github.com/CNugteren/CLBlast/releases/download/1.6.2/CLBlast-1.6.2-windows-x64.zip', - vulkanRuntimeName: 'VulkanRT-1.3.290.0-Components', vulkanRuntimeUrl: 'https://sdk.lunarg.com/sdk/download/1.3.290.0/windows/VulkanRT-1.3.290.0-Components.zip', vulkanSdkName: 'VulkanSDK-1.3.290.0-Installer', @@ -75,7 +71,6 @@ const config = { const exports = { ffmpeg: path.join(cwd, config.ffmpegRealname), openBlas: path.join(cwd, config.openblasRealname), - clblast: path.join(cwd, config.clblastRealname, 'lib/cmake/CLBlast'), libClang: 'C:\\Program Files\\LLVM\\bin', cmake: 'C:\\Program Files\\CMake\\bin', } @@ -114,16 +109,6 @@ if (platform == 'windows') { fs.cp(path.join(config.openblasRealname, 'lib/libopenblas.lib'), path.join(config.openblasRealname, 'lib/openblas.lib')) } - // Setup CLBlast - if (!(await fs.exists(config.clblastRealname)) && !hasFeature('cuda')) { - await $`C:\\msys64\\usr\\bin\\wget.exe -nc --show-progress ${config.windows.clblastUrl} -O ${config.windows.clblastName}.zip` - await $`"C:\\Program Files\\7-Zip\\7z.exe" x ${config.windows.clblastName}.zip` // 7z file inside - await $`"C:\\Program Files\\7-Zip\\7z.exe" x ${config.windows.clblastName}.7z` // Inner folder - await $`mv ${config.windows.clblastName} ${config.clblastRealname}` - await $`rm ${config.windows.clblastName}.zip` - await $`rm ${config.windows.clblastName}.7z` - } - // Setup Vulkan if (!(await fs.exists(config.vulkanSdkRealName)) && hasFeature('vulkan')) { await $`C:\\msys64\\usr\\bin\\wget.exe -nc --show-progress ${config.windows.vulkanSdkUrl} -O ${config.windows.vulkanSdkName}.exe` @@ -344,7 +329,6 @@ if (action?.includes('--build' || action.includes('--dev'))) { process.env['FFMPEG_DIR'] = exports.ffmpeg if (platform === 'windows') { process.env['OPENBLAS_PATH'] = exports.openBlas - process.env['CLBlast_DIR'] = exports.clblast process.env['LIBCLANG_PATH'] = process.env['LIBCLANG_PATH'] || exports.libClang process.env['PATH'] = `${process.env['PATH']};${exports.cmake}` }