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

SNodeType=pointer not supported on Metal #1740

Closed
gdwSH opened this issue Aug 20, 2020 · 2 comments
Closed

SNodeType=pointer not supported on Metal #1740

gdwSH opened this issue Aug 20, 2020 · 2 comments
Assignees
Labels
feature request Suggest an idea on this project metal Metal backend

Comments

@gdwSH
Copy link

gdwSH commented Aug 20, 2020

Running the codes on macOS:
https://forum.taichi.graphics/t/homework1-eulerian-fluid-simulation-smoke/997/2

Internal Error occurred, check this page for possible solutions:
https://taichi.readthedocs.io/en/stable/install.html#troubleshooting
Traceback (most recent call last):
File "smoke.py", line 577, in
main()
File "smoke.py", line 573, in main
smoke_solver.run()
File "smoke.py", line 543, in run
self.reset()
File "smoke.py", line 521, in reset
self._dens_buffer.fill(0.0)
File "/Users/guodewen/anaconda3/envs/taichi/lib/python3.7/site-packages/taichi/lang/util.py", line 212, in wrapped
return func(*args, **kwargs)
File "/Users/guodewen/anaconda3/envs/taichi/lib/python3.7/site-packages/taichi/lang/expr.py", line 126, in fill
fill_tensor(self, val)
File "/Users/guodewen/anaconda3/envs/taichi/lib/python3.7/site-packages/taichi/lang/kernel.py", line 580, in wrapped
return primal(*args, **kwargs)
File "/Users/guodewen/anaconda3/envs/taichi/lib/python3.7/site-packages/taichi/lang/kernel.py", line 507, in call
self.materialize(key=key, args=args, arg_features=arg_features)
File "/Users/guodewen/anaconda3/envs/taichi/lib/python3.7/site-packages/taichi/lang/kernel.py", line 309, in materialize
self.runtime.materialize()
File "/Users/guodewen/anaconda3/envs/taichi/lib/python3.7/site-packages/taichi/lang/impl.py", line 216, in materialize
taichi_lang_core.layout(layout)
RuntimeError: [struct_metal.cpp:generate_types@230] SNodeType=pointer not supported on Metal

Running time: 0.67s

@gdwSH gdwSH added the potential bug Something that looks like a bug but not yet confirmed label Aug 20, 2020
@archibate
Copy link
Collaborator

This is because the sparse feature is not yet supported on Metal backend.
Solution:

  1. Replace ti.init(ti.gpu) by ti.init(ti.cpu).
  2. Replace all xxx.pointer by xxx.bitmasked.

@k-ye
Copy link
Member

k-ye commented Jul 2, 2021

This feature is finally shipped in https://github.com/taichi-dev/taichi/releases/tag/v0.7.25. Feel free to give it a try, thx!

@k-ye k-ye closed this as completed Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Suggest an idea on this project metal Metal backend
Projects
None yet
Development

No branches or pull requests

3 participants