-
Notifications
You must be signed in to change notification settings - Fork 7
add the polybench testcases to the test folder #64
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?
add the polybench testcases to the test folder #64
Conversation
779f622 to
92d41c2
Compare
tests/polybench/benchmarks/2mm.py
Outdated
| dump_mlir=False, | ||
| auto_build=True, | ||
| target_class=compilation_target, | ||
| dataset=current_dataset, |
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.
What is this? From CompilationSettings, this seems to be something only used for PolyCTarget?
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.
It's probably more appropriate to merge this into tests/helper.py?
| parsed_args["c_test"] = False | ||
| parsed_args["compilation_target"] = CTarget | ||
| parsed_args["current_dataset"] = "SMALL_DATASET" | ||
| parsed_args["output_array"] = False | ||
| parsed_args["ctest_obj"] = "" |
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.
Ah ok. These are just default values. Maybe write a one-line comment about that.
|
Actually @jamesthejellyfish can you give me a high level overview of how these testcases work, e.g. where do you get the input from, what parts are new and what parts are there just so you don't have to modify the existing implementation? Like the general thing of passing arguments as command line arguments is largely due to compatibility with |
Sure thing. Basically the inputs are defined within each function based on what is used in the upstream polybench init_arrays implementation. And I was trying to minimize the need to alter the existing implementations which is why the arguments are passed as command line arguments, yes. I don't know if that was an |
| rm "${benchmark_name}_mod.c" | ||
| rm "${benchmark_name}.h" | ||
| echo "Generated file: ${OUTPUT_DIR}/${benchmark_name}.so" | ||
| done No newline at end of file |
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.
No newline at end of file.
gauss-filter is not a polybench testcase. The one we are missing from the 30 is nussinov, which needs affine.if python binding that's added in llvm-20. The gauss-filter kernel written by James long time ago was to test PyDSL's expressability on a CV related kernel, the syntax is probably outdated, so I think it's ok to leave it. |
ah okay I do vaguely remember that with nussinov. I was looking at this documentation here: https://sourceforge.net/p/polybench/wiki/Home/ and it includes gauss-filter as a polybench testcase which is why I assumed we were missing that one |
the downloaded polybench package has floyd-warshall but does not have gauss-filter... I didn't even know the polybench's documentation has this mistake.. |
Why does GitHub not have proper reply feature for comments directly in the PR... Ok, so you are saying I should only review Ok so the input is not stored in text files or generated by an external program, but rather it is the code that looks like this (?): PyDSL/tests/polybench/benchmarks/lu.py Lines 79 to 85 in 92d41c2
Something I am still confused about is, what is Also it is still hard for me to figure out some things about how the functions are called, mainly what command line arguments are passed in and thus what branches are taken. E.g. do we pass in
Okay, we don't have to add it while we are on LLVM 19 then. |
That's not exactly what I'm saying. I modeled my approach to try and change the 29 files as little as possible
yes exactly. And this is a python implementation that mirrors what is done in the polybench C files.
we pass in c_test only if the |
fb7b109 to
4259f06
Compare
… a bash script for a user to generate the so files
4259f06 to
6c34ca2
Compare


migrates the polybench testcases over to PyDSL. All files in
tests/polybench/benchmarksare largely unchanged, the main addition is thetest_polybench.pyfile. A bash script is also added so that a user to generate the polybench .so files if they provide a Polybench directory, and then those will be used instead of the golden files for checking against, if they exist.