taichi icon indicating copy to clipboard operation
taichi copied to clipboard

Using GGUI with cuda backend fails with VMA assertion

Open jorge-ortega opened this issue 8 months ago • 2 comments

Describe the bug Using GGUI with cuda backend fails with VMA assertion.

To Reproduce

import taichi as ti

ti.init(arch=ti.cuda)

window = ti.ui.Window("GGUI Test", (800, 600))

Logs

$ python .\ggui_test.py
[Taichi] version 1.7.3, llvm 15.0.1, commit 5ec301be, win, python 3.10.11
[Taichi] Starting on arch=cuda
Assertion failed: pCreateInfo->vulkanApiVersion == 0 || (((uint32_t)(pCreateInfo->vulkanApiVersion) >> 22U) == 1 && (((uint32_t)(pCreateInfo->vulkanApiVersion) >> 12U) & 0x3FFU) <= 3), file C:\Users\buildbot\actions-runner\_work\taichi\taichi\external\VulkanMemoryAllocator\include\vk_mem_alloc.h, line 16039

jorge-ortega avatar Apr 17 '25 23:04 jorge-ortega

https://github.com/taichi-dev/taichi/issues/8630

3n3l avatar Apr 21 '25 10:04 3n3l

Just realized that all taichi/examples/ggui_examples/*.py are failing on my Linux box with the same assertion:

~/Depots/taichi/python/taichi/examples/ggui_examples$ python fem128_ggui.py 
[Taichi] version 1.7.3, llvm 15.0.4, commit 5ec301be, linux, python 3.12.9
[Taichi] Starting on arch=vulkan
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)

but, curiously, all the taichi/examples/simulations/*.py are working fine!

Image

~/Depots/taichi/python/taichi/examples/simulation$ python euler.py 
[Taichi] version 1.7.3, llvm 15.0.4, commit 5ec301be, linux, python 3.12.9
[Taichi] Starting on arch=cuda
/home/mdiaz/Depots/taichi/python/taichi/examples/simulation/euler.py:436: MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 and will be removed in 3.11. Use ``matplotlib.colormaps[name]`` or ``matplotlib.colormaps.get_cmap()`` or ``pyplot.get_cmap()`` instead.
  cmap = cm.get_cmap(cmap_name)

wme7 avatar May 22 '25 13:05 wme7