Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meet some problems of Voxel Challenge on taichi 1.0.1(Received signal 22) #4900

Closed
JiaHuann opened this issue May 1, 2022 · 12 comments
Closed
Labels
question Question on using Taichi

Comments

@JiaHuann
Copy link

JiaHuann commented May 1, 2022

Describe the bug
Running example1.py by using the pycharm with taichi 1.0.1,python 3.10.2,arch=cuda,windows and got many errors .
(I have tried to switch python version,it still didn't work)
After I switch the taichi to 1.0.0 it did't report errors and program runs correctly.
So,what is going on here?
I have seen https://docs.taichi-lang.org/lang/articles/install
But it didn't mentioned "Received signal 22 (SIGABRT)"

Log/Screenshots
Please post the full log of the program (instead of just a few lines around the error message, unless the log is > 1000 lines). This will help us diagnose what's happening. For example:

C:\Users\13956\Desktop\My_taichi-main\venv\Scripts\python.exe C:/Users/13956/Desktop/My_taichi-main/example6.py
[Taichi] version 1.0.1, llvm 10.0.0, commit 1c3619d9, win, python 3.10.2
[Taichi] Starting on arch=cuda

====================================================
Camera:
* Drag with your left mouse button to rotate
* Press W/A/S/D/Q/E to move
====================================================

[I 05/01/22 13:01:55.935 2820] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:pick_physical_device@363] Found Vulkan Device 0 (NVIDIA GeForce RTX 3060 Laptop GPU)
[I 05/01/22 13:01:55.935 2820] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:pick_physical_device@363] Found Vulkan Device 1 (AMD Radeon(TM) Graphics)
[I 05/01/22 13:01:55.935 2820] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:create_logical_device@431] Vulkan Device "NVIDIA GeForce RTX 3060 Laptop GPU" supports Vulkan 0 version 1.3.194
[E 05/01/22 13:01:56.036 2820] Received signal 22 (SIGABRT)


***********************************
* Taichi Compiler Stack Traceback *
***********************************
A s s e r t i o n   f a i l e d :   m _ V u l k a n F u n c t i o n s . v k G e t D e v i c e B u f f e r M e m o r y R e q u i r e m e n t s   ! =   n u l l p t r ,   f i l e   D : / a / 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 4 4 4 0 
 0x7fff9243447a: taichi::lang::Program::get_llvm_program_impl in taichi_core.pyd
0x7ff82c1e1881: raise in ucrtbase.dll
0x7ff82c1e2851: abort in ucrtbase.dll
0x7ff82c1e41b5: get_wpgmptr in ucrtbase.dll
0x7ff82c1e44f1: wassert in ucrtbase.dll
0x7fff926bb730: taichi::lang::vulkan::VulkanDeviceCreator::~VulkanDeviceCreator in taichi_core.pyd
0x7fff926bf415: taichi::lang::vulkan::VulkanDeviceCreator::~VulkanDeviceCreator in taichi_core.pyd
0x7fff92694e40: taichi::lang::vulkan::VkRuntime::get_root_buffer_size in taichi_core.pyd
0x7fff926a8bd7: taichi::lang::vulkan::VulkanDeviceCreator::VulkanDeviceCreator in taichi_core.pyd
0x7fff925a0eee: taichi::ui::vulkan::AppContext::init in taichi_core.pyd
0x7fff925ac6fd: taichi::ui::VboHelpers::size in taichi_core.pyd
0x7fff925ac388: taichi::ui::VboHelpers::size in taichi_core.pyd
0x7fff926f2327: PyInit_taichi_core in taichi_core.pyd
0x7fff926ce2dd: PyInit_taichi_core in taichi_core.pyd
0x7fffc0d9d8b6: PyObject_RichCompareBool in python310.dll
0x7fffc0de1f4f: PyObject_MakeTpCall in python310.dll
0x7fffc0f1cd11: Py_gitversion in python310.dll
0x7fffc0e58e80: PyVectorcall_Call in python310.dll
0x7fffc0e58c63: PyObject_Call in python310.dll
0x7fffc0ddc07d: PyType_GenericNew in python310.dll
0x7fffc0ddc780: PyType_GenericNew in python310.dll
0x7fff926c8724: PyInit_taichi_core in taichi_core.pyd
0x7fffc0dec2ba: PyEval_EvalFrameDefault in python310.dll
0x7fffc0de7227: PyFunction_Vectorcall in python310.dll
0x7fffc0ddc12e: PyType_GenericNew in python310.dll
0x7fffc0ddc780: PyType_GenericNew in python310.dll
0x7fffc0de1f4f: PyObject_MakeTpCall in python310.dll
0x7fffc0def0e5: PyEval_EvalFrameDefault in python310.dll
0x7fffc0de7227: PyFunction_Vectorcall in python310.dll
0x7fffc0ddc12e: PyType_GenericNew in python310.dll
0x7fffc0ddc780: PyType_GenericNew in python310.dll
0x7fffc0de1f4f: PyObject_MakeTpCall in python310.dll
0x7fffc0def0e5: PyEval_EvalFrameDefault in python310.dll
0x7fffc0dc617d: PyMapping_Check in python310.dll
0x7fffc0e0e05e: PyEval_EvalCode in python310.dll
0x7fffc0e0d1f2: Py_BuildValue in python310.dll
0x7fffc0e0d172: Py_BuildValue in python310.dll
0x7fffc0df8518: PyDict_DelItemString in python310.dll
0x7fffc0df8279: PyRun_SimpleFileObject in python310.dll
0x7fffc0df80bc: PyRun_AnyFileObject in python310.dll
0x7fffc0df8fdb: PyList_GetItem in python310.dll
0x7fffc0df8e97: PyList_GetItem in python310.dll
0x7fffc0df9e28: Py_RunMain in python310.dll
0x7fffc0df9cb9: Py_RunMain in python310.dll
0x7fffc0df96d1: Py_Main in python310.dll
0x7ff69ba01230: Unknown Function in python.exe
0x7ff82df47034: BaseThreadInitThunk in KERNEL32.DLL
0x7ff82e262651: RtlUserThreadStart in ntdll.dll

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

