Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol on c5.4xlarge #73

Closed
yugoren opened this issue Jan 31, 2020 · 2 comments
Closed

undefined symbol on c5.4xlarge #73

yugoren opened this issue Jan 31, 2020 · 2 comments

Comments

@yugoren
Copy link

yugoren commented Jan 31, 2020

I was following BERT example on a c5.4xlarge instance when I came across the following error:

ImportError: /home/ubuntu/anaconda3/envs/aws_neuron_tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/neuron/_whitelist_partition_swig.so: undefined symbol: _ZN10tensorflow10FileSystem20RecursivelyCreateDirERKSs

when I ran bert_model.py. Here's a MWE without BERT example:

(aws_neuron_tensorflow_p36) ubuntu@ip-172-31-95-164:~/aws-neuron-sdk/src/examples/tensorflow/bert_demo$ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from tensorflow.neuron import fuse
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/ubuntu/anaconda3/envs/aws_neuron_tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/_api/v1/neuron/__init__.py", line 10, in 
    from tensorflow._api.v1.neuron import graph_util
  File "/home/ubuntu/anaconda3/envs/aws_neuron_tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/_api/v1/neuron/__init__.py", line 10, in 
    from tensorflow._api.v1.neuron import graph_util
  File "/home/ubuntu/anaconda3/envs/aws_neuron_tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/_api/v1/neuron/graph_util/__init__.py", line 10, in 
    from tensorflow.python.neuron.python.graph_util import inference_graph_from_session
  File "/home/ubuntu/anaconda3/envs/aws_neuron_tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/neuron/python/graph_util.py", line 42, in 
    from tensorflow.python.neuron.whitelist_partition_swig import WhitelistPartition
  File "/home/ubuntu/anaconda3/envs/aws_neuron_tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/neuron/whitelist_partition_swig.py", line 28, in 
    _whitelist_partition_swig = swig_import_helper()
  File "/home/ubuntu/anaconda3/envs/aws_neuron_tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/neuron/whitelist_partition_swig.py", line 24, in swig_import_helper
    _mod = imp.load_module('_whitelist_partition_swig', fp, pathname, description)
  File "/home/ubuntu/anaconda3/envs/aws_neuron_tensorflow_p36/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/ubuntu/anaconda3/envs/aws_neuron_tensorflow_p36/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/ubuntu/anaconda3/envs/aws_neuron_tensorflow_p36/lib/python3.6/site-packages/tensorflow_core/python/neuron/_whitelist_partition_swig.so: undefined symbol: _ZN10tensorflow10FileSystem20RecursivelyCreateDirERKSs

Same missing symbol error is also present for from tensorflow import neuron as tfn. I also found out that this works without a problem on inf1.6xlarge.

@yugoren yugoren changed the title undefined symbol when importing fuse on c5.4xlarge undefined symbol on c5.4xlarge Jan 31, 2020
@awsrjh
Copy link
Contributor

awsrjh commented Jan 31, 2020

Hello yugoren

let us have a look and get back to you.

@spring01
Copy link
Contributor

This issue is caused by a mismatch between installed tensorflow and the needed tensorflow-neuron packages, such as with tensorflow-gpu or tensorflow==2.0.

The solution is to reinstall tensorflow-neuron with one of two methods:

Using pip:

pip install tensorflow-neuron --force

Or by using conda:

conda install tensorflow-neuron --force

@awsrjh awsrjh closed this as completed Feb 12, 2020
aws-mesharma pushed a commit that referenced this issue Sep 22, 2020
[tf yolo v4] add drawing a sample image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants