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

Every example fails with an Assertion Error #43

Open
mame98 opened this issue Feb 21, 2019 · 8 comments
Open

Every example fails with an Assertion Error #43

mame98 opened this issue Feb 21, 2019 · 8 comments
Assignees

Comments

@mame98
Copy link

mame98 commented Feb 21, 2019

I am currently experimenting with this tool / library, but every example that I want to try fails with the following assertion error:

a.out: /path/to/easy-just-in-time/runtime/pass/InlineParameters.cpp:31: easy::HighLevelLayout GetNewLayout(const easy::Context &, easy::HighLevelLayout &): Assertion `C.size() == HLL.Args_.size()' failed.

Since I have no Idea about the internals of this project I do not know what to do. Do you have any idea whats wrong (or what I am missing?)?

Additional Information:

  • Happens during the call of easy::jit

  • Command used to compile the tests: clang++ --std=c++14 test.cpp -Xclang -load -Xclang /path/to/easy-just-in-time/build/bin/EasyJitPass.so -I /path/to/easy-just-in-time/include -L /path/to/easy-just-in-time/build/bin -lEasyJitRuntime -stdlib=libc++

@jmmartinez
Copy link
Owner

Hi Marius. Thanks for posting the Issue.

Do the tests of the library compile?
Can you show me the code that you're trying to compile?

@jmmartinez jmmartinez self-assigned this Feb 21, 2019
@mame98
Copy link
Author

mame98 commented Feb 21, 2019

No the library tests did not work either I think....

I used the following code to test:

#include <iostream>
#include <easy/jit.h>

using namespace std;

static void EASY_JIT_EXPOSE kernel(const int a, const int b, int  * const res)
{
    for(int x = 1; x < a; x++)
    {
        for(int y = 1; y < b; y++)
        {
            *res += a*b - b;
        }
    }
}

int main(int argc, char **argv)
{
    int res = 0;
    kernel(1000, 250000, &res);

    using namespace std::placeholders;
    auto kernel_opt = easy::jit(kernel, 1000, 250000, _1);
    kernel_opt(&res);
   
    cout << res << endl;
    return 0;
}

jmmartinez pushed a commit that referenced this issue Feb 21, 2019
@jmmartinez
Copy link
Owner

It works for me in my local configuration. I created a pull request where I added the code as a new test to see what the Continuous Integration says.

What version of the llvm are you using?

@mame98
Copy link
Author

mame98 commented Feb 21, 2019

As I am using a pretty old Debian System, I build a custom LLVM 6.0.1

@jmmartinez
Copy link
Owner

jmmartinez commented Feb 21, 2019 via email

@mame98
Copy link
Author

mame98 commented Mar 11, 2019

Sorry that it took so long, but here are the files that you requested.

CMakeCache.txt

issue_43.ll.gz

(I had to gzip the LLVM file, as GitHub would reject it otherwise)

@mame98
Copy link
Author

mame98 commented Jun 25, 2019

is there still activity in this?

@jmmartinez
Copy link
Owner

Sorry for the delay @mame98 . I wasn't able to reproduce it, and I did not have enough time to test with more configurations to see if I could trigger the error.

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

Successfully merging a pull request may close this issue.

2 participants