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
Could you please offer bazel BUILD files to build the repository? #379
Comments
I build the dynamic library using the following:
and the following code gives an segmentation fault error:
my BUILD file is as following:
Would you please tell me where I am wrong ? |
@hfp I am worried about that you may not see the message upwards. So excuse me for @ you. Thank you ! |
…The purpose is help getting started for those who wish to use Bazel. There is no intent to change our build system (make) or to actually support Bazel beyond this minimal starting point. Please note, the current "support" relies on header-only LIBXSMM's with "zero-config".
You may want to read the following commit message to realize the limitation of what was added. For your convenience, you can find our "Hello World" example equipped with some support for Bazel. |
Thank you for your kind and useful replies ! It's so nice of you. I am looking for a GEMM library for our deep learning applications. I have 2 matrix, one is the kernel which is fixed in inference, the other is the activation which varies time to time. The size is 1 * 512 * 512, and the MM will repeat many times. Recently I have demand for faster MM and Sparse MM that computed in bfloat16. Could I ask if the libxsmm will make it in your opinion ? Thank you ! |
Thank you, Yablon for your kind words!
For deep learning, the bf16sgemm sample can be interesting. It uses a flavour of our kernel that not only runs a singular GEMM but rather a whole batch of multiplications in one call. The kernel is available in several flavours accepting different input data. The sample code shows the strided flavour ("strd"). This sort of code is especially suitable for code that wants to control the loop-nest running the kernel.
For further questions, @alheinecke may be also willing to help. There is a whole collection of other code samples that perform more out-of-the-box tasks related to deep learning (https://github.com/hfp/libxsmm/tree/master/samples/deeplearning). The GxM framework among this set of samples would be also able to run entire CNN topologies (prototxt). Further, you may want to have a look at PlaidML (please note it's the "v1" branch), which uses LIBXSMM when targeting CPUs. |
I would look into https://github.com/hfp/libxsmm/blob/master/samples/xgemm/kernel.c for a good bf16 example. The bf16sgemm mentioned above is very specific case for trailing updates / sizes. |
hi, @alheinecke, thank you for your reply. Do I get a code dispatch one in that example ? I got thousands of hundreds of matrix mulplication between a varying A and fixed B. I want to minimize the cost between the same mulplication. |
hi, @hfp Thank you ! I have read the example and I will try and compare with my current GEMM library. It's late in night in East Asia now. I would test it tomorrow moring and hope you safe and sound. |
I can build with tensorflow's BUILD file. But at runtime, the following codes would give "Sementation Fault"
my BUILD file is
The text was updated successfully, but these errors were encountered: