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

Vulkan doesn't work with nvidia driver 527.56 with hybrid graphics on Windows #6989

Open
liuyunpu opened this issue Dec 27, 2022 · 8 comments
Assignees
Labels
bug We've confirmed that this is an BUG

Comments

@liuyunpu
Copy link

Describe the bug
Program runs on windows 11 pc with nvidia gpu driver 527.56 stops at "window = ti.ui.Window"line with no warning in the log. But can be solved by downgrading gpu driver to 517.48

To Reproduce
Any program in the ggui examples can't work properly, produce no ggui window nor any warning in the log

Log/Screenshots
PS C:\Users\liuyu\anaconda3\Lib\site-packages\taichi\examples\ggui_examples> python .\fem128_ggui.py
[Taichi] version 1.3.0, llvm 15.0.1, commit 0f25b95, win, python 3.9.13
PS C:\Users\liuyu\anaconda3\Lib\site-packages\taichi\examples\ggui_examples> python .\fractal3d_ggui.py
[Taichi] version 1.3.0, llvm 15.0.1, commit 0f25b95, win, python 3.9.13
PS C:\Users\liuyu\anaconda3\Lib\site-packages\taichi\examples\ggui_examples> python .\stable_fluid_ggui.py
[Taichi] version 1.3.0, llvm 15.0.1, commit 0f25b95, win, python 3.9.13

@bobcao3
Copy link
Collaborator

bobcao3 commented Dec 28, 2022

Can you run this and post the output here?

$Env:TI_LOG_LEVEL="trace" ; python .\stable_fluid_ggui.py

@liuyunpu
Copy link
Author

still, no window or warning
PS C:\Users\liuyu\anaconda3\Lib\site-packages\taichi\examples\ggui_examples> $Env:TI_LOG_LEVEL="trace" ; python .\stable_fluid_ggui.py
[Taichi] version 1.2.1, llvm 10.0.0, commit 12ab828a, win, python 3.9.13

@bobcao3
Copy link
Collaborator

bobcao3 commented Dec 29, 2022

Can you try to upgrade Taichi to 1.3.0?

@liuyunpu
Copy link
Author

Can you try to upgrade Taichi to 1.3.0?

same result

PS C:\Users\liuyu\anaconda3\Lib\site-packages\taichi\examples\ggui_examples> $Env:TI_LOG_LEVEL="trace" ; python .\stable_fluid_ggui.py
[Taichi] version 1.3.0, llvm 15.0.1, commit 0f25b95e, win, python 3.9.13

@bobcao3
Copy link
Collaborator

bobcao3 commented Dec 29, 2022

Can you try whether you can run any Taichi code with the Vulkan backend? It seems like Vulkan is not initializing correctly. What is your GPU? I think I'm on the same driver but I don't see this issue

@liuyunpu
Copy link
Author

Can you try whether you can run any Taichi code with the Vulkan backend? It seems like Vulkan is not initializing correctly. What is your GPU? I think I'm on the same driver but I don't see this issue

my computer uses nvidia rtx3050 laptop, it also has a amd radeon graphics (Integrated graphics comes with amd ryzen 7 5800u)
I change the line
arch = ti.vulkan if ti._lib.core.with_vulkan() else ti.cuda
into
arch = ti.vulkan
then the program stops as usual(i have installed the vulkan sdk)
But when i change it into
arch = ti.cuda
following info shows in the log, but no window shows

