NVlabs / instant-ngp

Instant neural graphics primitives: lightning fast NeRF and more
https://nvlabs.github.io/instant-ngp
Other
15.57k stars 1.89k forks source link

DLSS not working on RTX 3070Ti #1508

Closed Ali-Flt closed 4 months ago

Ali-Flt commented 5 months ago

I am building instant-ngp on Archlinux and I have installed all dependencies. But I get the warning WARNING Could not initialize Vulkan and NGX. DLSS not supported. (DLSS not available: NVSDK_NGX_Result_FAIL_FeatureNotFound) when running it. I know vulkan is installed because running vulkaninfo works. cmake version 3.28.2

I should mention that I applied this change: https://github.com/NVlabs/instant-ngp/issues/1372#issuecomment-1586179152 to resolve a build error.

Here is the build log:

$ cmake . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- The CUDA compiler identification is NVIDIA 12.3.103
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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: /usr/bin/c++ - 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: /opt/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Obtained CUDA architectures automatically from installed GPUs
-- Targeting CUDA architectures: 86
-- Module support is disabled.
-- Version: 9.1.1
-- Build type: RelWithDebInfo
-- Found Vulkan: /lib/libvulkan.so (found version "1.3.276") found components: glslc glslangValidator
CMake Deprecation Warning at dependencies/OpenXR-SDK/CMakeLists.txt:24 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Warning (dev) at dependencies/OpenXR-SDK/CMakeLists.txt:27 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.11.6", minimum required is "3")
-- Performing Test HAVE_FILESYSTEM_WITHOUT_LIB
-- Performing Test HAVE_FILESYSTEM_WITHOUT_LIB - Failed
-- Performing Test HAVE_FILESYSTEM_NEEDING_LIBSTDCXXFS
-- Performing Test HAVE_FILESYSTEM_NEEDING_LIBSTDCXXFS - Success
-- Performing Test HAVE_FILESYSTEM_NEEDING_LIBCXXFS
-- Performing Test HAVE_FILESYSTEM_NEEDING_LIBCXXFS - Failed
-- Found OpenGL: /usr/lib/libOpenGL.so
-- Enabling OpenGL support
-- Enabling Vulkan support
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found JsonCpp: /usr/include
-- Presentation backend selected for hello_xr, loader_test, conformance: xlib
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.1.0")
-- Checking for one of the modules 'xcb;xcb-glx'
-- Checking for one of the modules 'wayland-client'
-- BUILD_WITH_XLIB_HEADERS: ON
-- BUILD_WITH_XCB_HEADERS: OFF
-- BUILD_WITH_WAYLAND_HEADERS: OFF
-- Found glslc: /usr/bin/glslc
-- Looking for secure_getenv
-- Looking for secure_getenv - found
-- Looking for __secure_getenv
-- Looking for __secure_getenv - not found
-- Looking for timespec_get
-- Looking for timespec_get - found
-- Found and will use pre-generated xr_generated_dispatch_table.h in source tree
-- Found and will use pre-generated xr_generated_dispatch_table.c in source tree
-- Performing Test SUPPORTS_Wall
-- Performing Test SUPPORTS_Wall - Success
-- Performing Test SUPPORTS_C_Wall
-- Performing Test SUPPORTS_C_Wall - Success
-- Performing Test SUPPORTS_Werrorunusedparameter
-- Performing Test SUPPORTS_Werrorunusedparameter - Success
-- Performing Test SUPPORTS_C_Werrorunusedparameter
-- Performing Test SUPPORTS_C_Werrorunusedparameter - Success
-- Performing Test SUPPORTS_Werrorunusedargument
-- Performing Test SUPPORTS_Werrorunusedargument - Failed
-- Performing Test SUPPORTS_C_Werrorunusedargument
-- Performing Test SUPPORTS_C_Werrorunusedargument - Failed
-- Performing Test SUPPORTS_Wpointerarith
-- Performing Test SUPPORTS_Wpointerarith - Success
-- Performing Test SUPPORTS_C_Wpointerarith
-- Performing Test SUPPORTS_C_Wpointerarith - Success
-- Found and will use pre-generated xr_generated_loader.hpp in source tree
-- Found and will use pre-generated xr_generated_loader.cpp in source tree
-- Using X11 for window creation
-- Found GLEW: /usr/include (found version "2.2.0")
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Found Python: /usr/bin/python3.11 (found suitable version "3.11.6", minimum required is "3.7") found components: Interpreter Development Development.Module Development.Embed
CMake Deprecation Warning at dependencies/pybind11/CMakeLists.txt:8 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- pybind11 v2.10.1
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found ZLIB: /usr/lib/libz.so (found suitable version "1.3.1", minimum required is "1.2.3")
-- zstr - found ZLIB (version: 1.3.1)
-- zstr - added INTERFACE target 'zstr::zstr'
          includes : /home/ali/git/instant-ngp/dependencies/zstr/src;/usr/include
          libraries: ZLIB::ZLIB
          features : cxx_std_11
-- Configuring done (5.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/ali/git/instant-ngp/build
$ vulkaninfo --summary
==========
VULKANINFO
==========

Vulkan Instance Version: 1.3.276

Instance Extensions: count = 23
-------------------------------
VK_EXT_acquire_drm_display             : extension revision 1
VK_EXT_acquire_xlib_display            : extension revision 1
VK_EXT_debug_report                    : extension revision 10
VK_EXT_debug_utils                     : extension revision 2
VK_EXT_direct_mode_display             : extension revision 1
VK_EXT_display_surface_counter         : extension revision 1
VK_EXT_surface_maintenance1            : extension revision 1
VK_EXT_swapchain_colorspace            : extension revision 4
VK_KHR_device_group_creation           : extension revision 1
VK_KHR_display                         : extension revision 23
VK_KHR_external_fence_capabilities     : extension revision 1
VK_KHR_external_memory_capabilities    : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2         : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2       : extension revision 1
VK_KHR_portability_enumeration         : extension revision 1
VK_KHR_surface                         : extension revision 25
VK_KHR_surface_protected_capabilities  : extension revision 1
VK_KHR_wayland_surface                 : extension revision 6
VK_KHR_xcb_surface                     : extension revision 6
VK_KHR_xlib_surface                    : extension revision 6
VK_LUNARG_direct_driver_loading        : extension revision 1

Instance Layers: count = 8
--------------------------
VK_LAYER_KHRONOS_validation       Khronos Validation Layer     1.3.275  version 1
VK_LAYER_MANGOAPP_overlay         Mangoapp Layer               1.3.0    version 1
VK_LAYER_MANGOHUD_overlay_x86_64  Vulkan Hud Overlay           1.3.0    version 1
VK_LAYER_NV_optimus               NVIDIA Optimus layer         1.3.260  version 1
VK_LAYER_VALVE_steam_fossilize_32 Steam Pipeline Caching Layer 1.3.207  version 1
VK_LAYER_VALVE_steam_fossilize_64 Steam Pipeline Caching Layer 1.3.207  version 1
VK_LAYER_VALVE_steam_overlay_32   Steam Overlay Layer          1.3.207  version 1
VK_LAYER_VALVE_steam_overlay_64   Steam Overlay Layer          1.3.207  version 1

Devices:
========
GPU0:
    apiVersion         = 1.3.260
    driverVersion      = 545.29.6.0
    vendorID           = 0x10de
    deviceID           = 0x2482
    deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
    deviceName         = NVIDIA GeForce RTX 3070 Ti
    driverID           = DRIVER_ID_NVIDIA_PROPRIETARY
    driverName         = NVIDIA
    driverInfo         = 545.29.06
    conformanceVersion = 1.3.6.0
    deviceUUID         = fc3e6d72-fd43-3b6a-4d5b-95e87d495b8d
    driverUUID         = 468717c2-5245-5d6d-9401-72b8a4ff98e5
Tom94 commented 4 months ago

Hi, does running ./build/instant-ngp instead of ./instant-ngp work? In my quick testing, it seems that DLSS wants libnvidia-ngx-dlss.so.2.4.0 to be in the directory of the application binary, which is ./build. I'll push a fix shortly -- Windows is not affected, because the corresponding share library (.dll) is already present in the root dir after build.

Ali-Flt commented 4 months ago

@Tom94 Thanks Thomas that did the trick. Closing this as completed.

Also, can you please check out https://github.com/NVlabs/instant-ngp/issues/1372#issuecomment-1586179152? Based on this comment this change is required for instant-ngp to build successfully (which was true in my case):

index fc9b899..83e2242 100644
--- a/include/neural-graphics-primitives/testbed.h
+++ b/include/neural-graphics-primitives/testbed.h
@@ -877,8 +877,8 @@ public:
                } training = {};

                // tracing state
-               GPUMemory<vec3> pos[2] = {};
-               GPUMemory<VolPayload> payload[2] = {};
+               GPUMemory<vec3> pos[2] = {{}, {}};
+               GPUMemory<VolPayload> payload[2] = {{}, {}};
                GPUMemory<uint32_t> hit_counter = {};
                GPUMemory<vec4> radiance_and_density;
        } m_volume;
Tom94 commented 4 months ago

Thanks for confirming.

Yeah, I've seen the other issue linked early today and already pushed the change -- it's strange that it doesn't happen on any machine I usually test on, including GitHub's automatic builds with a variety of Linux, Windows, and CUDA versions.