second.pytorch
second.pytorch copied to clipboard
Segmentation fault when training the network numba falling back to object mode error
While training the network using the command
python ./pytorch/train.py train --config_path=./configs/car.fhd.config --model_dir=model_dir
I get a Segmentation Fault. Seems it is the issue with Numba and jit in the file core/geometry.py.
I am using latest numba version 0.45.1.
which is the correct version of numba to be used for this repository??
Error:
/home/anshul/deep_tracking/codes/second.pytorch/second/core/geometry.py:272: NumbaWarning:
Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Invalid use of Function(<built-in function getitem>) with argument(s) of type(s): (array(float32, 3d, C), (slice<a:b>, list(int64), slice<a:b>))
In definition 10:
TypeError: unsupported array index type list(int64) in (slice<a:b>, list(int64), slice<a:b>)
raised from /home/anshul/deep_tracking/env/pytorch_py3/lib/python3.6/site-packages/numba/typing/arraydecl.py:71
In definition 11:
TypeError: unsupported array index type list(int64) in (slice<a:b>, list(int64), slice<a:b>)
raised from /home/anshul/deep_tracking/env/pytorch_py3/lib/python3.6/site-packages/numba/typing/arraydecl.py:71
This error is usually caused by passing an argument of a type that is unsupported by the named function.
[1] During: typing of intrinsic-call at /home/anshul/deep_tracking/codes/second.pytorch/second/core/geometry.py (288)
File "core/geometry.py", line 288:
def points_in_convex_polygon_jit(points, polygon, clockwise=True):
<source elided>
vec1 = polygon - polygon[:, [num_points_of_polygon - 1] +
list(range(num_points_of_polygon - 1)), :]
@numba.jit
/home/anshul/deep_tracking/codes/second.pytorch/second/core/geometry.py:272: NumbaWarning:
Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: cannot determine Numba type of <class 'numba.dispatcher.LiftedLoop'>
File "core/geometry.py", line 296:
def points_in_convex_polygon_jit(points, polygon, clockwise=True):
<source elided>
cross = 0.0
for i in range(num_points):
@numba.jit
/home/anshul/deep_tracking/env/pytorch_py3/lib/python3.6/site-packages/numba/compiler.py:742: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops.
File "core/geometry.py", line 273:
@numba.jit
def points_in_convex_polygon_jit(points, polygon, clockwise=True):
^
warnings.warn(errors.NumbaDeprecationWarning(msg, self.func_ir.loc))
Segmentation fault (core dumped)
I have been using Numba version 0.43.1 successfully for a while.
0.44 has starting showing some deprecation warnings for me, see here for more details.
While training the network using the command
python ./pytorch/train.py train --config_path=./configs/car.fhd.config --model_dir=model_dirI get a Segmentation Fault. Seems it is the issue with Numba and jit in the file core/geometry.py. I am using latest numba version 0.45.1. which is the correct version of numba to be used for this repository??Error:
/home/anshul/deep_tracking/codes/second.pytorch/second/core/geometry.py:272: NumbaWarning: Compilation is falling back to object mode WITH looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: Invalid use of Function(<built-in function getitem>) with argument(s) of type(s): (array(float32, 3d, C), (slice<a:b>, list(int64), slice<a:b>)) In definition 10: TypeError: unsupported array index type list(int64) in (slice<a:b>, list(int64), slice<a:b>) raised from /home/anshul/deep_tracking/env/pytorch_py3/lib/python3.6/site-packages/numba/typing/arraydecl.py:71 In definition 11: TypeError: unsupported array index type list(int64) in (slice<a:b>, list(int64), slice<a:b>) raised from /home/anshul/deep_tracking/env/pytorch_py3/lib/python3.6/site-packages/numba/typing/arraydecl.py:71 This error is usually caused by passing an argument of a type that is unsupported by the named function. [1] During: typing of intrinsic-call at /home/anshul/deep_tracking/codes/second.pytorch/second/core/geometry.py (288) File "core/geometry.py", line 288: def points_in_convex_polygon_jit(points, polygon, clockwise=True): <source elided> vec1 = polygon - polygon[:, [num_points_of_polygon - 1] + list(range(num_points_of_polygon - 1)), :] @numba.jit /home/anshul/deep_tracking/codes/second.pytorch/second/core/geometry.py:272: NumbaWarning: Compilation is falling back to object mode WITHOUT looplifting enabled because Function "points_in_convex_polygon_jit" failed type inference due to: cannot determine Numba type of <class 'numba.dispatcher.LiftedLoop'> File "core/geometry.py", line 296: def points_in_convex_polygon_jit(points, polygon, clockwise=True): <source elided> cross = 0.0 for i in range(num_points): @numba.jit /home/anshul/deep_tracking/env/pytorch_py3/lib/python3.6/site-packages/numba/compiler.py:742: NumbaWarning: Function "points_in_convex_polygon_jit" was compiled in object mode without forceobj=True, but has lifted loops. File "core/geometry.py", line 273: @numba.jit def points_in_convex_polygon_jit(points, polygon, clockwise=True): ^ warnings.warn(errors.NumbaDeprecationWarning(msg, self.func_ir.loc)) Segmentation fault (core dumped)
@anshulpaigwar Have you found correct version of numba for this repository?