You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

编译Instant-NGP时CMake报错,咨询是否有预编译版本

编译Instant-NGP时CMake报错的解决办法及预编译版本咨询

问题描述

我并非开发者,只是想尝试NERF技术。在编译Instant-NGP时执行cmake . -B build命令后出现报错,已安装的环境如下:

  • Visual Studio 2019
  • CUDA Toolkit 11.6
  • CMake 3.22
  • Python 3.10
  • Optix 7.6

具体报错日志:

C:\NGP\instant-ngp>cmake . -B build
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.29.30147.0
-- The CXX compiler identification is MSVC 19.29.30147.0
-- The CUDA compiler identification is NVIDIA 11.6.124
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/bin/nvcc.exe - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- **Obtained CUDA architectures automatically from installed GPUs**
**CMake Error: The source directory "SOURCES/CMakeFiles/CMakeTmp" does not exist.**
Specify --help for usage, or press the help button on the CMake GUI.
CMake Error at dependencies/tiny-cuda-nn/CMakeLists.txt:107 (try_run):
  Failed to configure test project build system.
Call Stack (most recent call first):
  dependencies/tiny-cuda-nn/CMakeLists.txt:146 (TCNN_AUTODETECT_CUDA_ARCHITECTURES)


-- Configuring incomplete, errors occurred!
See also "C:/NGP/instant-ngp/build/CMakeFiles/CMakeOutput.log".

咨询问题:

  1. 该报错的解决办法是什么?
  2. 是否可以下载已编译完成的Instant-NGP版本?

解决方案

报错修复步骤

针对CMake Error: The source directory "SOURCES/CMakeFiles/CMakeTmp" does not exist报错,可按以下方式处理:

  • 手动指定CUDA架构:报错源于自动检测GPU架构时临时目录生成失败,直接在CMake命令中指定你的GPU对应架构即可。比如RTX 30系列(架构8.6)执行:
    cmake . -B build -DCMAKE_CUDA_ARCHITECTURES=86
    
    常见GPU架构对应:RTX 20系列为75,RTX 40系列为89,可根据自身GPU型号调整。
  • 清理build目录:删除C:\NGP\instant-ngp\build文件夹,重新执行CMake命令,避免残留配置干扰。
  • 管理员权限运行命令行:右键命令提示符选择「以管理员身份运行」后再执行编译命令,解决权限不足导致的目录生成问题。

预编译版本说明

Instant-NGP提供官方预编译的Windows版本,无需自行编译,解压后即可直接运行,适合非开发者快速体验NERF技术。

内容的提问来源于stack exchange,提问作者Juri

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 15:05:20