Windows 11, candle-kernels v0.9.2-alpha.2で
エラー
warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss
thread 'main' panicked at C:\Users\username\.cargo\git\checkouts\bindgen_cuda-327fc90ea2e55a67\19e33d0\src\lib.rs:404:13: nvcc error while compiling "src\\moe\\moe_wmma_gguf.cu":
が起き、ビルドが通らない
解決策
ダウングレードする
- candle-core = { git = "https://github.com/huggingface/candle.git", features = ["cuda"], version = "0.9.2-alpha.2" }
+ candle-core = { git = "https://github.com/huggingface/candle.git", features = ["cuda"], tag = "0.9.1" }
環境
- windows 11 25H2
- cargo 1.92.0 (344c4567c 2025-10-21)
- rustc 1.92.0 (ded5c06cf 2025-12-08)
備考
(OS側含め)細かい仕様や保存時の文字コードが変わった?
とりあえず動くようになったので細かい原因の追究は今後の課題ということで、、、
以下のようなエラーが出る
$ cargo build
Compiling candle-kernels v0.9.2-alpha.2 (https://github.com/huggingface/candle.git#a4ad7c79
)
warning: candle-kernels@0.9.2-alpha.2: Builder { cuda_root: Some("C:\\Program Files\\NVIDIA GP
U Computing Toolkit\\CUDA\\v12.6"), kernel_paths: ["src\\affine.cu", "src\\binary.cu", "src\\c
ast.cu", "src\\conv.cu", "src\\fill.cu", "src\\indexing.cu", "src\\moe\\moe_gguf.cu", "src\\mo
e\\moe_wmma.cu", "src\\moe\\moe_wmma_gguf.cu", "src\\quantized.cu", "src\\reduce.cu", "src\\so
rt.cu", "src\\ternary.cu", "src\\unary.cu"], watch: [], include_paths: ["src\\binary_op_macros
.cuh", "src\\compatibility.cuh", "src\\cuda_utils.cuh", "src\\moe\\gguf.cuh", "src\\moe\\moe_u
tils.cuh"], compute_cap: Some(86), out_dir: "C:\\Users\\username\\Documents\\rust\\mini-llm\\targ
et\\debug\\build\\candle-kernels-064d077d6139e19f\\out", extra_args: ["--expt-relaxed-constexp
r", "-std=c++17", "-O3", "--use_fast_math"] }
error: failed to run custom build command for `candle-kernels v0.9.2-alpha.2 (https://github.c
om/huggingface/candle.git#a4ad7c79)`
Caused by:
process didn't exit successfully: `C:\Users\username\Documents\rust\mini-llm\target\debug\build
\candle-kernels-5f9ba19f5e65c195\build-script-build` (exit code: 101)
--- stdout
cargo::rerun-if-changed=build.rs
cargo::rerun-if-changed=src/compatibility.cuh
cargo::rerun-if-changed=src/cuda_utils.cuh
cargo::rerun-if-changed=src/binary_op_macros.cuh
cargo:info=["/usr", "/usr/local/cuda", "/opt/cuda", "/usr/lib/cuda", "C:/Program Files/NVIDI
A GPU Computing Toolkit", "C:/CUDA"]
cargo:rerun-if-env-changed=CUDA_COMPUTE_CAP
cargo:rustc-env=CUDA_COMPUTE_CAP=86
cargo::warning=Builder { cuda_root: Some("C:\\Program Files\\NVIDIA GPU Computing Toolkit\\C
UDA\\v12.6"), kernel_paths: ["src\\affine.cu", "src\\binary.cu", "src\\cast.cu", "src\\conv.cu
", "src\\fill.cu", "src\\indexing.cu", "src\\moe\\moe_gguf.cu", "src\\moe\\moe_wmma.cu", "src\
\moe\\moe_wmma_gguf.cu", "src\\quantized.cu", "src\\reduce.cu", "src\\sort.cu", "src\\ternary.
cu", "src\\unary.cu"], watch: [], include_paths: ["src\\binary_op_macros.cuh", "src\\compatibi
lity.cuh", "src\\cuda_utils.cuh", "src\\moe\\gguf.cuh", "src\\moe\\moe_utils.cuh"], compute_ca
p: Some(86), out_dir: "C:\\Users\\username\\Documents\\rust\\mini-llm\\target\\debug\\build\\cand
le-kernels-064d077d6139e19f\\out", extra_args: ["--expt-relaxed-constexpr", "-std=c++17", "-O3
", "--use_fast_math"] }
cargo:rustc-env=CUDA_INCLUDE_DIR=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\in
clude
cargo:rerun-if-changed=src\binary_op_macros.cuh
cargo:rerun-if-changed=src\compatibility.cuh
cargo:rerun-if-changed=src\cuda_utils.cuh
cargo:rerun-if-changed=src\moe\gguf.cuh
cargo:rerun-if-changed=src\moe\moe_utils.cuh
cargo:rerun-if-env-changed=NVCC_CCBIN
cargo:rerun-if-changed=src\affine.cu
cargo:rerun-if-changed=src\moe\moe_wmma_gguf.cu
cargo:rerun-if-changed=src\conv.cu
cargo:rerun-if-changed=src\reduce.cu
cargo:rerun-if-changed=src\binary.cu
cargo:rerun-if-changed=src\moe\moe_wmma.cu
cargo:rerun-if-changed=src\ternary.cu
cargo:rerun-if-changed=src\fill.cu
cargo:rerun-if-changed=src\sort.cu
cargo:rerun-if-changed=src\cast.cu
cargo:rerun-if-changed=src\indexing.cu
cargo:rerun-if-changed=src\unary.cu
cargo:rerun-if-changed=src\moe\moe_gguf.cu
cargo:rerun-if-changed=src\quantized.cu
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\oaidl.h(812): error: expected
an identifier
600 = CC_MSCPASCAL,
^
1 error detected in the compilation of "src/moe/moe_wmma_gguf.cu".
moe_wmma_gguf.cu
--- stderr
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6/include\cuda.h(22252): warning C481
9: The file contains a character that cannot be represented in the current code page (932). Sa
ve the file in Unicode format to prevent data loss
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6/include\cuda.h(22958): warning C481
9: The file contains a character that cannot be represented in the current code page (932). Sa
ve the file in Unicode format to prevent data loss
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6/include\cub/warp/specializations/wa
rp_exchange_shfl.cuh(1): warning C4819: The file contains a character that cannot be represent
ed in the current code page (932). Save the file in Unicode format to prevent data loss
thread 'main' panicked at C:\Users\username\.cargo\git\checkouts\bindgen_cuda-327fc90ea2e55a67\
19e33d0\src\lib.rs:404:13:
nvcc error while compiling "src\\moe\\moe_wmma_gguf.cu":
# CLI "nvcc" "--gpu-architecture=sm_86" "--ptx" "--default-stream" "per-thread" "--output-di
rectory" "C:\\Users\\username\\Documents\\rust\\mini-llm\\target\\debug\\build\\candle-kernels-06
4d077d6139e19f\\out" "--expt-relaxed-constexpr" "-std=c++17" "-O3" "--use_fast_math" "-Isrc" "
-Isrc\\moe" "-IC:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.6\\include" "src\\mo
e\\moe_wmma_gguf.cu"
# stdout
# stderr
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace