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

fixed orc example, fixed part of arith example #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LlinksRechts
Copy link

This PR fixes parts of #13

I ran across the same problem when trying to run the ORC and Arith examples, so I took a deep dive into LLVM and found out the following:

ORC

This example was simply missing the registration of the module, ie. the call to withModule. Therefore, the add symbol could not be found (that llvm-hs simply returns a JITSymbolError "" without any message is a bug imo, I'm going to report that right after).

Arith

In this example, the symbol resolver was not registered and added to the resolver map. Therefore, an error was thrown in the call to withModule, which needs a resolver. However, this example still does not work (can't find the symbol); the problem lies somewhere in the module definition (I tried executing the module with the eagerJit function from ORC, and that didn't work either); I haven't been able to look into that more.

@LlinksRechts
Copy link
Author

LlinksRechts commented Jun 3, 2021

After some research I found that it is able to find the f symbol, but can't find sin. I haven't really looked into what arith actually does, so I haven't put too much more time into that.
EDIT: This is because the llvm libraries (in fact, no external libraries) are not linked, so llvm.sin.f64 is not available. I have yet to find out how to get it to link these in.

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 this pull request may close these issues.

None yet

1 participant