kev-inn opened a new pull request, #1643: URL: https://github.com/apache/systemds/pull/1643
# `DoubleVector` replacement for matrix multiply JDK 17 adds `Vector` classes to use SIMD instructions. This PR replaces the basic dense dense matrix multiply with an equivalent `DoubleVector` implementation. It is necessary to use JDK 17, therefore we should not merge this yet, but keep it in staging for future reference. As an experiment we check a simple matrix multiply: `Z = X %*% Y`, $X\in \mathbb{R}^{n\times k}, Y\in \mathbb{R}^{k\times m}$ The experiment script performs 10 matrix multiplications and saves the time of the last 5 to give the JVM some time to optimize. ## Vary rows n, m fixed at 1000 ### Alpha Node | $k = 1000$ | $k = 10000$ | | --------------- | --------------- | |  |  | ### Lima Node | $k = 1000$ | $k = 10000$ | | --------------- | --------------- | |  |  | ## Vary cols m, n fixed at 1000 ### Alpha Node | $k = 1000$ | $k = 10000$ | | --------------- | --------------- | |  |  | ### Lima Node | $k = 1000$ | $k = 10000$ | | --------------- | --------------- | |  |  | ## Conclusion The implementation seems to boost the performance in most cases. The case where we vary the number of columns n on the alpha node needs some more exploration, but it seems we are never worse than the current implementation. ## Experiment Script ```R X = read($Xfname); Y = read($Yfname); lim = 10; R = matrix(0, rows=lim, cols=1); for (i in 1:lim) { t1 = time(); Z = X %*% Y; t2 = time(); R[i,1] = (t2-t1)/1000000; } print(sum(Z)); res = R[5:lim,]; write(res, $fname, format="csv", sep="\t"); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@systemds.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org