Persistent Vulkan API Version Assertion (pCreateInfo->vulkanApiVersion == 0) with ti.ui.Window on Windows (Affects both GPU and CUDA backends)
Describe the bug
When attempting to create a ti.ui.Window using taichi.ui module, the program consistently crashes with an Assertion failed: pCreateInfo->vulkanApiVersion == 0 error. This occurs even when the TI_UI_ENABLE_OPENGL=1 environment variable is explicitly set, indicating a preference for OpenGL backend. Crucially, this issue persists regardless of whether ti.init(arch=ti.gpu) or ti.init(arch=ti.cuda) is used for the computation backend. The error originates from the VulkanMemoryAllocator component within Taichi's external dependencies.
To Reproduce
-
Ensure Python [3.10.11] is installed.
-
Create a Python virtual environment (e.g., using
python -m venv .venv). -
Activate the virtual environment.
-
Set the environment variable
TI_UI_ENABLE_OPENGL=1for the run configuration. (This was set in PyCharm's "Run Configurations" for the script). -
Install Taichi and NumPy:
pip install taichi==[VERSION_1.6.0] numpy -
Run the following minimal example Python code:
import taichi as ti ti.init(arch=ti.cuda) # OR ti.init(arch=ti.gpu). Both produce the error. window = ti.ui.Window("My Window", (512, 512)) canvas = window.get_canvas() while window.running: canvas.set_background_color((0.1, 0.2, 0.3)) # Example background window.show()
expected behavior:
A ti.ui.Window should open successfully, displaying a blank window with the specified background color.
Log/Screenshots The program crashes immediately upon execution. The console output shows the following assertion error: A s s e r t i o n f a i l e d : p C r e a t e I n f o - > v u l k a n A p i V e r s i o n = = 0 | | ( ( ( u i n t 3 2 _ t ) ( p C r e a t e I n f o - > v u l k a n A p i V e r s i o n ) > > 2 2 U ) = = 1 & & ( ( ( u i n t 3 2 _ t ) ( p C r e a t e I n f o - > v u l k a n A p i V e r s i o n ) > > 1 2 U ) & 0 x 3 F F U ) < = 3 ) , f i l e C : \ U s e r s \ b u i l d b o t \ a c t i o n s - r u n n e r \ _ w o r k \ t a i c h i \ t a i c h i \ e x t e r n a l \ V u l k a n M e m o r y A l l o c a t o r \ i n c l u d e \ v k _ m e m _ a l l o c . h , l i n e 1 6 0 3 9
Additional comments Environment
- OS: Windows [Your Windows 11 Home Single Language]
- Python version: 3.10.11]. (Also tried 3.12..10 previously).
- Taichi version: 1.6.0. (Also tried 1.7.3 and 1.7.2 previously).
- Graphics card: [NVIDIA GeForce RTX 3060 Laptop GPU**]
- Graphics driver version: [32.0.15.7652]
- CUDA version: [cuda_12.9.r12.9/compiler.35813241_0]
-
TI_UI_ENABLE_OPENGLstatus: Set to1as an environment variable in the run configuration. - IDE used: PyCharm [2025.1.1.1]
-
Additional Notes: PyCharm was run as Administrator during virtual environment creation and subsequent script execution due to external file permission issues in the user's home directory. The
vulkanApiVersion == 0error persists identically across all attempts, regardless of Python version, Taichi version, orti.init(arch)setting (bothti.gpuandti.cudawere tried for the computation backend). All GPU drivers are updated to the latest stable versions. Multiple clean uninstalls/reinstalls of Taichi and virtual environment recreation attempts were performed -->
Hello. I would appreciate any help with this error that you can offer. I don't know if the problem originates from the VulkanMemoryAllocator (as diagnosed by Google Gemini) or if it is a hardware problem with the GPU configuration or some other issue. My project is on hold until this issue is resolved because I need to utilize ti.ui.Window with my project to run live testing on my simulation (with sliders). Without this functionality, I cannot use Taichi Language. I have a limited budget, so using another device is not an option. Thank you.
https://github.com/taichi-dev/taichi/issues/8630#issuecomment-2630686989 I think this would work for you.
Hello,
Yes. It worked. Thank you so much!
On Mon, Jun 9, 2025 at 2:49 PM Imaginer @.***> wrote:
Taiyuan-Zhang left a comment (taichi-dev/taichi#8734) https://github.com/taichi-dev/taichi/issues/8734#issuecomment-2954975648
#8630 (comment) https://github.com/taichi-dev/taichi/issues/8630#issuecomment-2630686989 I think this would work for you.
— Reply to this email directly, view it on GitHub https://github.com/taichi-dev/taichi/issues/8734#issuecomment-2954975648, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV3VAQ5HRGDS3PHSTD7UYD3CU4BZAVCNFSM6AAAAAB6VBBRGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNJUHE3TKNRUHA . You are receiving this because you authored the thread.Message ID: @.***>
-- Alastair Moir