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

1.0.1 broke Vulkan field allocation on NVIDIA GPUs #4902

Closed
whorfin opened this issue May 3, 2022 · 1 comment
Closed

1.0.1 broke Vulkan field allocation on NVIDIA GPUs #4902

whorfin opened this issue May 3, 2022 · 1 comment
Labels
potential bug Something that looks like a bug but not yet confirmed

Comments

@whorfin
Copy link

whorfin commented May 3, 2022

Describe the bug
I have a laptop with "Intel UHD Graphics 630" and "NVIDIA GeForce GTX 1070" GPUs
1.0.0 would default to using the Intel device for Vulkan [which wasn't good from a performance perspective] while 1.0.1 seems to now select the NVIDIA device. That's good, but the NVIDIA version now blows up when attempting to allocate a field.

To Reproduce

#!/usr/bin/python3
import sys
import os

import taichi as ti

#os.environ["TI_VISIBLE_DEVICE"]="1" # Intel device works, nvidia fails
ti.init(arch=ti.vulkan)

fieldSize = 64

print("Allocating...", end="")
sys.stdout.flush()
in_field = ti.field(ti.f32, shape=(fieldSize, fieldSize))

print("\nDone")

Log/Screenshots
On this laptop, the NVIDIA device is device 0; uncommenting the "TI_VISIBLE_DEVICE" environment settings, the Intel device is used and works.

Here we force the Intel device and it works:

$ python buggy.py
[Taichi] version 1.0.1, llvm 10.0.0, commit 1c3619d9, win, python 3.9.7
[Taichi] Starting on arch=vulkan
[I 05/02/22 17:05:40.271 14952] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:pick_physical_device@363] Found Vulkan Device 0 (NVIDIA GeForce GTX 1070 with Max-Q Design)
[I 05/02/22 17:05:40.272 14952] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:pick_physical_device@363] Found Vulkan Device 1 (Intel(R) UHD Graphics 630)
[I 05/02/22 17:05:40.272 14952] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:create_logical_device@431] Vulkan Device "Intel(R) UHD Graphics 630" supports Vulkan 0 version 1.
1.120
Allocating...
Done

...and here we let the default NVIDIA device get used, and we fail:

$ python buggy.py
[Taichi] version 1.0.1, llvm 10.0.0, commit 1c3619d9, win, python 3.9.7
[Taichi] Starting on arch=vulkan
[I 05/02/22 17:05:32.138 11916] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:pick_physical_device@363] Found Vulkan Device 0 (NVIDIA GeForce GTX 1070 with Max-Q Design)
[I 05/02/22 17:05:32.139 11916] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:pick_physical_device@363] Found Vulkan Device 1 (Intel(R) UHD Graphics 630)
[I 05/02/22 17:05:32.139 11916] [D:/a/taichi/taichi/taichi/backends/vulkan/vulkan_device_creator.cpp:create_logical_device@431] Vulkan Device "NVIDIA GeForce GTX 1070 with Max-Q Design" supports Vul
kan 0 version 1.3.194
Assertion failed: m_VulkanFunctions.vkGetDeviceBufferMemoryRequirements != nullptr, file D:/a/taichi/taichi/external/VulkanMemoryAllocator/include\vk_mem_alloc.h, line 14440
@whorfin whorfin added the potential bug Something that looks like a bug but not yet confirmed label May 3, 2022
@taichi-ci-bot taichi-ci-bot moved this to Untriaged in Taichi Lang May 3, 2022
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug Something that looks like a bug but not yet confirmed
Projects
Status: Done
Development

No branches or pull requests

2 participants