AVX2 not compiled on Caffe2 binary #524
Comments
@ir413 Thanks. I built a docker image using the Dockerfile that is provided here. As you can see it uses another image provided by Caffe2 So i think the original issue is in the compiled image by Caffe2. Is there any other available image that I can use on the Dockerfile and create a docker image that has AVX2 activated? |
I'm not sure if there are such Caffe2 images readily available. You can build your own Caffe2 image using the dockerfiles from here and make Detectron dockerfile use your custom Caffe2 image. |
Caffe2 images from the docker hub are quite old ( |
Thanks @ir413 , I would like to confirm if this is the message that appear when Caffe2 has been built with AVX2 correctly. Infering an image using Detectron built on a Caffe2 Image with AVX2: Infering same image using Detectron built on a Caffe2 Image without AVX2: It's correct supose that the infer_time has improved when AVX2 is used?
Thanks. |
@ambigus9 I am having the same issue as you. You seem to have got this resolved. Which Caffe2 Dockerfile did you use and which changes did you make to it? I tried out several things but I can't seem to get this running on my machine... |
Hi @michael230779 I recommend you to use this Dockerfile and after this line you should add this flag:
I hope to help you. Please let me know anything you need. |
@ambigus9 sorry for getting back to you so late. Did not have a chance to look at this before today. Thanks a lot for your help! I finally figured out a way that works for me. I am running the whole thing on a remote machine where I have limited permissions. Here are the changes I had to make in addition to the line you suggested. Maybe it can be of help for someone else. In my own caffe2 dockerfile I also changed the cuda base image to be version 9.0
And for some yet unknown reason, I also had to add the package "typing" to the pip install section
Finally, in the densepose dockerfile I had to change the Caffe2_DIR like this:
I got rid of the avx errors now. However, the processing time improvement is not as significant in my case as in your case @ambigus9 which makes me wonder if I got everything right. If anybody has any further suggestions, I am happy to hear them! |
I am also having trouble compiling with the cuda8 base image @michael230779 . I have just built the the new caffe2 image with AVX and now it's not using the GPU. So something got screwed up.. back to the drawing board. |
@ambigus9 I understand that quite some time has passed but I need to follow these steps to build a cpu only docker image for caffe2. But I still get the error about the FindCmake when building the detectron docker image (after changing Detectron/docker/Dockerfile to use the caffe2 image I built). Can you please share what additional steps you took? Thanks in advance. |
@manyaafonso Do you want to make it work only on cpu? If it's true, you only need to consider: docker pull caffe2ai/caffe2:c2v0.8.1.full.ubuntu16.04 |
@ambigus9 Thanks for your quick reply. It seems the docker image you are suggesting is no longer available. I get: Error response from daemon: manifest for caffe2ai/caffe2:c2v0.8.1.full.ubuntu16.04 not found |
Expected results
Not warning about AVX, AVX2
Actual results
Detailed steps to reproduce
Infersimple
System information
PYTHONPATH
environment variable: ?python --version
output: 2.7.12The text was updated successfully, but these errors were encountered: