taichi.lang.kernel.KernelDefError: No more for loops allowed
BooPatienze opened this issue · 1 comments
When I run billiards.py, I got this error but I don't kown how to deal with it.
[Taichi] mode=release
[Taichi] version 0.5.7, cpu only, commit 568f6651, python 3.7.3
Traceback (most recent call last):
File "D:\workspace\Python\difftaichi-master\examples\billiards.py", line 215, in
optimize()
File "D:\workspace\Python\difftaichi-master\examples\billiards.py", line 172, in optimize
forward(visualize=True, output=output)
File "F:\Python\Anaconda3\lib\site-packages\taichi\lang\tape.py", line 19, in exit
self.grad()
File "F:\Python\Anaconda3\lib\site-packages\taichi\lang\tape.py", line 28, in grad
func.grad(*args)
File "F:\Python\Anaconda3\lib\site-packages\taichi\lang\kernel.py", line 399, in call
self.materialize(key=key, args=args, arg_features=arg_features)
File "F:\Python\Anaconda3\lib\site-packages\taichi\lang\kernel.py", line 247, in materialize
KernelSimplicityASTChecker(self.func).visit(tree)
File "F:\Python\Anaconda3\lib\ast.py", line 262, in visit
return visitor(node)
File "F:\Python\Anaconda3\lib\site-packages\taichi\lang\ast_checker.py", line 66, in generic_visit
super().generic_visit(node)
File "F:\Python\Anaconda3\lib\ast.py", line 270, in generic_visit
self.visit(item)
File "F:\Python\Anaconda3\lib\ast.py", line 262, in visit
return visitor(node)
File "F:\Python\Anaconda3\lib\site-packages\taichi\lang\ast_checker.py", line 66, in generic_visit
super().generic_visit(node)
File "F:\Python\Anaconda3\lib\ast.py", line 270, in generic_visit
self.visit(item)
File "F:\Python\Anaconda3\lib\ast.py", line 262, in visit
return visitor(node)
File "F:\Python\Anaconda3\lib\site-packages\taichi\lang\ast_checker.py", line 99, in visit_For
super().generic_visit(node)
File "F:\Python\Anaconda3\lib\ast.py", line 270, in generic_visit
self.visit(item)
File "F:\Python\Anaconda3\lib\ast.py", line 262, in visit
return visitor(node)
File "F:\Python\Anaconda3\lib\site-packages\taichi\lang\ast_checker.py", line 96, in visit_For
f'No more for loops allowed, at {self.get_error_location(node)}')
taichi.lang.kernel.KernelDefError: No more for loops allowed, at file=D:\workspace\Python\difftaichi-master\examples\billiards.py kernel=collide line=78
What's wrong with it? Hope someone can help me. Thanks very much!
Sorry about the issue and my delayed reply. I believe it's fixed in the latest commit.