Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog/Wiki/Documentation on your approach to writing glas and gemm algorithm #12

Open
dataPulverizer opened this issue Mar 13, 2017 · 6 comments

Comments

@dataPulverizer
Copy link

Hi,

Your glas library is very interesting, and the benchmark for your gemm is impressive. I think users and potential contributors would benefit greatly from a series of blogs or documentation explaining the design approach you have taken for the whole library and for the gemm algorithm.

One of the issues about D is that the advanced methods, idioms, and techniques are not particularly well popularised as they are in C++. So I think a good set of blogs describing the techniques used in this library would greatly help the community. The same thing extends to other mir libraries but I am more interested in glas.

Thank you

@9il
Copy link
Member

9il commented Mar 13, 2017

Hi

The only D specific features was used is static if, static foreach, and pragma inline.

Other features is blocking, GLAS blocking is improved version of https://www.cs.utexas.edu/users/pingali/CS378/2008sp/papers/gotoPaper.pdf. LDC LLVM IR allows to make it generic.

If you are interesting to contribute or write an article we can chat in more details

@dataPulverizer
Copy link
Author

Thanks for the paper, I shall read it today! I would be happy to begin by writing an article on the implementation details of gemm with you. I will start with me asking lots of questions! The best way might be for me to make some commented questions on a forked copy of the glas library and you can write your answers there. Once I have a good idea of how the code works for instance how it uses llvm to improve performance, how it does pre-fetching, and cpu specific targeting and the role D's template/library tools play in composing all these together, I would be happy to write the article with you.

@9il
Copy link
Member

9il commented Mar 13, 2017

Looks good

@dataPulverizer
Copy link
Author

I have started looking at the code in your glas library and decided to start with a small module with fewest dependencies to begin to understand the library. I have forked the library and made some comment questions on the glas.ndslice.d module:

https://github.com/dataPulverizer/mir-glas-comments/commit/20ef2b8a0d3fd621d2844103fc42081c61b71851

I await your comments. Cheers

@RoyiAvital
Copy link

Is MIR Multi Threaded (Like Eigen) or only Single Thread?

@9il
Copy link
Member

9il commented May 3, 2018

  1. Mir GLAS is single thread and experimental.
  2. For other mir parts can be easily parallelised with https://dlang.org/phobos/std_parallelism.html as well as with some more efforts with C's alternatives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants