windows 11 下让 特斯拉 V100 32G 显卡真正跑起来!
Ollama + Tesla V100(Windows)部署完整手册
Ollama + Tesla V100 (Windows) Complete Deployment Manual
目标环境 / Target Environment
| 项目 / Item | 值 / Value |
|---|---|
| 操作系统 / OS | Windows 10/11 x64 或 Windows Server |
| 显卡 / GPU | Tesla V100-SXM2-32GB,TCC(专用于计算)模式 |
| 后端 / Backend | CUDA 12 |
| 模型 / Model | qwen3.6:35b-a3b(26 GB,全量入显存) |
| 程序目录 / Install dir | C:\Users\Administrator\AppData\Local\Programs\Ollama |
第一部分 排障结论回顾
Part 1 Retrospective of the Troubleshooting
1.1 问题现象 / Symptom
原始现象为 Ollama 在 Tesla V100 上无法使用 GPU,后端进程崩溃并返回 0xc0000005,最终回退至 CPU 推理。
The original symptom was that Ollama could not use the GPU on a Tesla V100; backend processes crashed with 0xc0000005 and inference fell back to CPU.
排查范围集中在三个方向:Windows 驱动层拦截、CUDA 运行库缺失、环境变量强制指定后端。
The investigation covered three directions: Windows driver-level blocking, missing CUDA runtime libraries, and environment variables forcing a backend.
1.2 确认的两项成因 / Two Confirmed Causes
成因一:Windows 的“易受攻击的驱动程序阻止列表”在内核态拦截 GPU 运行库加载,触发崩溃。
Cause 1: the Windows vulnerable driver blocklist intercepted GPU runtime library loading at kernel level and triggered the crash.
对应修复为将 VulnerableDriverBlocklistEnable 设为 0x0,并重启系统。
The corresponding fix is setting VulnerableDriverBlocklistEnable to 0x0 and rebooting.
成因二:llama-server.exe 不会从 cuda_v12 子目录自动加载运行库,缺库时表现为不崩溃但设备列表为空。
Cause 2: llama-server.exe does not auto-load libraries from the cuda_v12 subdirectory; the missing-library symptom is no crash but an empty device list.
对应修复为执行 copy cuda_v12*.dll .,将运行库复制到程序根目录。
The corresponding fix is running copy cuda_v12*.dll . to place the runtime libraries in the program root.
1.3 被排除的因素 / Factors Ruled Out
OLLAMA_LLM_LIBRARY 与 OLLAMA_VULKAN 在 User 级实测为空,与该故障无因果关系,无需设置。
OLLAMA_LLM_LIBRARY and OLLAMA_VULKAN were measured empty at User level and have no causal relation to the failure; they need not be set.
Vulkan 后端在 TCC 模式的 V100 上不可用属于预期行为,因为该模式不提供图形栈。
The Vulkan backend being unavailable on a V100 in TCC mode is expected behaviour, since that mode provides no graphics stack.
日志中 native_probe_windows.go 产生的 0xc0000005 为 Ollama 内嵌探测代码的无害崩溃,已被降级处理。
The 0xc0000005 from native_probe_windows.go in logs is a harmless crash of Ollama's internal probe code and has been degraded.
1.4 验证结果 / Verification Result
重启后在不存在任何相关环境变量的条件下,qwen3.6:35b-a3b 以 26 GB 占用、100% GPU 运行,context 为 8192。
After reboot, with no related environment variables present, qwen3.6:35b-a3b ran at 26 GB, 100% GPU, with context 8192.
有效判定依据为 ollama ps 输出的 PROCESSOR 列,GPU 利用率截图不足以单独作为证据。
The valid criterion is the PROCESSOR column of ollama ps; a GPU utilization screenshot alone is insufficient evidence.
1.5 必要配置清单 / Required Configuration List
| 配置项 / Item | 值或位置 / Value or Location | 作用 / Role |
|---|---|---|
| VulnerableDriverBlocklistEnable | HKLM\SYSTEM\CurrentControlSet\Control\CI\Config = 0x0 | 真凶,关闭后崩溃消失 / root cause, crash disappears |
| ggml-cuda.dll 等运行库 | lib\ollama 根目录(手动 copy) | 必要,缺失则设备列表为空 / required, else empty device list |
1.6 维护结论 / Maintenance Conclusions
已复制到程序根目录的 DLL 属于当前环境的必要组成,不应删除。
The DLLs copied into the program root are a necessary part of the current environment and should not be deleted.
0.40 版本的更新内容对该场景无实际收益,且升级可能清除手动拷贝的 DLL,因此暂不升级。
The 0.40 update brings no practical benefit to this scenario and an upgrade may remove the manually copied DLLs, so upgrading is deferred.
若故障复发,首先检查注册表键值是否被系统更新重置为 0x1。
If the failure recurs, first check whether a system update reset the registry value to 0x1.
第二部分 显卡驱动安装
Part 2 GPU Driver Installation
2.1 选择驱动分支 / Select the Driver Branch
Tesla V100 属于数据中心计算卡,应下载 Data Center / Tesla 分支驱动。
The Tesla V100 is a data-center compute card, so the Data Center / Tesla driver branch should be downloaded.
GeForce Game Ready 驱动面向消费级显卡,在计算卡上稳定性不足,不应使用。
The GeForce Game Ready driver targets consumer cards and lacks stability on compute cards, so it must not be used.
在 NVIDIA 驱动下载页按产品类型 Data Center / Tesla、产品家族 Tesla V100 系列、操作系统进行筛选。
On the NVIDIA download page, filter by product type Data Center / Tesla, product family Tesla V100 series, and the operating system.
V100 为 Volta 架构,计算能力 7.0,与 CUDA 12.x 配合使用。
The V100 is Volta architecture with compute capability 7.0, paired with CUDA 12.x.
2.2 驱动版本建议 / Driver Version Recommendation
建议使用 570 及以上的数据中心驱动,例如 573 或 576 的 data-center-tesla-desktop 版本。
A data-center driver of 570 or later is recommended, for example the 573 or 576 data-center-tesla-desktop build.
Ollama 0.30 及以上依赖较新的 CUDA Runtime,576 驱动已验证可用,551 驱动容易出现 CUDA 初始化失败。
Ollama 0.30+ depends on a newer CUDA Runtime; driver 576 is verified working while 551 often fails CUDA initialization.
版本存在上限:R580 是最后一个支持 Volta 架构的驱动分支,此后不再提供常规更新。
There is an upper bound: R580 is the last driver branch supporting Volta, with no regular updates afterwards.
此后 Volta 仅按季度接收安全更新,计划持续至 2028 年 10 月。
Afterwards Volta only receives quarterly security updates, planned through October 2028.
因此不宜盲目追新,宜选取已验证稳定的版本并长期冻结。
Therefore the newest version should not be chased blindly; a verified stable release should be chosen and frozen.
2.3 安装前准备 / Preparation Before Installation
V100 默认处于 TCC 模式,该模式无显示输出,桌面需由集显或另一张亮机卡提供。
The V100 defaults to TCC mode, which has no display output, so the desktop must be driven by an iGPU or a spare display card.
切换模式前需确认存在可用显示输出,否则可能出现黑屏。
Before switching modes, an available display output must be confirmed, otherwise a black screen may occur.
目标机器保持默认 TCC 模式即可,无需为任务管理器可见而切换至 WDDM。
The target machine should keep the default TCC mode; switching to WDDM for Task Manager visibility is unnecessary.
安装驱动前应先完成系统更新,并确认供电与散热正常。
System updates should be applied first, and power delivery and cooling confirmed sound before installing the driver.
2.4 安装驱动 / Install the Driver
以管理员身份运行下载完成的 .exe 安装包。
Run the downloaded .exe installer as Administrator.
选择自定义安装,并勾选执行清洁安装,以避免旧驱动残留引发冲突。
Select Custom installation and tick Perform a clean installation to avoid conflicts from leftover files.
安装完成后重启系统。
Reboot the system after installation completes.
# 示例:以管理员运行安装程序 / Example: run installer as admin
.\576.xx-data-center-tesla-desktop-win10-win11-64bit-dch-international.exe
遇到的坑
一、让 V100 跑起来的两项必要配置(缺一不可)
| 配置项 | 值 / 位置 | 作用 |
|---|---|---|
注册表 VulnerableDriverBlocklistEnable |
HKLM\SYSTEM\CurrentControlSet\Control\CI\Config = 0x0 |
真凶。关掉后 0xc0000005 崩溃消失 |
| 手动拷贝的 CUDA 运行库 | lib\ollama\ 根目录下的 ggml-cuda.dll 等(由 copy cuda_v12\*.dll . 产生) |
必要。缺了会"不崩但枚举空列表"→回退 CPU |
设置命令(新机器复现时用):
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CI\Config" /v VulnerableDriverBlocklistEnable /t REG_DWORD /d 0 /f
然后重启。
二、被证明无关、可彻底忽略的项
OLLAMA_LLM_LIBRARY/OLLAMA_VULKAN:实测 User 级为空,不影响结果,不需要设。- Vulkan 后端:TCC 模式的 V100 不支持图形栈,不可用是预期行为。
- 日志里
native_probe_windows.go的 0xc0000005:Ollama 内嵌探测代码的无害崩溃,已降级,不影响推理。
三、维护提醒
- 拷贝的 DLL 别删——它是环境必要组成。真要验证是否多余,删后立刻
ollama run qwen3.6:35b-a3b+ollama ps复测,回退就copy cuda_v12\*.dll .放回。 - 0.40 暂不升——更新内容对你零收益,且升级可能重建
lib\ollama、清掉那份 DLL。升级后第一件事就是跑ollama ps确认仍100% GPU,空列表就重新 copy。 - 接显示器无信号是正常的——TCC 模式不支持画面输出,别当故障排查。
四、复发时的快速自检(崩溃 + 回退 CPU 时按序执行)
最常见的复发诱因:Windows 更新或组策略把阻止列表改回了 0x1。
# 1. 先看真凶键值有没有被改回 0x1
reg query "HKLM\SYSTEM\CurrentControlSet\Control\CI\Config" /v VulnerableDriverBlocklistEnable
# 若不是 0x0 → 改回 0x0 并重启,多半就好
# 2. 看拷贝的 DLL 还在不在
dir "C:\Users\Administrator\AppData\Local\Programs\Ollama\lib\ollama\ggml-cuda.dll"
# 若不在 → copy cuda_v12\*.dll .
# 3. 确认 GPU 落地
ollama run qwen3.6:35b-a3b
ollama ps # PROCESSOR 列 = 100% GPU 才算通
五、当前已验证的健康状态
- 重启后、无任何环境变量下:
qwen3.6:35b-a3b,26GB,100% GPU,context 8192 ✅ - 使用模式:专用于计算(TCC)✅;ECC:已启用 ✅

浙公网安备 33010602011771号