btw,on my report log here is full of unreadable marks
A s s e r t i o n f a i l e d : m _ V u l k a n F u n c t i o n s . v k G e t D e v i c e B u f f e r M e m o r y R e q u i r e m e n t s ! = n u l l p t r , f i l e D : / a / 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 4 4 4 0

@JiaHuann JiaHuann added the question Question on using Taichi label May 1, 2022
@taichi-ci-bot taichi-ci-bot moved this to Untriaged in Taichi Lang May 1, 2022
@JiaHuann JiaHuann changed the title meet some problems of Voxel Challenge on taichi 1.0.1 meet some problems of Voxel Challenge on taichi 1.0.1(Received signal 22) May 1, 2022
@quadpixels
Copy link
Contributor

quadpixels commented May 1, 2022

Same here, Assertion failed: m_VulkanFunctions.vkGetDeviceBufferMemoryRequirements != nullptr, file C:\Users\(USER_NAME)\taichi\external\VulkanMemoryAllocator\include\vk_mem_alloc.h, line 14440

@ZiXuanVickyLu
Copy link

same here, and I check and meets the same problem for cpu,vulkan,gpu arch.

@R366Y
Copy link

R366Y commented May 2, 2022

I got this:

/home/r366y/PycharmProjects/testprj/venv/bin/python /home/r366y/PycharmProjects/testprj/fractal3d.py
[Taichi] version 1.0.1, llvm 10.0.0, commit 1c3619d9, linux, python 3.10.4
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

[Taichi] Starting on arch=vulkan
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

