Getting stack overflow error with nnvm_quick_start.py

After cloning the current master-repo and building it for Windows 10 using the instructions given on the installation instructions. When I try to run the nnvm_quick_start.py tutorial example I receive a stackoverflow in the nnvm compiler

Traceback (most recent call last):
File “nnvm_quick_start.py”, line 83, in
net, target, shape={“data”: data_shape}, params=params)
File “d:\ProgramData\Anaconda3\lib\site-packages\nnvm-0.8.0-py3.6.egg\nnvm\compiler\build_module.py”, line 305, in build
graph = graph.apply(“GraphCompile”)
File “d:\ProgramData\Anaconda3\lib\site-packages\nnvm-0.8.0-py3.6.egg\nnvm\graph.py”, line 234, in apply
check_call(_LIB.NNGraphApplyPasses(self.handle, npass, cpass, ctypes.byref(ghandle)))
File “d:\ProgramData\Anaconda3\lib\site-packages\nnvm-0.8.0-py3.6.egg\nnvm_base.py”, line 75, in check_call
raise NNVMError(py_str(_LIB.NNGetLastError()))
nnvm._base.NNVMError: TVMCall CFunc Error:
Traceback (most recent call last):
File “d:\ProgramData\Anaconda3\lib\site-packages\nnvm-0.8.0-py3.6.egg\nnvm\compiler\build_module.py”, line 107, in _lower
f = tvm.lower(sch, inputs, name=func_name)
File “d:\ProgramData\Anaconda3\lib\site-packages\tvm-0.5.dev0-py3.6-win-amd64.egg\tvm\build_module.py”, line 365, in lower
cfg.unroll_explicit)
File “d:\ProgramData\Anaconda3\lib\site-packages\tvm-0.5.dev0-py3.6-win-amd64.egg\tvm_ffi_ctypes\function.py”, line 185, in call
ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
OSError: exception: stack overflow

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “d:\ProgramData\Anaconda3\lib\site-packages\tvm-0.5.dev0-py3.6-win-amd64.egg\tvm_ffi_ctypes\function.py”, line 55, in cfun
rv = local_pyfunc(*pyargs)
File “d:\ProgramData\Anaconda3\lib\site-packages\nnvm-0.8.0-py3.6.egg\nnvm\compiler\build_module.py”, line 115, in _lower
raise RuntimeError(msg)
RuntimeError: Traceback (most recent call last):
File “d:\ProgramData\Anaconda3\lib\site-packages\nnvm-0.8.0-py3.6.egg\nnvm\compiler\build_module.py”, line 107, in _lower
f = tvm.lower(sch, inputs, name=func_name)
File “d:\ProgramData\Anaconda3\lib\site-packages\tvm-0.5.dev0-py3.6-win-amd64.egg\tvm\build_module.py”, line 365, in lower
cfg.unroll_explicit)
File “d:\ProgramData\Anaconda3\lib\site-packages\tvm-0.5.dev0-py3.6-win-amd64.egg\tvm_ffi_ctypes\function.py”, line 185, in call
ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
OSError: exception: stack overflow
Error during compile graph
Graph(%input0,
%input1,
%input2,
%input3) {
%input0, shape=[1,64,56,56]
%input1, shape=[6,6,64,64]
%input2, shape=[64,1,1]
%input3, shape=[64,1,1]
%2 = _contrib_conv2d_winograd_without_weight_transform(%input0, %input1, channels=‘64’, groups=‘1’, kernel_size=’[3,3]’, strides=’[1,1]’, padding=’[1,1]’, use_bias=‘0’, dilation=’[1,1]’, layout=‘NCHW’, kernel_layout=‘OIHW’, out_dtype=‘same’, out_layout=‘undef’, tile_size=‘4’), shape=[1,64,56,56]
%4 = broadcast_mul(%2, %input2), shape=[1,64,56,56]
%6 = broadcast_add(%4, %input3), shape=[1,64,56,56]
%7 = relu(%6), shape=[1,64,56,56]
ret %7
}
graph_attr_keys = [shape, shape_num_unknown_nodes, dtype, dtype_num_unknown_nodes]

I compiled TVM with a LLVM7.01 x64 release build from source using Visual Studio 2015 x64

1 Like

I compiled TVM with a LLVM7.01 x64 release build from source using Visual Studio 2015 x64

Switching to Visual Studio 15 2017 Win64 with v14.11 toolset resolved this issue for me: