taichi icon indicating copy to clipboard operation
taichi copied to clipboard

GGUI compatibility issue with (maybe) Nvidia driver

Open dirypan opened this issue 7 months ago • 2 comments

Describe the bug

The bug appears to be the compatibility issue between GGUI, Vulkan and NVidia driver, since it happens after I switched from RTX 3090 ti with old driver to RTX 5080 with the latest driver.

To Reproduce

import taichi as ti
import taichi.ui as tiui

# 1. Initialize Taichi
ti.init(arch=ti.cuda, debug=True) # Or ti.vulkan, or let Taichi pick
print(f"Taichi initialized successfully with arch={ti.lang.impl.current_cfg().arch}")

# 2. GGUI (taichi.ui) Window Setup
window_title = "Minimal GGUI (taichi.ui) Test (RTX 50 series)"
window_resolution = (800, 600)
window = None

window = tiui.Window(window_title, res=window_resolution, vsync=True)

Log/Screenshots

$ python my_sample_code.py
[Taichi] version 1.7.3, llvm 15.0.1, commit 5ec301be, win, python 3.11.5
[Taichi] Starting on arch=cuda
Taichi initialized successfully with arch=Arch.cuda
Assertion failed: pCreateInfo->vulkanApiVersion == 0 || (((uint32_t)(pCreateInfo->vulkanApiVersion) >> 22U) == 1 && (((uint32_t)(pCreateInfo->vulkanApiVersion) >> 12U) & 0x3FFU) <= 3), file C:\Users\Administrator\actions-runner\_work\taichi\taichi\external\VulkanMemoryAllocator\include\vk_mem_alloc.h, line 16039
[E 05/19/25 21:46:02.013 321516] Received signal 22 (SIGABRT)