python: /home/dev/taichi/external/VulkanMemoryAllocator/include/vk_mem_alloc.h:14440: void VmaAllocator_T::ValidateVulkanFunctions(): Assertion `m_VulkanFunctions.vkGetDeviceBufferMemoryRequirements != nullptr' failed.
[I 05/02/22 19:59:50.596 21187] [vulkan_device_creator.cpp:pick_physical_device@363] Found Vulkan Device 0 (Intel(R) HD Graphics 620 (KBL GT2))
[I 05/02/22 19:59:50.596 21187] [vulkan_device_creator.cpp:pick_physical_device@363] Found Vulkan Device 1 (NVIDIA GeForce 940MX)
[I 05/02/22 19:59:50.596 21187] [vulkan_device_creator.cpp:pick_physical_device@363] Found Vulkan Device 2 (llvmpipe (LLVM 13.0.1, 256 bits))
[I 05/02/22 19:59:50.597 21187] [vulkan_device_creator.cpp:create_logical_device@431] Vulkan Device "NVIDIA GeForce 940MX" supports Vulkan 0 version 1.3.194

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

Vulkan api Version: 1.3.194
nvidia driver : 510.68.02

@bobcao3
Copy link
Collaborator

bobcao3 commented May 3, 2022

Duplicate of #4891 , fixed in #4893

@bobcao3 bobcao3 closed this as completed May 3, 2022
Repository owner moved this from Untriaged to Done in Taichi Lang May 3, 2022
@Smethan
Copy link

Smethan commented May 3, 2022

It looks like this wasn't actually fixed, I compiled the latest commit and still got the same error:

[Taichi] version 1.0.2, llvm 10.0.0, commit 77d5d3a3, win, python 3.10.2
[Taichi] Starting on arch=vulkan
[I 05/03/22 15:56:44.887 19916] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:pick_physical_device@364] Found Vulkan Device 0 (AMD Radeon RX 5600 XT)
[I 05/03/22 15:56:44.887 19916] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:find_queue_families@142] Async compute queue 1, graphics queue 0
[I 05/03/22 15:56:44.887 19916] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:find_queue_families@142] Async compute queue 1, graphics queue 0
[I 05/03/22 15:56:44.887 19916] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:create_logical_device@432] Vulkan Device "AMD Radeon RX 5600 XT" supports Vulkan 0 version 1.3.203
Assertion failed: m_VulkanFunctions.vkGetDeviceBufferMemoryRequirements != nullptr, file D:/a/taichi/taichi/external/VulkanMemoryAllocator/include\vk_mem_alloc.h, line 14440

Vulkan API: 1.3.203

It could possibly have something to do with me having an AMD GPU, but given that its the same error the folks above me got on NVIDIA GPUs I highly doubt it

@bobcao3
Copy link
Collaborator

bobcao3 commented May 10, 2022

@Smethan that is quite baffling... Can you try to add TI_WARN(“Vulkan funcptr {}”, (void*)table.vkGetDeviceBufferMemoryRequirements) of taichi/backends/vulkan/vulkan_device.cpp so that we can confirm which pointer we have acquired? Since the driver is reporting version 1.3, then these two function pointers must exist because they are in core.

@Smethan
Copy link

Smethan commented May 10, 2022

I have no idea what I have done in the week since I posted that to anger my windows machine, but I cannot for the life of me get this to build, even just pulling from master wont compile, so I can't really test it at the moment. In the mean time, if you can compile it with that line in there and send it my way I'd be happy to run it.

@Smethan
Copy link

Smethan commented May 10, 2022

Scratch that last comment, after a few hours of finagling I was able to get it to compile and this is the output I got:

[Taichi] version 1.0.2, llvm 10.0.0, commit e7d0b4f0, win, python 3.10.2
[Taichi] Starting on arch=vulkan
[I 05/10/22 17:11:56.438 3120] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:pick_physical_device@364] Found Vulkan Device 0 (AMD Radeon RX 5600 XT)
[I 05/10/22 17:11:56.438 3120] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:find_queue_families@142] Async compute queue 1, graphics queue 0
[I 05/10/22 17:11:56.438 3120] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:find_queue_families@142] Async compute queue 1, graphics queue 0
[I 05/10/22 17:11:56.439 3120] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:create_logical_device@432] Vulkan Device "AMD Radeon RX 5600 XT" supports Vulkan 0 version 1.3.203
[W 05/10/22 17:11:56.502 3120] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device.cpp:create_vma_allocator@2007] Vulkan funcptr 0x0
Assertion failed: m_VulkanFunctions.vkGetDeviceBufferMemoryRequirements != nullptr, file D:/a/taichi/taichi/external/VulkanMemoryAllocator/include\vk_mem_alloc.h, line 14440

with the only real different line there being

[W 05/10/22 17:11:56.502 3120] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device.cpp:create_vma_allocator@2007] Vulkan funcptr 0x0

which doesn't really tell us much as far as I can tell. I'm personally a bit lost on what to do here, this low level stuff isn't exactly my area of expertise 😅

@bobcao3
Copy link
Collaborator

bobcao3 commented May 11, 2022

This actually tells us quite a lot... Basically we can not acquire a function pointer that is supposed to be supported by Vulkan 1.3 Core, which means the driver isn't reporting its version capability correctly...

Can you try to get a device profile using this tool here? https://vulkan.gpuinfo.org/download.php
If so that'd be great, thanks! @Smethan

@Smethan
Copy link

Smethan commented May 11, 2022

Sure thing! Here you go:
AMD Radeon RX 5600 XT.txt
@bobcao3

@bobcao3
Copy link
Collaborator

bobcao3 commented May 11, 2022

Also let's move this to #4951

@quadpixels
Copy link
Contributor

quadpixels commented May 11, 2022

Interestingly I got the same error message [W 05/10/22 23:48:56.686 10912] [vulkan_device.cpp:taichi::lang::vulkan::VulkanDevice::create_vma_allocator@2012] Vulkan funcptr 0x0

GPU is Radeon RX 5500.
AMD Radeon RX 5500.json.txt

Edit: a quick hack for a similar setup is to change VK_API_VERSION_1_2 to VK_API_VERSION_1_3 in VulkanEnvSettings.

quadpixels added a commit to quadpixels/taichi that referenced this issue May 11, 2022
This change fixes issue taichi-dev#4900. On certain AMD GPUs (such as RX 5500),
the Vullkan version needs to be 1.3 in order for Volk to correctly populate
the "vkGetDeviceBufferMemoryRequirements" function pointer. If the
version is 1.2, the pointer will be NULL and cause an assertion failure.

Tested by running the voxel challenge program and see the program
working as expected on a Windows PC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question on using Taichi
Projects
Status: Done
Development

No branches or pull requests

6 participants