Issue 1:
❓ Questions and Help

Hello,

I'm trying to run pytorch v1.0.0 on aws lambda for object detection inference, and i'm building the package on lambci/lambda:build-python3.6 docker image using the following command lines :

RUN git clone --recursive https://github.com/pytorch/pytorch.git --branch=v1.0.0

ENV NO_CUDA=1
ENV NO_TEST=1
ENV NO_NNPACK=1
ENV NO_QNNPACK=1
ENV NO_MKLDNN=1
ENV NO_DISTRIBUTED=1
ENV NO_CUDNN=1
ENV NO_FBGEMM=1
ENV NO_MIOPEN=1
ENV NO_CAFFE2_OPS=1
ENV BUILD_BINARY=0

RUN cd pytorch && python setup.py install

the torch package is build successfully and I'm able to upload it on aws lambda, but I get the following errors when I try to run inference :

Error in cpuinfo: failed to parse the list of possible procesors in /sys/devices/system/cpu/possible

Error in cpuinfo: failed to parse the list of present procesors in /sys/devices/system/cpu/present

knowing that I disabled NNPACK, QNNPACK and MKLDNN in the build above (I'm not sure if it's related or not)

I was able to do the same a couple months back using just caffe2, here is the snippet of code and the commit I was using:

RUN git clone --recursive https://github.com/pytorch/pytorch.git /caffe2
WORKDIR /caffe2
RUN git checkout 8601b33c079545bcd45b37983d2ec355b2215960
RUN git submodule update --init --recursive
RUN cp -a -r /caffe2/modules/detectron/*.cu /caffe2/caffe2/operators/
RUN cp -a -r /caffe2/modules/detectron/*.cc /caffe2/caffe2/operators/
RUN cp -a -r /caffe2/modules/detectron/*.h /caffe2/caffe2/operators/

RUN mkdir build && cd build && \
cmake -DUSE_GFLAGS=OFF \
-DUSE_GLOG=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_INSTALL_PREFIX="/cf2/" \
-DCMAKE_PREFIX_PATH="/cf2/" \
-DUSE_GLOO=OFF \
-DUSE_CUDA=OFF \
-DUSE_MPI=OFF \
-DUSE_METAL=OFF \
-DUSE_NCCL=OFF \
-DUSE_NNPACK=OFF \
-DUSE_MOBILE_OPENGL=OFF \
-DBUILD_CUSTOM_PROTOBUF=OFF \
-DUSE_LEVELDB=OFF \
-DUSE_LMDB=OFF \
-DUSE_NUMA=OFF \
-DUSE_OPENCV=OFF \
-DUSE_NCCL=OFF \
.. \
&& make -j$(nproc) \
&& make install/fast \
&& ldconfig

at that time I was getting the same cpuinfo error when i was building with NNPACK, but no problem once I disabled NNPACK

Thanks,

Bendidi

Issue 2:
🐛 Bug

I am running an image classification model with Serverless and AWS Lambda. Receiving following error upon calling the Serverless function; "Error in cpuinfo: failed to parse the list of present procesors in /sys/devices/system/cpu/present" - I did not misspell this, the spelling is copied from the error message I received and appear with the same spelling here;

https://github.com/pytorch/cpuinfo/blob/master/src/linux/processors.c

Suspected it might be something with Pytorch 1.0.0 so I switched back to Pytorch 0.4.1 which made it work.

To Reproduce

Steps to reproduce the behavior:

Run Pytorch in a Lambda with following whl in the requirements.txt;

Pillow==5.3.0

PyYAML==3.13

https://download.pytorch.org/whl/cpu/torch-1.0.0-cp36-cp36m-linux_x86_64.whl

torchvision==0.2.1

Load optional model and predict an image, this error should arise; "Error in cpuinfo: failed to parse the list of present procesors in /sys/devices/system/cpu/present"

and you will also get a timeout from the Lambda, regardless of how long timeout that is chosen; "Process exited before completing request"

No stack trace available, I only receive "Error in cpuinfo: failed to parse the list of present procesors in /sys/devices/system/cpu/present"

and a timeout error; "Process exited before completing request"

Expected behavior

Expected image prediction from the model every time a new image is uploaded.

Environment

PyTorch Version (e.g., 1.0): 1.0.0

OS (e.g., Linux): Linux

How you installed PyTorch (conda, pip, source): pip3

Build command you used (if compiling from source):

Python version: 3.6

CUDA/cuDNN version: No CUDA

GPU models and configuration: No GPU

Any other relevant information: Deployed with Serverless and AWS Lambda, 3008 GB memory and 30 second timeout, works with Pytorch 0.4.1

Additional context

Suspected it might be something with Pytorch 1.0.0 so I switched back to Pytorch 0.4.1 which made the image prediction work.

Let me know if I can provide any additional information.