-
Notifications
You must be signed in to change notification settings - Fork 193
add: example/BuddySpMM #493
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
base: main
Are you sure you want to change the base?
Conversation
examples/BuddySpMM/makefile
Outdated
-finalize-memref-to-llvm \ | ||
-reconcile-unrealized-casts | \ | ||
${MLIR_CPU_RUNNER} ${OPT_FLAG} -e main -entry-point-result=void \ | ||
-shared-libs=${MLIR_RUNNER_UTILS} -shared-libs=${MLIR_C_RUNNER_UTILS} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an empty line here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add more comments to describe this example and the kernel implementation.
// RUN: | mlir-cpu-runner -e main -entry-point-result=void \ | ||
// RUN: -shared-libs=%mlir_runner_utils_dir/libmlir_runner_utils%shlibext \ | ||
// RUN: -shared-libs=%mlir_runner_utils_dir/libmlir_c_runner_utils%shlibext \ | ||
// RUN: | FileCheck %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are using FileCheck to verify the example, but you missed the specific CHECK item.
Please see here as an example.
examples/BuddySpMM/verify_spmm.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please verify the correctness with FileCheck instead of a Python program.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples/BuddySparse
may be a more appropriate directory name for your example, as we can add more sparse kernels in this location.
@zhanghb97 Thank you very much for taking the time to review my code and provide valuable suggestions.I have made modifications based on your suggestions.f153080 |
To support more examples, I have implemented the example/BuddySpMM, which calculates sparse matrix multiplication through a three-layer loop.