PS C:\Users\liuyu\anaconda3\Lib\site-packages\taichi\examples\ggui_examples> $Env:TI_LOG_LEVEL="trace" ; python .\stable_fluid_ggui.py
[Taichi] version 1.3.0, llvm 15.0.1, commit 0f25b95, win, python 3.9.13
[T 12/29/22 18:20:10.987 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/rhi/cuda/cuda_driver.cpp:load_lib@39] nvcuda.dll loaded!
[T 12/29/22 18:20:10.989 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/rhi/cuda/cuda_driver.cpp:CUDADriver@59] CUDA driver API (v12.0) loaded.
[Taichi] Starting on arch=cuda
[T 12/29/22 18:20:10.990 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/program/program.cpp:Program@55] Program initializing...
[D 12/29/22 18:20:10.990 5712] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/program/parallel_executor.cpp:worker_loop@71] Starting worker thread.
[D 12/29/22 18:20:10.990 4064] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/program/parallel_executor.cpp:worker_loop@71] Starting worker thread.
[D 12/29/22 18:20:10.990 18192] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/program/parallel_executor.cpp:worker_loop@71] Starting worker thread.
[D 12/29/22 18:20:10.990 5712] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/program/parallel_executor.cpp:worker_loop@86] Worker thread initialized and running.
[D 12/29/22 18:20:10.990 6068] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/program/parallel_executor.cpp:worker_loop@71] Starting worker thread.
[D 12/29/22 18:20:10.990 4064] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/program/parallel_executor.cpp:worker_loop@86] Worker thread initialized and running.
[D 12/29/22 18:20:10.991 18192] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/program/parallel_executor.cpp:worker_loop@86] Worker thread initialized and running.
[D 12/29/22 18:20:10.991 6068] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/program/parallel_executor.cpp:worker_loop@86] Worker thread initialized and running.
[T 12/29/22 18:20:12.302 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/rhi/cuda/cuda_context.cpp:CUDAContext@27] Using CUDA device [id=0]: NVIDIA GeForce RTX 3050 Laptop GPU
[T 12/29/22 18:20:12.302 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/rhi/cuda/cuda_context.cpp:CUDAContext@35] CUDA Device Compute Capability: 8.6
[T 12/29/22 18:20:12.360 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/rhi/cuda/cuda_context.cpp:CUDAContext@41] Total memory 4.00 GB; free memory 3.24 GB
[T 12/29/22 18:20:12.360 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/rhi/cuda/cuda_context.cpp:CUDAContext@54] Emitting CUDA code for sm_75
[T 12/29/22 18:20:12.360 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/snode_tree_buffer_manager.cpp:SNodeTreeBufferManager@9] SNode tree buffer manager created.
[T 12/29/22 18:20:12.361 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_context.cpp:TaichiLLVMContext@64] Creating Taichi llvm context for arch: x64
[T 12/29/22 18:20:12.361 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_context.cpp:get_this_thread_data@720] Creating thread local data for thread 7940
[T 12/29/22 18:20:12.397 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_context.cpp:TaichiLLVMContext@112] Taichi llvm context created.
[T 12/29/22 18:20:12.397 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_runtime_executor.cpp:LlvmRuntimeExecutor@80] CUDA max blocks per SM = 16
[T 12/29/22 18:20:12.398 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_context.cpp:TaichiLLVMContext@64] Creating Taichi llvm context for arch: cuda
[T 12/29/22 18:20:12.398 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_context.cpp:get_this_thread_data@720] Creating thread local data for thread 7940
[T 12/29/22 18:20:12.482 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_context.cpp:TaichiLLVMContext@112] Taichi llvm context created.
[T 12/29/22 18:20:12.776 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/cuda/jit_cuda.cpp:add_module@21] PTX size: 120.42KB
[T 12/29/22 18:20:12.776 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/cuda/jit_cuda.cpp:add_module@23] Loading module...
[T 12/29/22 18:20:13.165 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/cuda/jit_cuda.cpp:add_module@42] CUDA module load time : 389.20599999983096ms
[D 12/29/22 18:20:13.377 7940] [taichi/util/offline_cache.h:load_metadata_with_checking@89] The offline cache metadata file C:/taichi_cache/ticache/llvm/metadata.tcb is old (version=1.2.1)
[T 12/29/22 18:20:13.377 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/system/memory_pool.cpp:MemoryPool@13] Memory pool created. Default buffer size per allocator = 1024 MB
[T 12/29/22 18:20:13.378 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/program/program.cpp:Program@169] Program (0x240d1c16fb0) arch=cuda initialized.
[T 12/29/22 18:20:13.379 7940] [misc.py:init@470] Materializing runtime...
[T 12/29/22 18:20:13.380 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_runtime_executor.cpp:materialize_runtime@529] Allocating device memory 1.00 GB
[T 12/29/22 18:20:13.382 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_runtime_executor.cpp:materialize_runtime@572] Launching runtime_initialize
[T 12/29/22 18:20:13.382 7940] [taichi/runtime/cuda/jit_cuda.h:lookup_function@57] CUDA module_get_function runtime_initialize costs 0.005999998393235728 ms
[T 12/29/22 18:20:13.382 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_runtime_executor.cpp:materialize_runtime@581] LLVMRuntime initialized (excluding root)
[T 12/29/22 18:20:13.433 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_runtime_executor.cpp:materialize_runtime@584] LLVMRuntime pointer fetched
[T 12/29/22 18:20:13.433 7940] [C:/Users/Administrator/actions-runner/_work/taichi/taichi/taichi/runtime/llvm/llvm_runtime_executor.cpp:materialize_runtime@587] Initializing 524288 random states using CUDA
[T 12/29/22 18:20:13.433 7940] [taichi/runtime/cuda/jit_cuda.h:lookup_function@57] CUDA module_get_function runtime_initialize_rand_states_cuda costs 0.0030000010156072676 ms
[T 12/29/22 18:20:13.433 7940] [taichi/runtime/cuda/jit_cuda.h:lookup_function@57] CUDA module_get_function runtime_initialize_runtime_context_buffer costs 0.0010000003385357559 ms
PS C:\Users\liuyu\anaconda3\Lib\site-packages\taichi\examples\ggui_examples>

@liuyunpu
Copy link
Author

I tried to run the ggui example on another desktop with only nvidia rtx3060ti(running 527.56 driver), no other integreted gpu, and it runs properly. So I guess this problem might relate to the amd integreted gpu?

@feisuzhu feisuzhu moved this from Untriaged to In Progress in Taichi Lang Dec 30, 2022
@feisuzhu feisuzhu moved this from In Progress to Todo in Taichi Lang Dec 30, 2022
@bobcao3 bobcao3 added the bug We've confirmed that this is an BUG label Dec 30, 2022
@bobcao3
Copy link
Collaborator

bobcao3 commented Dec 30, 2022

Ah yes... I've seen something like this, but only on Linux. I'm not sure what's causing this on Windows. We will try to take a look

@bobcao3 bobcao3 changed the title GGUI doesn't work with new nvidia gpu driver 527.56 Vulkan doesn't work with nvidia driver 527.56 with hybrid graphics on Windows Dec 30, 2022
@neozhaoliang neozhaoliang assigned bobcao3 and unassigned ailzhang Jan 6, 2023
@neozhaoliang neozhaoliang moved this from Todo to Backlog in Taichi Lang Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We've confirmed that this is an BUG
Projects
Status: Backlog
Development

No branches or pull requests

3 participants