Knet.jl icon indicating copy to clipboard operation
Knet.jl copied to clipboard

dotview performance with KnetArray

Open denizyuret opened this issue 3 years ago • 0 comments

kx::Param{KnetArray}                                                                                                               
kx[:] = 0   # 29us   -- setindex!(kx, 0, :)  !!! illegal on ax, crashes on cx                                                      
kx[:] .= 0  # 34us   -- materialize!(dotview(kx,:),broadcasted(identity,0))                                                        
kx .= 0     # 1380us -- materialize!(kx, broadcasted(identity, 0))                                                                 
kx.value[:] = 0   # 31us                                                                                                           
kx.value[:] .= 0  # 1417us                                                                                                         
kx.value .= 0     # 66us                                                                                                           

denizyuret avatar Dec 26 '20 14:12 denizyuret