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