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

Calling taichi's zero_field function with default trace size causes Vulkan kernel error #46

Open
deehrlic opened this issue May 11, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@deehrlic
Copy link
Contributor

Doing testing on the 3D notebooks with a Vulkan/AMD GPU

When using the 3D notebooks and attempting to run a block calling zero_field from taichi with MAX_TRACE_RESOLUTION of 512, taichi spits out this error:

RuntimeError Traceback (most recent call last)
Cell In[24], line 1
----> 1 zero_field(deposit_field)
2 zero_field(trace_field)
3 zero_field(vis_field)

File D:\Anaconda\envs\polyphy\lib\site-packages\taichi\lang\kernel_impl.py:1023, in _kernel_impl..wrapped(*args, **kwargs)
1020 @functools.wraps(_func)
1021 def wrapped(*args, **kwargs):
1022 try:
-> 1023 return primal(*args, **kwargs)
1024 except (TaichiCompilationError, TaichiRuntimeError) as e:
1025 raise type(e)('\n' + str(e)) from None

File D:\Anaconda\envs\polyphy\lib\site-packages\taichi\lang\shell.py:27, in _shell_pop_print..new_call(*args, **kwargs)
25 @functools.wraps(old_call)
26 def new_call(*args, **kwargs):
---> 27 ret = old_call(*args, **kwargs)
28 # print's in kernel won't take effect until ti.sync(), discussion:
29 # taichi-dev/taichi#1303 (comment)
30 print(_ti_core.pop_python_print_buffer(), end='')

File D:\Anaconda\envs\polyphy\lib\site-packages\taichi\lang\kernel_impl.py:950, in Kernel.call(self, *args, **kwargs)
948 impl.current_cfg().opt_level = 1
949 key = self.ensure_compiled(*args)
--> 950 return self.runtime.compiled_functionskey

File D:\Anaconda\envs\polyphy\lib\site-packages\taichi\lang\kernel_impl.py:853, in Kernel.get_function_body..func__(*args)
851 except Exception as e:
852 e = handle_exception_from_cpp(e)
--> 853 raise e from None
855 ret = None
856 ret_dt = self.return_type

File D:\Anaconda\envs\polyphy\lib\site-packages\taichi\lang\kernel_impl.py:850, in Kernel.get_function_body..func__(*args)
845 raise TaichiRuntimeError(
846 f"The number of elements in kernel arguments is too big! Do not exceed 64 on {_ti_core.arch_name(impl.current_cfg().arch)} backend."
847 )
849 try:
--> 850 t_kernel(launch_ctx)
851 except Exception as e:
852 e = handle_exception_from_cpp(e)

RuntimeError: [runtime.cpp:taichi::lang::gfx::GfxRuntime::launch_kernel@576] Dispatch error : RhiResult(-3)


Setting the max trace value to 256 fixes this, but is not a long term fix

taichi-dev/taichi#7674 might be related

@OskarElek
Copy link
Collaborator

Needs re-testing. Taichi has made significant progress on the backend interoperability since so this might already be a non-issue.

@deehrlic
Copy link
Contributor Author

I'm not using a Vulkan GPU anymore, so I'm not in a position to test this myself anymore without Frankensteining my pc :(

@Abhinavcode13 Abhinavcode13 added the help wanted Extra attention is needed label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants