-
Notifications
You must be signed in to change notification settings - Fork 145
Getting started programming examples #2502
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
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
clang-format
[clang-format] reported by reviewdog 🐶
mlir-aie/programming_examples/0_getting_started/04_matrix_multiplication_single_core/test.cpp
Lines 107 to 111 in d72a546
// Print elapsed time | |
constexpr unsigned n_ops = M * K * N * 2; | |
float throughput = n_ops / t_elapsed / 1e3; // GOP/s | |
std::cout << "Elapsed: " << t_elapsed << " us " | |
<< "(" << throughput << " GOP/s)" << std::endl; |
[clang-format] reported by reviewdog 🐶
mlir-aie/programming_examples/0_getting_started/04_matrix_multiplication_single_core/test.cpp
Lines 113 to 115 in d72a546
// Validate correctness of output | |
int16_t *ref_c = static_cast<int16_t *>(std::malloc(M * N * sizeof(int16_t))); // reference output calculated on the CPU | |
reference(buf_a, buf_b, ref_c); |
[clang-format] reported by reviewdog 🐶
mlir-aie/programming_examples/0_getting_started/04_matrix_multiplication_single_core/test.cpp
Lines 117 to 122 in d72a546
if (std::equal(ref_c, ref_c + size_c, buf_c)) { | |
std::cout << "PASS!" << std::endl; | |
} else { | |
std::cout << "FAIL." << std::endl; | |
return 1; | |
} |
[clang-format] reported by reviewdog 🐶
Coverage ReportCreated: 2025-09-04 21:53Click here for information about interpreting this report.
Generated by llvm-cov -- llvm version 18.1.3 |
Co-authored-by: Joseph Melber <jgmelber@gmail.com>
...mming_examples/getting_started/03_matrix_multiplication_single_core/matrix_multiplication.cc
Show resolved
Hide resolved
Co-authored-by: Muhammad Awad <112003944+mawad-amd@users.noreply.github.com>
programming_examples/getting_started/02_vector_reduce_max/vector_reduce_max_1col.py
Outdated
Show resolved
Hide resolved
...es/getting_started/03_matrix_multiplication_single_core/matrix_multiplication_single_core.py
Outdated
Show resolved
Hide resolved
...es/getting_started/03_matrix_multiplication_single_core/matrix_multiplication_single_core.py
Outdated
Show resolved
Hide resolved
Thank you @mawad-amd and @ypapadop-amd for the comments and suggestions. I will apply them now! |
…mlir-aie into getting-started-examples
…g-started-examples
This PR introduces getting_started IRON programming examples:
These designs are self-contained, with fixed problem sizes, and aim to introduce users to IRON and NPU capabilities. All designs are developed using the JIT workflow.