***********************************
* Taichi Compiler Stack Traceback *
***********************************
0x7ffbe3af78ed: taichi::Time::wait_until in taichi_python.cp311-win_amd64.pyd
0x7ffbe3ad2010: taichi::lang::Texture::get_device_allocation_ptr_as_int in taichi_python.cp311-win_amd64.pyd
0x7ffbe3ad1dc3: taichi::lang::Texture::get_device_allocation_ptr_as_int in taichi_python.cp311-win_amd64.pyd
0x7ffbe3ad261a: taichi::lang::Texture::get_device_allocation_ptr_as_int in taichi_python.cp311-win_amd64.pyd
0x7ffbe391fa1e: taichi::lang::Callable::pop_argpack_stack in taichi_python.cp311-win_amd64.pyd
0x7ffbe4c54c14: taichi::Logger::error in taichi_python.cp311-win_amd64.pyd
0x7ffbe3ad2752: taichi::lang::Texture::get_device_allocation_ptr_as_int in taichi_python.cp311-win_amd64.pyd
0x7ffd5ed6e6d5: raise in ucrtbase.dll
0x7ffd5ed6f6e1: abort in ucrtbase.dll
0x7ffd5ed7114a: get_wpgmptr in ucrtbase.dll
0x7ffd5ed7103d: get_wpgmptr in ucrtbase.dll
0x7ffd5ed712d1: wassert in ucrtbase.dll
0x7ffbe45d7d84: taichi::lang::vulkan::VulkanDevice::wait_idle in taichi_python.cp311-win_amd64.pyd
0x7ffbe4591da4: taichi::lang::vulkan::VulkanDevice::create_vma_allocator in taichi_python.cp311-win_amd64.pyd
0x7ffbe4597cf7: taichi::lang::vulkan::VulkanDevice::init_vulkan_structs in taichi_python.cp311-win_amd64.pyd
0x7ffbe452cbc1: taichi::lang::vulkan::VulkanDeviceCreator::VulkanDeviceCreator in taichi_python.cp311-win_amd64.pyd
0x7ffbe404f95b: taichi::ui::vulkan::SwapChain::write_image in taichi_python.cp311-win_amd64.pyd
0x7ffbe4054f91: taichi::ui::vulkan::AppContext::init_with_vulkan in taichi_python.cp311-win_amd64.pyd
0x7ffbe405b8b4: taichi::ui::vulkan::Renderer::init in taichi_python.cp311-win_amd64.pyd
0x7ffbe4042721: taichi::ui::vulkan::SceneV2::set_camera in taichi_python.cp311-win_amd64.pyd
0x7ffbe4041675: taichi::ui::vulkan::SceneV2::set_camera in taichi_python.cp311-win_amd64.pyd
0x7ffbe3c8d627: PyInit_taichi_python in taichi_python.cp311-win_amd64.pyd
0x7ffbe3c93c44: taichi::ui::vulkan::Gui::Gui in taichi_python.cp311-win_amd64.pyd
0x7ffbe3c61c2a: PyInit_taichi_python in taichi_python.cp311-win_amd64.pyd
0x7ffbe3ca886a: taichi::ui::VboHelpers::operator= in taichi_python.cp311-win_amd64.pyd
0x7ffbe3c5e364: PyInit_taichi_python in taichi_python.cp311-win_amd64.pyd
0x7ffbe3c58a00: PyInit_taichi_python in taichi_python.cp311-win_amd64.pyd
0x7ffbe3ca1101: taichi::ui::VboHelpers::operator= in taichi_python.cp311-win_amd64.pyd
0x7ffbe3c43e0f: PyInit_taichi_python in taichi_python.cp311-win_amd64.pyd
0x7ffbe3c3a4d4: taichi::Time::wait_until in taichi_python.cp311-win_amd64.pyd
0x7ffc576b5dac: PyObject_MakeTpCall in python311.dll
0x7ffc578643e7: PyThread_tss_is_created in python311.dll
0x7ffc57732c4b: PyObject_Call in python311.dll
0x7ffc576e94dd: PyObject_GetBuffer in python311.dll
0x7ffc576e884b: PyObject_GetBuffer in python311.dll
0x7ffbe3c42497: PyInit_taichi_python in taichi_python.cp311-win_amd64.pyd
0x7ffc576b6438: PyObject_MakeTpCall in python311.dll
0x7ffc576ba038: PyObject_Vectorcall in python311.dll
0x7ffc576bb894: PyEval_EvalFrameDefault in python311.dll
0x7ffc576eb064: PyFunction_Vectorcall in python311.dll
0x7ffc576e93ac: PyObject_GetBuffer in python311.dll
0x7ffc576b5cf2: PyObject_MakeTpCall in python311.dll
0x7ffc576ba038: PyObject_Vectorcall in python311.dll
0x7ffc576bb894: PyEval_EvalFrameDefault in python311.dll
0x7ffc576ddbc7: PyMapping_Check in python311.dll
0x7ffc576dd287: PyEval_EvalCode in python311.dll
0x7ffc5775bae6: PyUnicode_GetLength in python311.dll
0x7ffc5775ba62: PyUnicode_GetLength in python311.dll
0x7ffc5787a432: PyThread_tss_is_created in python311.dll
0x7ffc577b1081: PyRun_SimpleFileObject in python311.dll
0x7ffc577192cc: PyRun_AnyFileObject in python311.dll
0x7ffc5771979b: Py_MakePendingCalls in python311.dll
0x7ffc5771980b: Py_MakePendingCalls in python311.dll
0x7ffc57719e84: Py_RunMain in python311.dll
0x7ffc57719d15: Py_RunMain in python311.dll
0x7ffc577a7311: Py_Main in python311.dll
0x7ff6071c1230: Unknown Function in python.exe
0x7ffd5ff8259d: BaseThreadInitThunk in KERNEL32.DLL
0x7ffd6182af38: RtlUserThreadStart in ntdll.dll

Internal error occurred. Check out this page for possible solutions:
https://docs.taichi-lang.org/docs/install
...

Additional comments

[Taichi] version 1.7.3, llvm 15.0.1, commit 5ec301be, win, python 3.11.5

*******************************************
**      Taichi Programming Language      **
*******************************************

Docs:   https://docs.taichi-lang.org/
GitHub: https://github.com/taichi-dev/taichi/
Forum:  https://forum.taichi.graphics/

Taichi system diagnose:

