You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the mistral.rs Rust API in a Tauri project, and can't seem to figure out how to solve these linking issues on Windows.
Minimum reproducible example
Initialize a basic Tauri v2 boilerplate project and add mistralrs = { git = "https://github.com/EricLBuehler/mistral.rs.git", tag = "v0.4.0", features= ["cuda"] } to [dependencies]. Note that compiling without cuda works. cudnn without cuda links, but fails at runtime when allocating memory with Error: Cannot get memory available for CUDA device (persumably, using cudnn without cuda makes no sense).
This is using cargo build --release but we get the same error with yarn tauri dev --release or similar wrappers. My hunch is that the problem is caused by the fact that Tauri uses dynamic linking, but something deep in mistral.rs' dependencies uses static linking.
Error
= note: mistralrscuda.lib(nonzero_bitwise-b50867152df76f01.o) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in libort_sys-ec47b9c63efbfefc.rlib(onnxruntime_c_api.obj)␍
mistralrsquant.lib(hqq-65c761548d7d80ee.o) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in libort_sys-ec47b9c63efbfefc.rlib(onnxruntime_c_api.obj)␍
mistralrsquant.lib(q_gemm-345bd0534e99ab2c.o) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in libort_sys-ec47b9c63efbfefc.rlib(onnxruntime_c_api.obj)␍
mistralrsquant.lib(marlin_kernel-732a0a250e9ce762.o) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in libort_sys-ec47b9c63efbfefc.rlib(onnxruntime_c_api.obj)␍
mistralrsquant.lib(ops-bb2b0be21ca2c8a0.o) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in libort_sys-ec47b9c63efbfefc.rlib(onnxruntime_c_api.obj)␍
mistralrsquant.lib(dequant-a0365c5f007be6d0.o) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in libort_sys-ec47b9c63efbfefc.rlib(onnxruntime_c_api.obj)␍
Other information
Please specify:
Operating system: Windows
λ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Fri_Jun_14_16:44:19_Pacific_Daylight_Time_2024
Cuda compilation tools, release 12.6, V12.6.20
Build cuda_12.6.r12.6/compiler.34431801_0
λ nvidia-smi
Thu Feb 13 14:44:32 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 566.36 Driver Version: 566.36 CUDA Version: 12.7 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3090 Ti WDDM | 00000000:01:00.0 On | Off |
| 0% 51C P8 28W / 450W | 1173MiB / 24564MiB | 16% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
Latest commit or version
f1a56f6 (v0.4.0)
The text was updated successfully, but these errors were encountered:
I'm trying to use the mistral.rs Rust API in a Tauri project, and can't seem to figure out how to solve these linking issues on Windows.
Minimum reproducible example
Initialize a basic Tauri v2 boilerplate project and add
mistralrs = { git = "https://github.com/EricLBuehler/mistral.rs.git", tag = "v0.4.0", features= ["cuda"] }
to[dependencies]
. Note that compiling withoutcuda
works.cudnn
withoutcuda
links, but fails at runtime when allocating memory withError: Cannot get memory available for CUDA device
(persumably, usingcudnn
withoutcuda
makes no sense).This is using
cargo build --release
but we get the same error withyarn tauri dev --release
or similar wrappers. My hunch is that the problem is caused by the fact that Tauri uses dynamic linking, but something deep in mistral.rs' dependencies uses static linking.Error
Other information
Please specify:
Latest commit or version
f1a56f6
(v0.4.0)The text was updated successfully, but these errors were encountered: