Add mask device, fix test
Add mask device, fix test

Reviewed By: azzolini

Differential Revision: D5930258

fbshipit-source-id: 16fdc2aeba7d95e815e55ca495118a5129495bb0

pietern/caffe2,sf-wind/caffe2,davinwang/caffe2,sf-wind/caffe2,Yangqing/caffe2,davinwang/caffe2,Yangqing/caffe2,Yangqing/caffe2,pietern/caffe2,davinwang/caffe2,caffe2/caffe2,pietern/caffe2,davinwang/caffe2,xzturn/caffe2,Yangqing/caffe2,xzturn/caffe2,sf-wind/caffe2,xzturn/caffe2,pietern/caffe2,sf-wind/caffe2,xzturn/caffe2,Yangqing/caffe2,sf-wind/caffe2,xzturn/caffe2,pietern/caffe2,davinwang/caffe2