python: 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)]
system: win32
executable: C:\Users\Deng Pan\AppData\Local\Programs\Python\Python311\python.exe
platform: Windows-10-10.0.22631-SP0
architecture: 64bit WindowsPE
uname: uname_result(system='Windows', node='Desk-13700', release='10', version='10.0.22631', machine='AMD64')
C:\Users\Deng Pan\AppData\Local\Programs\Python\Python311\Lib\site-packages\taichi\tools\diagnose.py:20: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
  print(f'locale: {".".join(locale.getdefaultlocale())}')
locale: en_US.cp936
PATH: C:\Program Files\PowerShell\7;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\ImageMagick-7.1.0-Q16-HDRI;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\ZeroTier\One\;C:\Program Files\Process Lasso\;C:\Program Files\nodejs\;C:\Program Files\Wolfram Research\WolframScript\;C:\Program Files\gs\gs10.00.0\bin;C:\Users\Deng Pan\AppData\Local\Programs\Python\Python311;C:\Users\Deng Pan\AppData\Local\Programs\Python\Python311\Scripts;C:\Program Files\Calibre2\;C:\Program Files\Git\cmd;C:\Program Files\MATLAB\R2024a\bin;C:\Program Files\MATLAB\R2023a\bin;C:\Users\Deng Pan\pdf2svg\dist-64bits;C:\Users\Deng Pan\Downloads\geckodriver-v0.34.0-win-aarch64;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\Deng Pan\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\Deng Pan\AppData\Local\Programs\Python\Python311\;C:\Users\Deng Pan\AppData\Local\Programs\Python\Launcher\;C:\texlive\2023\bin\windows;C:\Users\Deng Pan\AppData\Local\Microsoft\WindowsApps;C:\Users\Deng Pan\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Deng Pan\AppData\Roaming\npm;C:\Users\Deng Pan\AppData\Local\Pandoc\;C:\Users\Deng Pan\AppData\Local\julias\bin;C:\Users\Deng Pan\AppData\Local\GitHubDesktop\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files\NVIDIA Corporation\NVIDIA app\NvDLISR;C:\Program Files\PowerShell\7\;C:\Program Files\Apollo;C:\Program Files\Apollo\tools;C:\Users\Deng Pan\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\Deng Pan\AppData\Local\Programs\Python\Python311\;C:\Users\Deng Pan\AppData\Local\Programs\Python\Launcher\;C:\texlive\2023\bin\windows;C:\Program Files\ImageMagick-7.1.0-Q16-HDRI;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\ZeroTier\One\;C:\Program Files\Process Lasso\;C:\Program Files\nodejs\;C:\Program Files\Wolfram Research\WolframScript\;C:\Program Files\gs\gs10.00.0\bin;C:\Program Files\Calibre2\;C:\Program Files\Git\cmd;C:\Users\Deng Pan\AppData\Local\Microsoft\WindowsApps;C:\Users\Deng Pan\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Deng Pan\AppData\Roaming\npm;C:\Users\Deng Pan\AppData\Local\Pandoc\;C:\Users\Deng Pan\AppData\Local\julias\bin;C:\Users\Deng Pan\AppData\Local\GitHubDesktop\bin;C:\Users\Deng Pan\AppData\Local\Programs\cursor\resources\app\bin;c:\Users\Deng Pan\.vscode\extensions\ms-python.debugpy-2025.8.0-win32-x64\bundled\scripts\noConfigScripts;C:\Users\Deng Pan\AppData\Local\Programs\Python\Python311\Lib\site-packages\taichi\_lib
PYTHONPATH: ['C:\\Users\\Deng Pan\\AppData\\Local\\Programs\\Python\\Python311\\Scripts\\ti.exe', 'C:\\Users\\Deng Pan\\AppData\\Local\\Programs\\Python\\Python311\\python311.zip', 'C:\\Users\\Deng Pan\\AppData\\Local\\Programs\\Python\\Python311\\DLLs', 'C:\\Users\\Deng Pan\\AppData\\Local\\Programs\\Python\\Python311\\Lib', 'C:\\Users\\Deng Pan\\AppData\\Local\\Programs\\Python\\Python311', 'C:\\Users\\Deng Pan\\AppData\\Roaming\\Python\\Python311\\site-packages', 'C:\\Users\\Deng Pan\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages', 'C:\\Users\\Deng Pan\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\win32', 'C:\\Users\\Deng Pan\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\win32\\lib', 'C:\\Users\\Deng Pan\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\Pythonwin']

`lsb_release` not available: [WinError 2] The system cannot find the file specified


import: <module 'taichi' from 'C:\\Users\\Deng Pan\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\taichi\\__init__.py'>

cpu: True
metal: False
opengl: True
cuda: True
vulkan: True

`glewinfo` not available: [WinError 2] The system cannot find the file specified

Mon May 19 21:47:40 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 576.52                 Driver Version: 576.52         CUDA Version: 12.9     |
|-----------------------------------------+------------------------+----------------------+
| 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 5080      WDDM  |   00000000:01:00.0  On |                  N/A |
|  0%   50C    P0             47W /  360W |    1661MiB /  16303MiB |      1%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            8640    C+G   ...5n1h2txyewy\TextInputHost.exe      N/A      |
|    0   N/A  N/A           16144    C+G   C:\Windows\explorer.exe               N/A      |
|    0   N/A  N/A           19664    C+G   ...s\PowerToys.ColorPickerUI.exe      N/A      |
|    0   N/A  N/A           20616    C+G   ...__kzh8wxbdkxb8p\DCv2\DCv2.exe      N/A      |
|    0   N/A  N/A           27172    C+G   ...ef.win7x64\steamwebhelper.exe      N/A      |
|    0   N/A  N/A           27960    C+G   ...se 3 Host\Razer Synapse 3.exe      N/A      |
|    0   N/A  N/A          233836    C+G   ...t\Edge\Application\msedge.exe      N/A      |
|    0   N/A  N/A          272684    C+G   ...crosoft OneDrive\OneDrive.exe      N/A      |
|    0   N/A  N/A          312944    C+G   ...a\Local\Obsidian\Obsidian.exe      N/A      |
|    0   N/A  N/A          320492    C+G   ...ms\Microsoft VS Code\Code.exe      N/A      |
|    0   N/A  N/A          336000    C+G   ...acted\runtime\WeChatAppEx.exe      N/A      |
+-----------------------------------------------------------------------------------------+

[Taichi] version 1.7.3, llvm 15.0.1, commit 5ec301be, win, python 3.11.5

[Taichi] version 1.7.3, llvm 15.0.1, commit 5ec301be, win, python 3.11.5
[Taichi] Starting on arch=x64

[Taichi] version 1.7.3, llvm 15.0.1, commit 5ec301be, win, python 3.11.5
[Taichi] Starting on arch=opengl

[Taichi] version 1.7.3, llvm 15.0.1, commit 5ec301be, win, python 3.11.5
[Taichi] Starting on arch=cuda

[Taichi] version 1.7.3, llvm 15.0.1, commit 5ec301be, win, python 3.11.5

*******************************************
**      Taichi Programming Language      **
*******************************************

Docs:   https://docs.taichi-lang.org/
GitHub: https://github.com/taichi-dev/taichi/
Forum:  https://forum.taichi.graphics/

                                TAICHI EXAMPLES
