(base) ➜ ~ python difftaichi/examples/billiards.py
[Taichi] mode=release
[Taichi] version 0.6.11, supported archs: [cpu, metal], commit 762aca58, python 3.7.3
difftaichi/examples/billiards.py:42: PendingDeprecationWarning: @ti.layout will be deprecated in the future, use ti.root directly to specify data layout anytime before the data structure materializes.
@ti.layout
[E 06/18/20 17:28:09.242] [verify.cpp:basic_verify@39] stmt 5249 cannot have operand 4663.
* Taichi Core - Stack Traceback *
==========================================================================================
| Module | Offset | Function |
|----------------------------------------------------------------------------------------|
* taichi_core.so | 110 | taichi::Logger::error(std::__1::basic_string< |
| char, std::__1::char_traits<char>, std::__1:: |
| allocator<char> > const&, bool) |
* taichi_core.so | 1136 | taichi::lang::IRVerifier::basic_verify(taichi |
| ::lang::Stmt*) |
* taichi_core.so | 25 | taichi::lang::IRVerifier::visit(taichi::lang: |
| :LocalLoadStmt*) |
* taichi_core.so | 139 | taichi::lang::IRVerifier::visit(taichi::lang: |
| :Block*) |
* taichi_core.so | 42 | taichi::lang::BasicStmtVisitor::visit(taichi: |
| :lang::IfStmt*) |
* taichi_core.so | 139 | taichi::lang::IRVerifier::visit(taichi::lang: |
| :Block*) |
* taichi_core.so | 139 | taichi::lang::IRVerifier::visit(taichi::lang: |
| :Block*) |
* taichi_core.so | 139 | taichi::lang::IRVerifier::visit(taichi::lang: |
| :Block*) |
* taichi_core.so | 111 | taichi::lang::irpass::analysis::verify(taichi |
| ::lang::IRNode*) |
* taichi_core.so | 1007 | taichi::lang::irpass::compile_to_offloads(tai |
| chi::lang::IRNode*, taichi::lang::CompileConf |
| ig const&, bool, bool, bool, bool, bool) |
* taichi_core.so | 280 | taichi::lang::Kernel::lower(bool) |
* taichi_core.so | 211 | taichi::lang::Program::compile(taichi::lang:: |
| Kernel&) |
* taichi_core.so | 62 | taichi::lang::Kernel::compile() |
* taichi_core.so | 132 | taichi::lang::Kernel::operator()() |
* taichi_core.so | 103 | void pybind11::cpp_function::initialize<taich |
| i::export_lang(pybind11::module&)::$_9, void, |
| taichi::lang::Kernel*, pybind11::name, pybin |
| d11::is_method, pybind11::sibling>(taichi::ex |
| port_lang(pybind11::module&)::$_9&&, void (*) |
| (taichi::lang::Kernel*), pybind11::name const |
| &, pybind11::is_method const&, pybind11::sibl |
| ing const&)::'lambda'(pybind11::detail::funct |
| ion_call&)::__invoke(pybind11::detail::functi |
| on_call&) |
* taichi_core.so | 4075 | pybind11::cpp_function::dispatcher(_object*, |
| _object*, _object*) |
* python | 437 | (null) |
* python | 111 | (null) |
* python | 130 | (null) |
* python | 130 | (null) |
* python | 370 | (null) |
* python | 179 | (null) |
* python | 453 | (null) |
* python | 46151 | (null) |
* python | 414 | (null) |
* python | 231 | (null) |
* python | 46712 | (null) |
* python | 414 | (null) |
* python | 231 | (null) |
* python | 189 | (null) |
* python | 130 | (null) |
* python | 46712 | (null) |
* python | 117 | (null) |
* python | 183 | (null) |
* python | 45942 | (null) |
* python | 117 | (null) |
* python | 130 | (null) |
* python | 245 | (null) |
* python | 44976 | (null) |
* python | 117 | (null) |
* python | 183 | (null) |
* python | 46151 | (null) |
* python | 414 | (null) |
* python | 256 | (null) |
* python | 391 | (null) |
* python | 9663 | (null) |
* python | 125 | (null) |
* libdyld.dylib | 1 | (null) |
* ??? | 2 | (null) |
==========================================================================================
Internal Error occurred, check this page for possible solutions:
https://taichi.readthedocs.io/en/stable/install.html#troubleshooting
Traceback (most recent call last):
File "difftaichi/examples/billiards.py", line 216, in <module>
optimize()
File "difftaichi/examples/billiards.py", line 173, in optimize
forward(visualize=True, output=output)
File "/Users/zhoudaoxian/anaconda3/lib/python3.7/site-packages/taichi/lang/tape.py", line 18, in __exit__
self.grad()
File "/Users/zhoudaoxian/anaconda3/lib/python3.7/site-packages/taichi/lang/tape.py", line 27, in grad
func.grad(*args)
File "/Users/zhoudaoxian/anaconda3/lib/python3.7/site-packages/taichi/lang/kernel.py", line 459, in __call__
return self.compiled_functions[key](*args)
File "/Users/zhoudaoxian/anaconda3/lib/python3.7/site-packages/taichi/lang/kernel.py", line 423, in func__
t_kernel()
RuntimeError: [verify.cpp:basic_verify@39] stmt 5249 cannot have operand 4663.
Seems
...
real = ti.f32
ti.init(default_fp=real)
ti.core.toggle_advanced_optimization(False) # ADDING THIS LINE!
...
solves the problem on my machine.
@xumingkuan Could you have a look on this? It should be about advanced optimization:
https://github.com/yuanming-hu/difftaichi/blob/master/examples/billiards.py
Thanks for proposing this! Taking a look now.
Seems
... real = ti.f32 ti.init(default_fp=real) ti.core.toggle_advanced_optimization(False) # ADDING THIS LINE! ...solves the problem on my machine.
@xumingkuan Could you have a look on this? It should be about advanced optimization:
https://github.com/yuanming-hu/difftaichi/blob/master/examples/billiards.py
It doesn't solve the issue on my machine...
(base) C:\Users\xmk\Desktop\difftaichi\examples>python billiards.py
[Taichi] mode=development
[Taichi] <dev mode>, supported archs: [cpu only], commit 69e9aea4, python 3.7.4
[T 06/18/20 15:10:24.016] [program.cpp:taichi::lang::Program::Program@48] Program initializing...
[T 06/18/20 15:10:24.017] [memory_pool.cpp:taichi::lang::MemoryPool::MemoryPool@9] Memory pool created. Default buffer size per allocator = 1024 MB
[T 06/18/20 15:10:24.017] [llvm_context.cpp:taichi::lang::TaichiLLVMContext::TaichiLLVMContext@56] Creating Taichi llvm context for arch: x64
[T 06/18/20 15:10:24.017] [llvm_context.cpp:taichi::lang::TaichiLLVMContext::get_this_thread_data@682] Creating thread local data for thread 19552
[T 06/18/20 15:10:24.019] [llvm_context.cpp:taichi::lang::TaichiLLVMContext::TaichiLLVMContext@81] Taichi llvm context created.
[T 06/18/20 15:10:24.019] [program.cpp:taichi::lang::Program::Program@143] Program (0x20aa77a0f00) arch=x64 initialized.
billiards.py:43: PendingDeprecationWarning: @ti.layout will be deprecated in the future, use ti.root directly to specify data layout anytime before the data structure materializes.
@ti.layout
[T 06/18/20 15:10:24.057] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\expr.py:__setitem__@43] Materializing layout...
[D 06/18/20 15:10:24.058] [snode.cpp:taichi::lang::SNode::create_node@51] Non-power-of-two node size 11 promoted to 16.
[T 06/18/20 15:10:24.894] [llvm_context.cpp:taichi::lang::compile_runtime_bitcode@180] Compiling runtime module bitcode...
[T 06/18/20 15:10:25.306] [llvm_context.cpp:taichi::lang::compile_runtime_bitcode@193] Runtime module bitcode compiled.
[T 06/18/20 15:10:25.640] [unified_allocator.cpp:taichi::lang::UnifiedAllocator::UnifiedAllocator@53] Allocating virtual address space of size 1024 MB
[T 06/18/20 15:10:25.641] [unified_allocator.cpp:taichi::lang::UnifiedAllocator::UnifiedAllocator@62] Memory allocated. Allocation time = 0.000566 s
[T 06/18/20 15:10:25.641] [program.cpp:taichi::lang::Program::initialize_runtime_system@213] Allocating data structure of size 2097192 B
[T 06/18/20 15:10:25.642] [program.cpp:taichi::lang::Program::initialize_runtime_system@222] LLVMRuntime initialized
[T 06/18/20 15:10:25.643] [program.cpp:taichi::lang::Program::initialize_runtime_system@224] LLVMRuntime pointer fetched
[D 06/18/20 15:10:25.643] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 0
[D 06/18/20 15:10:25.644] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.644] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae389000
[D 06/18/20 15:10:25.645] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 1
[D 06/18/20 15:10:25.646] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.646] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae38c000
[D 06/18/20 15:10:25.648] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 2
[D 06/18/20 15:10:25.648] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.649] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae38f000
[D 06/18/20 15:10:25.650] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 3
[D 06/18/20 15:10:25.650] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.651] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae392000
[D 06/18/20 15:10:25.652] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 4
[D 06/18/20 15:10:25.652] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.653] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae395000
[D 06/18/20 15:10:25.654] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 5
[D 06/18/20 15:10:25.655] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.655] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae398000
[D 06/18/20 15:10:25.656] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 6
[D 06/18/20 15:10:25.656] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.657] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae39b000
[D 06/18/20 15:10:25.658] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 7
[D 06/18/20 15:10:25.658] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.659] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae39e000
[D 06/18/20 15:10:25.660] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 8
[D 06/18/20 15:10:25.661] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.661] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3a1000
[D 06/18/20 15:10:25.662] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 9
[D 06/18/20 15:10:25.663] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.663] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3a4000
[D 06/18/20 15:10:25.664] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 10
[D 06/18/20 15:10:25.664] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.665] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3a7000
[D 06/18/20 15:10:25.666] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 11
[D 06/18/20 15:10:25.666] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.667] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3aa000
[D 06/18/20 15:10:25.668] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 12
[D 06/18/20 15:10:25.668] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.669] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3ad000
[D 06/18/20 15:10:25.670] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 13
[D 06/18/20 15:10:25.670] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.671] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3b0000
[D 06/18/20 15:10:25.672] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 14
[D 06/18/20 15:10:25.674] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.674] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3b3000
[D 06/18/20 15:10:25.675] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 15
[D 06/18/20 15:10:25.675] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.676] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3b6000
[D 06/18/20 15:10:25.677] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 16
[D 06/18/20 15:10:25.678] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.678] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3b9000
[D 06/18/20 15:10:25.679] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 17
[D 06/18/20 15:10:25.679] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.680] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3bc000
[D 06/18/20 15:10:25.681] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 18
[D 06/18/20 15:10:25.681] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.682] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3bf000
[D 06/18/20 15:10:25.683] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 19
[D 06/18/20 15:10:25.684] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.684] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3c2000
[D 06/18/20 15:10:25.686] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 20
[D 06/18/20 15:10:25.686] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.687] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3c5000
[D 06/18/20 15:10:25.688] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 21
[D 06/18/20 15:10:25.689] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.689] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3c8000
[D 06/18/20 15:10:25.690] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 22
[D 06/18/20 15:10:25.690] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.691] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3cb000
[D 06/18/20 15:10:25.692] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 23
[D 06/18/20 15:10:25.692] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.693] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3ce000
[D 06/18/20 15:10:25.694] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 24
[D 06/18/20 15:10:25.694] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.694] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3d1000
[D 06/18/20 15:10:25.696] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 25
[D 06/18/20 15:10:25.696] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.697] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3d4000
[D 06/18/20 15:10:25.698] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 26
[D 06/18/20 15:10:25.698] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.699] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3d7000
[D 06/18/20 15:10:25.700] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 27
[D 06/18/20 15:10:25.700] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.700] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3da000
[D 06/18/20 15:10:25.702] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 28
[D 06/18/20 15:10:25.702] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.702] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3dd000
[D 06/18/20 15:10:25.704] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 29
[D 06/18/20 15:10:25.704] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.704] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3e0000
[D 06/18/20 15:10:25.706] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 30
[D 06/18/20 15:10:25.706] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.706] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3e3000
[D 06/18/20 15:10:25.708] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 31
[D 06/18/20 15:10:25.708] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.708] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3e6000
[D 06/18/20 15:10:25.710] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 32
[D 06/18/20 15:10:25.715] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.716] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3e9000
[D 06/18/20 15:10:25.718] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 33
[D 06/18/20 15:10:25.719] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 8232 B (alignment 4096B)
[D 06/18/20 15:10:25.719] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3ec000
[D 06/18/20 15:10:25.721] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@104] Processing memory alloc request 34
[D 06/18/20 15:10:25.721] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@111] Allocating memory 3145728 B (alignment 4096B)
[D 06/18/20 15:10:25.722] [memory_pool.cpp:taichi::lang::MemoryPool::daemon@113] Allocated. Ptr = 0x20aae3ef000
[T 06/18/20 15:10:25.722] [program.cpp:taichi::lang::Program::materialize_layout@290] materialize_layout called
[T 06/18/20 15:10:25.824] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel clear_c12_0...
[T 06/18/20 15:10:26.001] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel clear_gradients_c30_0...
[T 06/18/20 15:10:26.060] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel clear_gradients_c30_1...
[T 06/18/20 15:10:26.105] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel clear_gradients_c30_2...
[T 06/18/20 15:10:26.158] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel clear_gradients_c30_3...
[T 06/18/20 15:10:26.209] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel clear_gradients_c30_4...
[T 06/18/20 15:10:26.259] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel clear_gradients_c30_5...
[T 06/18/20 15:10:26.359] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel initialize_c10_0...
[T 06/18/20 15:10:26.460] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel collide_c4_0...
[T 06/18/20 15:10:26.636] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel advance_c6_0...
[T 06/18/20 15:10:27.182] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel compute_loss_c8_0...
[T 06/18/20 15:10:27.222] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel compute_loss_c9_0_grad...
[T 06/18/20 15:10:27.265] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel advance_c7_0_grad...
[T 06/18/20 15:10:27.343] [C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py:__call__@458] Compiling kernel collide_c5_0_grad...
[E 06/18/20 15:10:27.409] [taichi/inc/statements.inc.h:taichi::lang::IRVisitor::visit@41] Not supported.
***********************************
* Taichi Compiler Stack Traceback *
***********************************
0x7ff981beb599: taichi::print_traceback(line 293 in C:\Users\xmk\Desktop\taichi\taichi\system\traceback.cpp) in taichi_core.pyd
0x7ff981c94040: taichi::Logger::error(line 115 in C:\Users\xmk\Desktop\taichi\taichi\util\logging.cpp) in taichi_core.pyd
0x7ff981a5012e: taichi::lang::IRVisitor::visit(line 41 in C:\Users\xmk\Desktop\taichi\taichi\inc\statements.inc.h) in taichi_core.pyd
0x7ff981c27d67: taichi::lang::MakeAdjoint::visit(line 328 in C:\Users\xmk\Desktop\taichi\taichi\transforms\make_adjoint.cpp) in taichi_core.pyd
0x7ff981c2713f: taichi::lang::MakeAdjoint::visit(line 148 in C:\Users\xmk\Desktop\taichi\taichi\transforms\make_adjoint.cpp) in taichi_core.pyd
0x7ff981c27ff2: taichi::lang::MakeAdjoint::visit(line 373 in C:\Users\xmk\Desktop\taichi\taichi\transforms\make_adjoint.cpp) in taichi_core.pyd
0x7ff981c2713f: taichi::lang::MakeAdjoint::visit(line 148 in C:\Users\xmk\Desktop\taichi\taichi\transforms\make_adjoint.cpp) in taichi_core.pyd
0x7ff981c27ff2: taichi::lang::MakeAdjoint::visit(line 373 in C:\Users\xmk\Desktop\taichi\taichi\transforms\make_adjoint.cpp) in taichi_core.pyd
0x7ff981c2713f: taichi::lang::MakeAdjoint::visit(line 148 in C:\Users\xmk\Desktop\taichi\taichi\transforms\make_adjoint.cpp) in taichi_core.pyd
0x7ff981c24584: taichi::lang::MakeAdjoint::run(line 134 in C:\Users\xmk\Desktop\taichi\taichi\transforms\make_adjoint.cpp) in taichi_core.pyd
0x7ff981c23bb1: taichi::lang::irpass::make_adjoint(line 600 in C:\Users\xmk\Desktop\taichi\taichi\transforms\make_adjoint.cpp) in taichi_core.pyd
0x7ff981a7fd8d: taichi::lang::irpass::compile_to_offloads(line 71 in C:\Users\xmk\Desktop\taichi\taichi\transforms\compile_to_offloads.cpp) in taichi_core.pyd
0x7ff981b3047e: taichi::lang::Kernel::lower(line 77 in C:\Users\xmk\Desktop\taichi\taichi\program\kernel.cpp) in taichi_core.pyd
0x7ff981b3c69e: taichi::lang::Program::compile(line 152 in C:\Users\xmk\Desktop\taichi\taichi\program\program.cpp) in taichi_core.pyd
0x7ff981b2f8ee: taichi::lang::Kernel::compile(line 63 in C:\Users\xmk\Desktop\taichi\taichi\program\kernel.cpp) in taichi_core.pyd
0x7ff981b2f76f: taichi::lang::Kernel::operator()(line 89 in C:\Users\xmk\Desktop\taichi\taichi\program\kernel.cpp) in taichi_core.pyd
0x7ff981b91b53: <lambda_c012fa2746999b8652d42a7860057057>::operator()(line 159 in D:\Anaconda3\Library\include\pybind11\pybind11.h) in taichi_core.pyd
0x7ff981b45ac6: <lambda_c012fa2746999b8652d42a7860057057>::<lambda_invoker_cdecl>(line 100 in D:\Anaconda3\Library\include\pybind11\pybind11.h) in taichi_core.pyd
0x7ff981a9a700: pybind11::cpp_function::dispatcher(line 624 in D:\Anaconda3\Library\include\pybind11\pybind11.h) in taichi_core.pyd
0x7ff994bdec13: PyMethodDef_RawFastCallDict in python37.dll
0x7ff994ce17b6: PyCFunction_FastCallDict in python37.dll
0x7ff994c2a830: PyErr_NoMemory in python37.dll
0x7ff994bc4c51: PyObject_Call in python37.dll
0x7ff994c42913: PyErr_NoMemory in python37.dll
0x7ff994bee6ea: PyObject_FastCallKeywords in python37.dll
0x7ff994bf6939: PyMethodDef_RawFastCallKeywords in python37.dll
0x7ff994bf6f1f: PyEval_EvalFrameDefault in python37.dll
0x7ff994be0192: PyEval_EvalCodeWithName in python37.dll
0x7ff994bdfe1a: PyFunction_FastCallDict in python37.dll
0x7ff994bfe55d: PySlice_New in python37.dll
0x7ff994bf7be4: PyEval_EvalFrameDefault in python37.dll
0x7ff994be0192: PyEval_EvalCodeWithName in python37.dll
0x7ff994bdfe1a: PyFunction_FastCallDict in python37.dll
0x7ff994c0341c: PyObject_Call_Prepend in python37.dll
0x7ff994c03389: PyCell_New in python37.dll
0x7ff994bfe4d4: PySlice_New in python37.dll
0x7ff994bf7be4: PyEval_EvalFrameDefault in python37.dll
0x7ff994bf67db: PyMethodDef_RawFastCallKeywords in python37.dll
0x7ff994bf6e73: PyEval_EvalFrameDefault in python37.dll
0x7ff994bdfd3d: PyFunction_FastCallDict in python37.dll
0x7ff994bdedda: PyMethodDef_RawFastCallDict in python37.dll
0x7ff994bde8fb: PyObject_FastCallDict in python37.dll
0x7ff994bf78a2: PyEval_EvalFrameDefault in python37.dll
0x7ff994bf67db: PyMethodDef_RawFastCallKeywords in python37.dll
0x7ff994bf6f1f: PyEval_EvalFrameDefault in python37.dll
0x7ff994be0192: PyEval_EvalCodeWithName in python37.dll
0x7ff994bba3ab: PyEval_EvalCodeEx in python37.dll
0x7ff994bba309: PyEval_EvalCode in python37.dll
0x7ff994bba2b3: PyArena_Free in python37.dll
0x7ff994d55539: PyRun_FileExFlags in python37.dll
0x7ff994d55d60: PyRun_SimpleFileExFlags in python37.dll
0x7ff994d55407: PyRun_AnyFileExFlags in python37.dll
0x7ff994ca1393: Py_UnixMain in python37.dll
0x7ff994ca143b: Py_UnixMain in python37.dll
0x7ff994c3f1e4: PyErr_NoMemory in python37.dll
0x7ff994bffedd: Py_Main in python37.dll
0x7ff994bffb8a: Py_Main in python37.dll
0x7ff6e41c1268: Unknown Function in python.exe
0x7ff9ec847bd4: BaseThreadInitThunk in KERNEL32.DLL
0x7ff9ed7cce51: RtlUserThreadStart in ntdll.dll
Internal Error occurred, check this page for possible solutions:
https://taichi.readthedocs.io/en/stable/install.html#troubleshooting
Traceback (most recent call last):
File "billiards.py", line 217, in <module>
optimize()
File "billiards.py", line 174, in optimize
forward(visualize=True, output=output)
File "C:\Users\xmk\Desktop\taichi\python\taichi\lang\tape.py", line 18, in __exit__
self.grad()
File "C:\Users\xmk\Desktop\taichi\python\taichi\lang\tape.py", line 27, in grad
func.grad(*args)
File "C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py", line 459, in __call__
return self.compiled_functions[key](*args)
File "C:\Users\xmk\Desktop\taichi\python\taichi\lang\kernel.py", line 423, in func__
t_kernel()
RuntimeError: [taichi/inc/statements.inc.h:taichi::lang::IRVisitor::visit@41] Not supported.
[T 06/18/20 15:10:27.911] [program.cpp:taichi::lang::Program::finalize@525] Program finalizing...
[T 06/18/20 15:10:27.914] [program.cpp:taichi::lang::Program::finalize@564] Program (0x20aa77a0f00) finalized.
(base) C:\Users\xmk\Desktop\difftaichi\examples>
Looks like an issue in make_adjoint.
Most helpful comment
Seems
solves the problem on my machine.
@xumingkuan Could you have a look on this? It should be about advanced optimization:
https://github.com/yuanming-hu/difftaichi/blob/master/examples/billiards.py