diff --git a/tools/scripts/generated/manifest.windows.ps1 b/tools/scripts/generated/manifest.windows.ps1 index 49d592b79d..453ce89751 100644 --- a/tools/scripts/generated/manifest.windows.ps1 +++ b/tools/scripts/generated/manifest.windows.ps1 @@ -13,8 +13,8 @@ $script:ContinuumManifest = [ordered]@{ 'airc-firewall' = @{ order = 27; tier = 0; flags = @('grid'); applies = 'has-airc'; accept = 'netsh advfirewall firewall show rule name="airc daemon inbound (continuum grid)"'; source = @{ type = 'command'; run = 'New-NetFirewallRule -DisplayName ''airc daemon inbound (continuum grid)'' -Direction Inbound -Action Allow -Profile Any' } } 'manifest-gen' = @{ order = 28; tier = 3; flags = @('dev'); accept = 'cargo run -q -p manifest-gen -- --check'; source = @{ type = 'command'; run = 'cargo run -q -p manifest-gen' } } 'msvc' = @{ order = 30; tier = 3; flags = @('dev'); accept = 'vswhere -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath'; source = @{ type = 'winget'; id = 'Microsoft.VisualStudio.2022.BuildTools'; override = '--wait --quiet --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended' } } - 'cmake' = @{ order = 40; tier = 3; flags = @('dev'); accept = 'cmake --version'; source = @{ type = 'archive'; url = 'https://github.com/Kitware/CMake/releases/download/v3.30.5/cmake-3.30.5-windows-x86_64.zip'; version = '3.30.5'; sha256 = '5ab6e1faf20256ee4f04886597e8b6c3b1bd1297b58a68a58511af013710004b'; extract = 'strip-top-dir' } } - 'llvm-libclang' = @{ order = 50; tier = 3; flags = @('dev'); accept = 'test-path ~/.continuum/tools/llvm/bin/libclang.dll'; source = @{ type = 'archive'; url = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang+llvm-18.1.8-x86_64-pc-windows-msvc.tar.xz'; version = '18.1.8'; sha256 = '22c5907db053026cc2a8ff96d21c0f642a90d24d66c23c6d28ee7b1d572b82e8'; extract = 'members:*/bin/libclang.dll,*/lib/clang/*' } } + 'cmake' = @{ order = 40; tier = 3; flags = @('dev'); accept = 'cmake --version'; source = @{ type = 'archive'; url = 'https://github.com/Kitware/CMake/releases/download/v3.30.5/cmake-3.30.5-windows-x86_64.zip'; version = '3.30.5'; sha256 = '5ab6e1faf20256ee4f04886597e8b6c3b1bd1297b58a68a58511af013710004b'; extract = 'strip-top-dir' }; runtime_path = @('~/.continuum/tools/cmake/bin') } + 'llvm-libclang' = @{ order = 50; tier = 3; flags = @('dev'); accept = 'test-path ~/.continuum/tools/llvm/bin/libclang.dll'; source = @{ type = 'archive'; url = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang+llvm-18.1.8-x86_64-pc-windows-msvc.tar.xz'; version = '18.1.8'; sha256 = '22c5907db053026cc2a8ff96d21c0f642a90d24d66c23c6d28ee7b1d572b82e8'; extract = 'members:*/bin/libclang.dll,*/lib/clang/*' }; runtime_path = @('~/.continuum/tools/llvm/bin') } 'cuda' = @{ order = 60; tier = 3; flags = @('dev'); applies = 'has-nvidia'; accept = 'nvcc --version >= 12.8'; source = @{ type = 'redist'; version = '12.9.1'; manifest = 'https://developer.download.nvidia.com/compute/cuda/redist/redistrib_12.9.1.json'; components = @('cuda_nvcc', 'cuda_cudart', 'libcublas', 'libcurand', 'cuda_nvrtc', 'cuda_cccl') }; runtime_path = @('~/.continuum/cuda-*/Library/bin') } 'build-core' = @{ order = 90; tier = 3; flags = @('dev'); accept = 'continuum-core-server.exe boots past the GPU-detection gate on the target device'; build = @{ features = 'cuda,load-dynamic-ort'; profile = 'release'; crt = 'static'; cmake_generator = 'Visual Studio 17 2022'; cuda_arch = '120'; msvc_host = 'vs2022' } } 'run' = @{ order = 100; tier = 3; accept = 'continuum-core-server binary present + serves TCP 9100' } diff --git a/tools/scripts/generated/manifest.windows.sh b/tools/scripts/generated/manifest.windows.sh index 12d66671e4..90ef542ad6 100644 --- a/tools/scripts/generated/manifest.windows.sh +++ b/tools/scripts/generated/manifest.windows.sh @@ -27,4 +27,4 @@ declare -A MOD_ARGS=() declare -A MOD_RUN=( ['gh-auth']='gh auth login --hostname github.com --git-protocol https --web' ['airc-firewall']='New-NetFirewallRule -DisplayName '\''airc daemon inbound (continuum grid)'\'' -Direction Inbound -Action Allow -Profile Any' ['manifest-gen']='cargo run -q -p manifest-gen' ) declare -A MOD_BUILD_FEATURES=( ['build-core']='cuda,load-dynamic-ort' ) declare -A MOD_BUILD_PROFILE=( ['build-core']='release' ) -declare -A MOD_RUNTIME_PATH=( ['cuda']='~/.continuum/cuda-*/Library/bin' ) +declare -A MOD_RUNTIME_PATH=( ['cmake']='~/.continuum/tools/cmake/bin' ['llvm-libclang']='~/.continuum/tools/llvm/bin' ['cuda']='~/.continuum/cuda-*/Library/bin' ) diff --git a/tools/scripts/install-manifest.toml b/tools/scripts/install-manifest.toml index 8648882a31..968d7c4e8c 100644 --- a/tools/scripts/install-manifest.toml +++ b/tools/scripts/install-manifest.toml @@ -159,6 +159,12 @@ formula = "cmake" [module.sources.linux] type = "apt" # run-verify pending on a linux node package = "cmake" +[module.runtime_path] +# The Windows archive installs to ~/.continuum/tools/cmake; its bin/ MUST be on +# PATH at BUILD time — the llama crate's build.rs shells out to `cmake` to compile +# vendored llama.cpp, and nvcc-free directml builds still need it. brew/apt already +# put cmake on PATH, so this is windows-only. [[windows-build-env-drift]] +windows = ["~/.continuum/tools/cmake/bin"] [[module]] id = "llvm-libclang" @@ -183,6 +189,11 @@ accept_macos = "test -f /Library/Developer/CommandLineTools/usr/lib/libclang.dyl type = "apt" # run-verify pending on a linux node package = "libclang-dev" accept_linux = "test -f /usr/lib/llvm-18/lib/libclang.so.1 || ldconfig -p | grep -q libclang" +[module.runtime_path] +# The Windows archive installs libclang.dll to ~/.continuum/tools/llvm/bin; on PATH +# so bindgen (llama crate) can load it at build time. mac/linux resolve libclang via +# system paths. [[windows-build-env-drift]] +windows = ["~/.continuum/tools/llvm/bin"] [[module]] id = "cuda" diff --git a/tools/scripts/shared/cargo-features.sh b/tools/scripts/shared/cargo-features.sh index e9615ebb9a..3089dfa6a6 100644 --- a/tools/scripts/shared/cargo-features.sh +++ b/tools/scripts/shared/cargo-features.sh @@ -59,7 +59,13 @@ case "$(uname -s)" in # top if Nvidia is present so ORT picks CUDA first (faster) + # DirectML stays as a co-listed EP for non-CUDA-supported ops. CARGO_GPU_FEATURES="--features directml" - if command -v nvidia-smi &>/dev/null; then + # candle-cuda's affine.cu compiles via nvcc, which needs the MSVC host + # compiler cl.exe on PATH (an active vcvars env). Only add cuda when cl.exe + # is actually reachable; otherwise nvcc fatals "Cannot find compiler + # 'cl.exe'" and the ENTIRE core build dies. directml needs no kernel + # compilation, so it stays as the universal Windows GPU EP and the build + # degrades gracefully instead of hard-failing. [[windows-build-env-drift]] + if command -v nvidia-smi &>/dev/null && command -v cl.exe &>/dev/null; then CARGO_GPU_FEATURES="--features cuda,directml" fi ;;