2
$\begingroup$

I'm trying to utilize AWS EC2 p2.xlarge instance to convert images using style-transfer code given in this git repo:https://github.com/lengstrom/fast-style-transfer.git, yet when the input file becomes large, I keep running into this error:

2018-09-12 02:55:25.797741: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports 
instructions that this TensorFlow binary was not compiled to use: 
SSE4.1 SSE4.2 AVX AVX2 FMA
2018-09-12 02:55:25.797880: I tensorflow/core/common_runtime/process_util.cc:69] Creating new thread 
pool with default inter op setting: 2. Tune using 
inter_op_parallelism_threads for best performance.
Segmentation fault (core dumped)

This happens when the file size of the input is bigger than 130kb...yet works fine when the input is smaller than a certain size around 130kb. This defeats the purpose of using AWS, as any file of that small size would convert quite quickly on my computer too.

If anyone wants the files that I've used for testing, I could also upload it on the question.

$\endgroup$
2
  • $\begingroup$ What's Nvidia-smi/nvcc giving? Seems like the GPU is out of memy $\endgroup$
    – Aditya
    Sep 24, 2018 at 8:41
  • $\begingroup$ Have you checked the version of tensorflow running on aws? I believe that this instance comes with 12GB gpu memory and thus gpu memory should not be a problem. Also check the input dimensions in the code. If they are too large, tune them appropriately as it would drastically affect the number of parameters in the model causing this core dump. $\endgroup$
    – thanatoz
    Sep 24, 2018 at 11:38

2 Answers 2

3
$\begingroup$

I had similar issue.Just use tensorflow-gpu=1.5.0.

Follow these steps: $ pip uninstall tensorflow-gpu $ pip install tensorflow==1.5.0 $ pip install numpy==1.14.0 $ pip install six==1.10.0 $ pip install joblib==0.12

Hope this helps!

$\endgroup$
1
  • $\begingroup$ This actually worked!! $\endgroup$
    – Daniel
    Feb 7, 2019 at 4:35
2
+50
$\begingroup$

It might be a result of how you setup the instance. The GPU version of TensorFlow installed using conda or pip is not always optimized for certain hardware configurations. You can try to build TensorFlow from source, directions for an AWS EC2 p2.xlarge can be found here.

$\endgroup$
2
  • $\begingroup$ but its actually weird that its happening on a p2 instance $\endgroup$
    – Aditya
    Oct 1, 2018 at 1:21
  • $\begingroup$ I was actually using conda, so maybe that's the reason for this problem? Thanks for the reply; at least I have somewhere to get started on a solution. $\endgroup$
    – Daniel
    Oct 1, 2018 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.