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

Compiler issues found with regression testing #2

Open
riftEmber opened this issue May 5, 2020 · 2 comments
Open

Compiler issues found with regression testing #2

riftEmber opened this issue May 5, 2020 · 2 comments

Comments

@riftEmber
Copy link
Member

I added the following tests to the test folder. Each one contains (what I believe are) the expected results from the compiler, followed by a single method implementing the computation.
1.Matrix multiply (matrix_multiply.c)
2.Matrix/vector multiply (matrix_vector_multiply.c)
3.Forward (triangular) solve (forward_solve.c)
4.COO format sparse matrix vector multiply (coo_spmv.c)
5.CSR format spmv (csr_spmv.c)

Here are the issues I found -- discrepancies between my expectations and the compiler's results. They're really just lists of statements missing from the compiler's output, since that was the only sort of issue encountered. These tests were performed at d7ec3d9.

  1. return statement in the first if statement, everything after the first statement of the second (nested) loop including the return statement after the loops conclude.
  2. return statement in the first if, everything after first statement of the first loop (similar to the previous issue)
  3. every statement after the start of the second for loop (which is not nested in the first)
  4. the statement in the loop and the final return statement -- only the iterator variable initialization is counted
  5. same as previous, except there are two iterator variables with both initializations printed

Given my limited knowledge of the compiler code I don't know what is causing these issues yet. It does seem that the compiler ignores return statements entirely. From a separate test, I know it is not simply ignoring statements that occur inside an if -- however, when it does pick up a statement inside an if, the if condition is not noted in the iteration domain or execution schedule. Additionally, chunks of (sequential) statements with no clear reason for being left out were missing in almost every test.

@tpops
Copy link
Member

tpops commented May 5, 2020

  1. if statements can be represented as constraints in the presgbugger sets
    if a statement is in an if statement we take out the if statement but have the domain of elements in that if statement have a constraint of the if condition in the presburger formula.

  2. Return statements are ignored too
    the idea is to manipulate the content of the function (each individual statements) and go do some transformations on the IR and bring it back to replace the original code you dont want to permute your return statement right? or do transformation on your return statement

@tpops
Copy link
Member

tpops commented May 5, 2020

Ah i see about the if condition. There was a lot of things left un implemented in the software, I had to do all of this from the scratch in a single semester.

I would take note of them when I have the time to continue the project

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

2 participants