You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/04 17:38:50 UTC

[GitHub] anirudh2290 opened a new pull request #8938: Add operator for dot(dns, csr) = csr

anirudh2290 opened a new pull request #8938: Add operator for dot(dns, csr) = csr
URL: https://github.com/apache/incubator-mxnet/pull/8938
 
 
   ## Description ##
   Adds operator for dot(dns, csr) = csr. Backward pass will fallback to default implementations.
   The performance is better than dot(dns, dns) for sparsity less than 0.5%. Below are the results:
   ```
   ========================================================
     mxnet sparse dot benchmark: dot(default, csr) = csr
     (matrix multiplication: (m x k) * (k x n) = m x n)
   ========================================================
    lhs_density(%)  rhs_density(%)    context        m        k        n  t_sparse(ms)   t_dense(ms)  speedup
               1.0             0.1     cpu(0)     1000      128  1000000        337.74       1810.42     5.36
               1.0             0.1     cpu(0)     1000       64  1000000        172.71       1653.84     9.58
               1.0             0.1     cpu(0)     1000      128  1000000        345.05       1810.87     5.25
               1.0             0.1     cpu(0)      256      128  1000000         89.88        466.65     5.19
               1.0             0.1     cpu(0)     1000      128  1000000        335.76       1785.21     5.32
               0.1             0.1     cpu(0)     1000      128  1000000        332.17       1815.71     5.47
               0.5             0.5     cpu(0)     1000      128  1000000       1718.80       1764.55     1.03
               1.0             1.0     cpu(0)     1000      128  1000000       3434.07       1681.34     0.49
               2.0             2.0     cpu(0)     1000      128  1000000       7621.03       1689.58     0.22
               5.0             5.0     cpu(0)     1000      128  1000000      15715.25       1738.18     0.11
              10.0            10.0     cpu(0)     1000      128  1000000      22354.31       1602.44     0.07
              20.0            20.0     cpu(0)     1000      128  1000000      26913.53       1735.68     0.06
   ```
   
   ## Checklist ##
   ### Essentials ###
   - [x] Passed code style checking (`make lint`)
   - [] Changes are complete (i.e. I finished coding on this PR)
   - [x] All changes have test coverage
   - [] For user-facing API changes, API doc string has been updated. For new C++ functions in header files, their functionalities and arguments are well-documented. 
   - [x] To my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - [x] dot(dns, csr) = csr, tests, (and when applicable, API doc)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services