Can't correclty import nnvm on tx2


I got the following error while importing nnvm on tx2, no matter I installed from pip or compiled from source, any solution ? thanks !

though I can’t import nnvm, but I can import xgboost directly

It also won’t show error if I import xgboost firtst and then nnvm, but it seems I would get another error later when I use tvm.relay.frontend, the error I refer to is segmentation fault when I load gluon.Block using tvm.relay.frontend, but I can use the function to load that block without error on my x86 machine, and I don’t know whether this error actually related to the " nnvm import error "

>>> import nnvm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nvidia/src/tvm/nnvm/python/nnvm/", line 10, in <module>
from . import frontend
File "/home/nvidia/src/tvm/nnvm/python/nnvm/frontend/", line 4, in <module>
from .onnx import from_onnx
File "/home/nvidia/src/tvm/nnvm/python/nnvm/frontend/", line 24, in <module>
from .onnx_caffe2_utils import dimension_picker, dimension_constraint, \
File "/home/nvidia/src/tvm/nnvm/python/nnvm/frontend/", line 20, in <module>
from nnvm.compiler import graph_util
File "/home/nvidia/src/tvm/nnvm/python/nnvm/compiler/", line 11, in <module>
from . import build_module
File "/home/nvidia/src/tvm/nnvm/python/nnvm/compiler/", line 25, in <module>
from tvm import autotvm
File "/home/nvidia/src/tvm/python/tvm/autotvm/", line 35, in <module>
from . import tuner
File "/home/nvidia/src/tvm/python/tvm/autotvm/tuner/", line 30, in <module>
from .xgboost_tuner import XGBTuner
File "/home/nvidia/src/tvm/python/tvm/autotvm/tuner/", line 20, in <module>
from .xgboost_cost_model import XGBoostCostModel
File "/home/nvidia/src/tvm/python/tvm/autotvm/tuner/", line 26, in <module>
import xgboost as xgb
File "/usr/local/lib/python3.5/dist-packages/xgboost-0.90-py3.5.egg/xgboost/", line 11, in <module>
from .core import DMatrix, Booster
File "/usr/local/lib/python3.5/dist-packages/xgboost-0.90-py3.5.egg/xgboost/", line 161, in <module>
_LIB = _load_lib()
File "/usr/local/lib/python3.5/dist-packages/xgboost-0.90-py3.5.egg/xgboost/", line 152, in _load_lib
'Error message(s): {}\n'.format(os_error_list))
xgboost.core.XGBoostError: XGBoost Library ( could not be loaded.
Likely causes:
* OpenMP runtime is not installed (vcomp140.dll or libgomp-1.dll for Windows, for UNIX-like OSes)
* You are running 32-bit Python on a 64-bit OS
Error message(s): ['/usr/lib/aarch64-linux-gnu/ cannot allocate memory in static TLS block', '/usr/lib/aarch64-linux-gnu/ cannot allocate memory in static TLS block']


Hi @chenjunweii

I think you need to install libgomp1 package in your environment.

Please help to refer to xgboost-throws-an-error-when-importing

Hope helps,


@cchung100m Thanks for your reply

But I’ve tried that solution before, and still got the same error …