Removing unnecessary copies when copying data to device (#6390)
Removing unnecessary copies when copying data to device (#6390)

* Removing unnecessary copies when copying data to device

* Making python linter happy

* Really making pylint happy this time

* Using slice_axis

* Making pylint happy

sergeykolychev/mxnet,kkk669/mxnet,jermainewang/mxnet,CodingCat/mxnet,luoyetx/mxnet,yuruofeifei/mxnet,kevinthesun/mxnet,luoyetx/mxnet,formath/mxnet,arank/mxnet,vikingMei/mxnet,saurabh3949/mxnet,saurabh3949/mxnet,nicklhy/mxnet,precedenceguo/mxnet,EvanzzzZ/mxnet,weleen/mxnet,ShownX/incubator-mxnet,CodingCat/mxnet,arikpoz/mxnet,LinkHS/incubator-mxnet,yajiedesign/mxnet,precedenceguo/mxnet,larroy/mxnet,jermainewang/mxnet,nicklhy/mxnet,antoan2/incubator-mxnet,antoan2/incubator-mxnet,hotpxl/mxnet,Mega-DatA-Lab/mxnet,pluskid/mxnet,sergeykolychev/mxnet,Northrend/mxnet,jiajiechen/mxnet,hpi-xnor/BMXNet,hotpxl/mxnet,pluskid/mxnet,arank/mxnet,fullfanta/mxnet,wangyum/mxnet,solin319/incubator-mxnet,weleen/mxnet,navrasio/mxnet,formath/mxnet,eric-haibin-lin/mxnet,luoyetx/mxnet,jiajiechen/mxnet,jermainewang/mxnet,mbaijal/incubator-mxnet,thirdwing/mxnet,eric-haibin-lin/mxnet,jamesliu/mxnet,hotpxl/mxnet,jermainewang/mxnet,lxn2/mxnet,smolix/incubator-mxnet,dmlc/mxnet,ZihengJiang/mxnet,antoan2/incubator-mxnet,EvanzzzZ/mxnet,crazy-cat/incubator-mxnet,hpi-xnor/BMXNet,lxn2/mxnet,LinkHS/incubator-mxnet,tlby/mxnet,pluskid/mxnet,jennyzhang0215/incubator-mxnet,CodingCat/mxnet,yuruofeifei/mxnet,solin319/incubator-mxnet,ZihengJiang/mxnet,hesseltuinhof/mxnet,xcgoner/dist-mxnet,madjam/mxnet,leezu/mxnet,EvanzzzZ/mxnet,Ldpe2G/mxnet,szha/mxnet,reminisce/mxnet,antoan2/incubator-mxnet,pluskid/mxnet,smolix/incubator-mxnet,reminisce/mxnet,apache/incubator-mxnet,zhreshold/mxnet,smolix/incubator-mxnet,apaleyes/mxnet,rahul003/mxnet,hotpxl/mxnet,coder-james/mxnet,antoan2/incubator-mxnet,wangyum/mxnet,solin319/incubator-mxnet,solin319/incubator-mxnet,vikingMei/mxnet,apaleyes/mxnet,Mega-DatA-Lab/mxnet,formath/mxnet,rahul003/mxnet,crazy-cat/incubator-mxnet,ptrendx/mxnet,Ldpe2G/mxnet,danithaca/mxnet,sxjscience/mxnet,sergeykolychev/mxnet,vikingMei/mxnet,Mega-DatA-Lab/mxnet,hpi-xnor/BMXNet,jiajiechen/mxnet,rahul003/mxnet,arikpoz/mxnet,lxn2/mxnet,saurabh3949/mxnet,thirdwing/mxnet,wangyum/mxnet,jiajiechen/mxnet,weleen/mxnet,gautamkmr/incubator-mxnet,ShownX/incubator-mxnet,jennyzhang0215/incubator-mxnet,arank/mxnet,stefanhenneking/mxnet,ZihengJiang/mxnet,kevinthesun/mxnet,xcgoner/dist-mxnet,stefanhenneking/mxnet,solin319/incubator-mxnet,DR08/mxnet,lxn2/mxnet,hpi-xnor/BMXNet,kkk669/mxnet,jermainewang/mxnet,smolix/incubator-mxnet,TuSimple/mxnet,danithaca/mxnet,kevinthesun/mxnet,fullfanta/mxnet,Prasad9/incubator-mxnet,lxn2/mxnet,vikingMei/mxnet,crazy-cat/incubator-mxnet,stefanhenneking/mxnet,apache/incubator-mxnet,tlby/mxnet,larroy/mxnet,gautamkmr/incubator-mxnet,gautamkmr/incubator-mxnet,indhub/mxnet,ForkedReposBak/mxnet,dmlc/mxnet,jennyzhang0215/incubator-mxnet,Prasad9/incubator-mxnet,navrasio/mxnet,sxjscience/mxnet,hotpxl/mxnet,sxjscience/mxnet,antoan2/incubator-mxnet,indhub/mxnet,leezu/mxnet,tornadomeet/mxnet,arikpoz/mxnet,leezu/mxnet,ptrendx/mxnet,jennyzhang0215/incubator-mxnet,madjam/mxnet,danithaca/mxnet,hotpxl/mxnet,tlby/mxnet,crazy-cat/incubator-mxnet,hesseltuinhof/mxnet,szha/mxnet,ZihengJiang/mxnet,nicklhy/mxnet,formath/mxnet,Northrend/mxnet,hpi-xnor/BMXNet,luoyetx/mxnet,precedenceguo/mxnet,ForkedReposBak/mxnet,szha/mxnet,vikingMei/mxnet,danithaca/mxnet,kkk669/mxnet,Ldpe2G/mxnet,madjam/mxnet,EvanzzzZ/mxnet,DR08/mxnet,ZihengJiang/mxnet,pluskid/mxnet,TuSimple/mxnet,Ldpe2G/mxnet,thirdwing/mxnet,indhub/mxnet,apaleyes/mxnet,sergeykolychev/mxnet,solin319/incubator-mxnet,dmlc/mxnet,hesseltuinhof/mxnet,szha/mxnet,hpi-xnor/BMXNet,fullfanta/mxnet,vikingMei/mxnet,jermainewang/mxnet,Northrend/mxnet,DR08/mxnet,apache/incubator-mxnet,CodingCat/mxnet,jennyzhang0215/incubator-mxnet,Northrend/mxnet,sergeykolychev/mxnet,dmlc/mxnet,stefanhenneking/mxnet,jiajiechen/mxnet,navrasio/mxnet,DR08/mxnet,xcgoner/dist-mxnet,formath/mxnet,saurabh3949/mxnet,lxn2/mxnet,jennyzhang0215/incubator-mxnet,reminisce/mxnet,luoyetx/mxnet,Northrend/mxnet,yuruofeifei/mxnet,leezu/mxnet,ForkedReposBak/mxnet,zhreshold/mxnet,gautamkmr/incubator-mxnet,reminisce/mxnet,jennyzhang0215/incubator-mxnet,TuSimple/mxnet,DickJC123/mxnet,CodingCat/mxnet,ShownX/incubator-mxnet,pluskid/mxnet,luoyetx/mxnet,danithaca/mxnet,lxn2/mxnet,jiajiechen/mxnet,jiajiechen/mxnet,szha/mxnet,eric-haibin-lin/mxnet,yajiedesign/mxnet,DR08/mxnet,gautamkmr/incubator-mxnet,pluskid/mxnet,yajiedesign/mxnet,gautamkmr/incubator-mxnet,reminisce/mxnet,wangyum/mxnet,EvanzzzZ/mxnet,nicklhy/mxnet,ptrendx/mxnet,arank/mxnet,sxjscience/mxnet,tlby/mxnet,jamesliu/mxnet,indhub/mxnet,rahul003/mxnet,dmlc/mxnet,madjam/mxnet,reminisce/mxnet,apaleyes/mxnet,DickJC123/mxnet,indhub/mxnet,navrasio/mxnet,rahul003/mxnet,smolix/incubator-mxnet,reminisce/mxnet,danithaca/mxnet,TuSimple/mxnet,dmlc/mxnet,arank/mxnet,stefanhenneking/mxnet,fullfanta/mxnet,hotpxl/mxnet,rahul003/mxnet,fullfanta/mxnet,madjam/mxnet,madjam/mxnet,ykim362/mxnet,coder-james/mxnet,leezu/mxnet,piiswrong/mxnet,navrasio/mxnet,smolix/incubator-mxnet,thirdwing/mxnet,arikpoz/mxnet,ForkedReposBak/mxnet,jermainewang/mxnet,jamesliu/mxnet,madjam/mxnet,larroy/mxnet,rahul003/mxnet,mbaijal/incubator-mxnet,LinkHS/incubator-mxnet,zhreshold/mxnet,mbaijal/incubator-mxnet,hotpxl/mxnet,jiajiechen/mxnet,tlby/mxnet,yajiedesign/mxnet,kkk669/mxnet,yuruofeifei/mxnet,saurabh3949/mxnet,ForkedReposBak/mxnet,arank/mxnet,thirdwing/mxnet,yuruofeifei/mxnet,indhub/mxnet,Northrend/mxnet,kkk669/mxnet,larroy/mxnet,formath/mxnet,arikpoz/mxnet,piiswrong/mxnet,rahul003/mxnet,apaleyes/mxnet,coder-james/mxnet,indhub/mxnet,ptrendx/mxnet,piiswrong/mxnet,smolix/incubator-mxnet,tlby/mxnet,pluskid/mxnet,crazy-cat/incubator-mxnet,Prasad9/incubator-mxnet,EvanzzzZ/mxnet,weleen/mxnet,Prasad9/incubator-mxnet,apaleyes/mxnet,ptrendx/mxnet,jennyzhang0215/incubator-mxnet,larroy/mxnet,jamesliu/mxnet,Ldpe2G/mxnet,wangyum/mxnet,ZihengJiang/mxnet,jamesliu/mxnet,Mega-DatA-Lab/mxnet,precedenceguo/mxnet,mbaijal/incubator-mxnet,xcgoner/dist-mxnet,Ldpe2G/mxnet,Northrend/mxnet,coder-james/mxnet,crazy-cat/incubator-mxnet,hesseltuinhof/mxnet,solin319/incubator-mxnet,navrasio/mxnet,sxjscience/mxnet,vikingMei/mxnet,sxjscience/mxnet,xcgoner/dist-mxnet,weleen/mxnet,yajiedesign/mxnet,sxjscience/mxnet,nicklhy/mxnet,thirdwing/mxnet,hpi-xnor/BMXNet,danithaca/mxnet,wangyum/mxnet,kevinthesun/mxnet,fullfanta/mxnet,kkk669/mxnet,luoyetx/mxnet,ykim362/mxnet,yajiedesign/mxnet,EvanzzzZ/mxnet,hesseltuinhof/mxnet,precedenceguo/mxnet,vikingMei/mxnet,thirdwing/mxnet,ShownX/incubator-mxnet,antoan2/incubator-mxnet,navrasio/mxnet,kkk669/mxnet,stefanhenneking/mxnet,lxn2/mxnet,CodingCat/mxnet,LinkHS/incubator-mxnet,zhreshold/mxnet,DR08/mxnet,zhreshold/mxnet,sxjscience/mxnet,nicklhy/mxnet,xcgoner/dist-mxnet,ZihengJiang/mxnet,lxn2/mxnet,Prasad9/incubator-mxnet,nicklhy/mxnet,precedenceguo/mxnet,luoyetx/mxnet,DickJC123/mxnet,xcgoner/dist-mxnet,arikpoz/mxnet,reminisce/mxnet,saurabh3949/mxnet,yajiedesign/mxnet,hpi-xnor/BMXNet,navrasio/mxnet,TuSimple/mxnet,vikingMei/mxnet,zhreshold/mxnet,weleen/mxnet,mbaijal/incubator-mxnet,LinkHS/incubator-mxnet,weleen/mxnet,danithaca/mxnet,indhub/mxnet,tornadomeet/mxnet,larroy/mxnet,dmlc/mxnet,reminisce/mxnet,ykim362/mxnet,yajiedesign/mxnet,indhub/mxnet,tlby/mxnet,danithaca/mxnet,mbaijal/incubator-mxnet,piiswrong/mxnet,antoan2/incubator-mxnet,Prasad9/incubator-mxnet,ShownX/incubator-mxnet,hesseltuinhof/mxnet,kevinthesun/mxnet,formath/mxnet,yuruofeifei/mxnet,jermainewang/mxnet,luoyetx/mxnet,kevinthesun/mxnet,DR08/mxnet,tlby/mxnet,arikpoz/mxnet,DR08/mxnet,Prasad9/incubator-mxnet,Mega-DatA-Lab/mxnet,zhreshold/mxnet,stefanhenneking/mxnet,ShownX/incubator-mxnet,szha/mxnet,kevinthesun/mxnet,tlby/mxnet,tornadomeet/mxnet,stefanhenneking/mxnet,CodingCat/mxnet,dmlc/mxnet,coder-james/mxnet,gautamkmr/incubator-mxnet,wangyum/mxnet,yuruofeifei/mxnet,hotpxl/mxnet,ptrendx/mxnet,LinkHS/incubator-mxnet,gautamkmr/incubator-mxnet,jamesliu/mxnet,navrasio/mxnet,Mega-DatA-Lab/mxnet,zhreshold/mxnet,eric-haibin-lin/mxnet,nicklhy/mxnet,eric-haibin-lin/mxnet,xcgoner/dist-mxnet,coder-james/mxnet,Ldpe2G/mxnet,tornadomeet/mxnet,piiswrong/mxnet,saurabh3949/mxnet,eric-haibin-lin/mxnet,sergeykolychev/mxnet,apache/incubator-mxnet,arank/mxnet,EvanzzzZ/mxnet,nicklhy/mxnet,jennyzhang0215/incubator-mxnet,hesseltuinhof/mxnet,TuSimple/mxnet,jamesliu/mxnet,apaleyes/mxnet,TuSimple/mxnet,TuSimple/mxnet,LinkHS/incubator-mxnet,tornadomeet/mxnet,ptrendx/mxnet,ShownX/incubator-mxnet,crazy-cat/incubator-mxnet,Ldpe2G/mxnet,rahul003/mxnet,wangyum/mxnet,piiswrong/mxnet,ZihengJiang/mxnet,Ldpe2G/mxnet,stefanhenneking/mxnet,apaleyes/mxnet,solin319/incubator-mxnet,hpi-xnor/BMXNet,mbaijal/incubator-mxnet,thirdwing/mxnet,ForkedReposBak/mxnet,leezu/mxnet,sergeykolychev/mxnet,xcgoner/dist-mxnet,antoan2/incubator-mxnet,crazy-cat/incubator-mxnet,tornadomeet/mxnet,eric-haibin-lin/mxnet,larroy/mxnet,precedenceguo/mxnet,leezu/mxnet,ykim362/mxnet,leezu/mxnet,Mega-DatA-Lab/mxnet,DR08/mxnet,ShownX/incubator-mxnet,coder-james/mxnet,apaleyes/mxnet,ForkedReposBak/mxnet,leezu/mxnet,LinkHS/incubator-mxnet,eric-haibin-lin/mxnet,jamesliu/mxnet,CodingCat/mxnet,yuruofeifei/mxnet,kevinthesun/mxnet,ShownX/incubator-mxnet,EvanzzzZ/mxnet,larroy/mxnet,tornadomeet/mxnet,tornadomeet/mxnet,wangyum/mxnet,reminisce/mxnet,pluskid/mxnet,piiswrong/mxnet,yajiedesign/mxnet,tornadomeet/mxnet,Prasad9/incubator-mxnet,ykim362/mxnet,precedenceguo/mxnet,eric-haibin-lin/mxnet,fullfanta/mxnet,jermainewang/mxnet,arikpoz/mxnet,jiajiechen/mxnet,weleen/mxnet,ykim362/mxnet,szha/mxnet,fullfanta/mxnet,madjam/mxnet,crazy-cat/incubator-mxnet,mbaijal/incubator-mxnet,sergeykolychev/mxnet,Mega-DatA-Lab/mxnet,yuruofeifei/mxnet,smolix/incubator-mxnet,formath/mxnet,Northrend/mxnet,ptrendx/mxnet,ykim362/mxnet,kkk669/mxnet,Prasad9/incubator-mxnet,smolix/incubator-mxnet,szha/mxnet,mbaijal/incubator-mxnet,arikpoz/mxnet,tlby/mxnet,madjam/mxnet,Northrend/mxnet,ykim362/mxnet,jamesliu/mxnet,sergeykolychev/mxnet,LinkHS/incubator-mxnet,coder-james/mxnet,ZihengJiang/mxnet,piiswrong/mxnet,gautamkmr/incubator-mxnet,Mega-DatA-Lab/mxnet,saurabh3949/mxnet,ptrendx/mxnet,larroy/mxnet,szha/mxnet,weleen/mxnet,thirdwing/mxnet,TuSimple/mxnet,DickJC123/mxnet,sxjscience/mxnet,ForkedReposBak/mxnet,arank/mxnet,solin319/incubator-mxnet,TuSimple/mxnet,kkk669/mxnet,piiswrong/mxnet,coder-james/mxnet,saurabh3949/mxnet,ForkedReposBak/mxnet,hesseltuinhof/mxnet,kevinthesun/mxnet,arank/mxnet,precedenceguo/mxnet,zhreshold/mxnet,formath/mxnet,fullfanta/mxnet,ptrendx/mxnet,ykim362/mxnet,CodingCat/mxnet,dmlc/mxnet,hesseltuinhof/mxnet