pieces-app / support

16 stars 3 forks source link

Copilot not detecting GPU #124

Closed poldpold closed 6 months ago

poldpold commented 6 months ago

Software

Desktop Application

Operating System

Linux

Your Pieces OS Version

8.0.1

Kindly describe the bug and include as much detail as possible on what you were doing so we can reproduce the bug.

I have just made a first install of Pieces for Developers 2.10.1 and Pieces OS 8.0.1 on Ubuntu 22.04.1.

In Copilot, Mistral 7B GPU can be downloaded, and is installed apparently correctly. However, when I try to use it, it gives a mysterious error message in the Pieces app:

2024-03-13_1314_1

Using the VSCode plugin results in the same error, but the error message gives slightly more detail, apparently the GPU is not correctly handled.

2024-03-13_1313

For information, there is a likely compatible GPU and enough memory available.

2024-03-13_1314

The CPU version of Mistral runs correctly. Llama GPU displays an equivalent error.

brian-pieces commented 6 months ago

Hey @poldpold sorry to hear you're having this problem. We typically see this error when there's an issue with the Vulkan API that we use to communicate with your GPU.

If you don't mind, please run the command vulkaninfo in your terminal and report the results. The resulting log is very long but the first 20 lines or so is usually sufficient to detect a problem. Thanks and sorry again for the issue!

poldpold commented 6 months ago

Glad to help. This is what I get at the beginning, happy to post the rest if it helps:

WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Failed to CreateInstance in ICD 3.  Skipping ICD.
==========
VULKANINFO
==========

Vulkan Instance Version: 1.3.204

Instance Extensions: count = 20
===============================
    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_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_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
brian-pieces commented 6 months ago

Yeah definitely something funky with Vulkan. The whole log would be great! It might be too long to share in GH comments, so feel free to email it to be at brian@pieces.app

poldpold commented 6 months ago

I'll try to keep everything in one place, let me try to attached the log file here: poldpold.log

brian-pieces commented 6 months ago

Alright I have two initial thoughts here:

1) Your Vulkan Instance Version is slightly behind my own (1.3.204 vs 1.3.261) which could indicate that your NVIDIA drivers are out of date. Updating your drivers could possibly resolve this.

2) It looks like Steam has injected some layers into Vulkan. There's no error in vulkaninfo, but I was able to help a user resolve a similar problem where Twitch was injecting layers and a simple update to Twitch fixed it.

poldpold commented 6 months ago

As for the drivers, I have the latest (550.54.14) available to install through the procedure in NVIDIA's guide: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/ .

I have temporarily uninstalled Steam, but that didn't help. Apparently uninstalling Steam does not clean up its Vulkan layers. Following the post https://www.reddit.com/r/vulkan/comments/pecoh6/remove_steams_vulkan_layers/ I installed vkconfig and disabled the Steam layers. That didn't change the behavior either.

brian-pieces commented 6 months ago

Thanks for checking both of those out. At this point I think I'll need to do some in-depth debugging with our Linux build and get back to you.

We'll hopefully be moving away from the Vulkan API soon anyway and use CUDA when possible. Vulkan is a nice generalized solution to target AMD and NVIDIA GPUs on Linux and Windows but it's proving a bit buggy. We should see some serious performance gains with CUDA as well.

Sorry again you're having having this problem. I'll let you know when I have a solution!

poldpold commented 6 months ago

Ok, thanks @brian-pieces! Feel free to close this issue with a status you see appropriate. Hey, at least I can install Baldur’s Gate 3 again (by way of Steam)!