+-----------------------------------------------------------------------------+
| 0: ad_gravity           | 25:                     | 50: patterns            |
|                         | karman_vortex_street    |                         |
| 1: circle_packing_image | 26: keyboard            | 51: pbf2d               |
| 2: comet                | 27: laplace             | 52: physarum            |
| 3: cornell_box          | 28: laplace_equation    | 53:                     |
|                         |                         | poisson_disk_sampling   |
| 4: diff_sph             | 29: mandelbrot_zoom     | 54: print_offset        |
| 5:                      | 30: marching_squares    | 55: rasterizer          |
| differential_evolution  |                         |                         |
| 6: euler                | 31: mass_spring_3d_ggui | 56: regression          |
| 7: eulerfluid2d         | 32: mass_spring_game    | 57: sdf_renderer        |
| 8: explicit_activation  | 33:                     | 58: simple_derivative   |
|                         | mass_spring_game_ggui   |                         |
| 9: export_mesh          | 34: mciso_advanced      | 59: simple_texture      |
| 10: export_ply          | 35: mgpcg               | 60: simple_uv           |
| 11: export_videos       | 36: mgpcg_advanced      | 61: snow_phaseField     |
| 12: fem128              | 37: minimal             | 62: stable_fluid        |
| 13: fem128_ggui         | 38: minimization        | 63: stable_fluid_ggui   |
| 14: fem99               | 39: mpm128              | 64: stable_fluid_graph  |
| 15: fractal             | 40: mpm128_ggui         | 65: taichi_bitmasked    |
| 16: fractal3d_ggui      | 41: mpm3d               | 66: taichi_dynamic      |
| 17: fullscreen          | 42: mpm3d_ggui          | 67: taichi_logo         |
| 18: game_of_life        | 43: mpm88               | 68: taichi_ngp          |
| 19: gui_image_io        | 44: mpm88_graph         | 69: taichi_sparse       |
| 20: gui_widgets         | 45: mpm99               | 70: texture_graph       |
| 21: implicit_fem        | 46:                     | 71: tutorial            |
|                         | mpm_lagrangian_forces   |                         |
| 22:                     | 47: nbody               | 72:                     |
| implicit_mass_spring    |                         | two_stream_instability  |
| 23:                     | 48: odop_solar          | 73: vortex_rings        |
| initial_value_problem   |                         |                         |
| 24: jacobian            | 49: oit_renderer        | 74: waterwave           |
+-----------------------------------------------------------------------------+
42
Running example minimal ...
[Taichi] Starting on arch=x64
42.0
>>> Running time: 0.21s

Consider attaching this log when maintainers ask about system information.

dirypan avatar May 20 '25 01:05 dirypan

same issue here, RTX5090 Driver version: 570.133.07
CUDA Version: 12.8
apiVersion = 1.4.303 (4210991)

[Taichi] version 1.7.3, llvm 15.0.4, commit 5ec301be, linux, python 3.12.3 [Taichi] Starting on arch=x64 python: /home/dev/taichi/external/VulkanMemoryAllocator/include/vk_mem_alloc.h:16039: VkResult vmaCreateAllocator(const VmaAllocatorCreateInfo * _Nonnull, VmaAllocator * _Nonnull): Assertion `pCreateInfo->vulkanApiVersion == 0 || (((uint32_t)(pCreateInfo->vulkanApiVersion) >> 22U) == 1 && (((uint32_t)(pCreateInfo->vulkanApiVersion) >> 12U) & 0x3FFU) <= 3)' failed. Aborted (core dumped)

junyiwuu avatar May 21 '25 18:05 junyiwuu

Same issue here, but on Quadro T500 Driver Version: 570.133.07 CUDA Version: 12.8

python ms.py 
[Taichi] version 1.7.3, llvm 15.0.4, commit 5ec301be, linux, python 3.12.9
[Taichi] Starting on arch=x64
python: /home/dev/taichi/external/VulkanMemoryAllocator/include/vk_mem_alloc.h:16039: VkResult vmaCreateAllocator(const VmaAllocatorCreateInfo * _Nonnull, VmaAllocator * _Nonnull): Assertion `pCreateInfo->vulkanApiVersion == 0 || (((uint32_t)(pCreateInfo->vulkanApiVersion) >> 22U) == 1 && (((uint32_t)(pCreateInfo->vulkanApiVersion) >> 12U) & 0x3FFU) <= 3)' failed.
Aborted (core dumped)

Caveat: On my old Macbook (no Metal) it still works, however with several deprecation warnings

python pd.py 
[Taichi] version 1.7.3, llvm 15.0.7, commit 5ec301be, osx, python 3.10.9
[Taichi] Starting on arch=arm64
RHI Error: Potential non-conformant Vulkan implementation, enabling VK_KHR_portability_subset
/Users/manuel/miniconda3/lib/python3.10/site-packages/taichi/ui/scene.py:443: DeprecationWarning: Instantiating ti.ui.Scene directly is deprecated, use the get_scene() function from a taichi.ui.Window object instead.
  warnings.warn(
Image

wme7 avatar May 23 '25 08:05 wme7