Git Product home page Git Product logo

Comments (11)

wsmoses avatar wsmoses commented on May 20, 2024

What version of llvm/clang are you using?

from enzyme.

chrislupp avatar chrislupp commented on May 20, 2024

sorry, forgot to add that. Clang 11.1.0

from enzyme.

wsmoses avatar wsmoses commented on May 20, 2024

No worries, ok that rules out the new pass manager causing disruption.

What version of Enzyme did you use (and how did you build/install it)?

Also which clang are you using (apple installed version, homebrew, or something distinct)? Just to double check, mind pasting the output of clang++ --version

from enzyme.

chrislupp avatar chrislupp commented on May 20, 2024

sorry for the delay in responding, I've only been working on this in the evenings.

I believe that I am using the apple installed clang version. The output from clang++ --version is:

clang version 11.1.0
Target: x86_64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

I am using Enzyme 0.0.9 (I installed it a few weeks ago and haven't updated since). I installed it via homebrew on macOS Big Sur.

from enzyme.

chrislupp avatar chrislupp commented on May 20, 2024

A brief update, I've updated enzyme to 0.0.11 and clang 12.0.0. And I'm pretty sure it's clang via homebrew not apple's version. Unfortunately, the missing symbol issue is still happening post update.

from enzyme.

wsmoses avatar wsmoses commented on May 20, 2024

Hi Chris,

Do you mind trying to add -lowerinvoke prior to calling Enzyme within opt, then trying again?

opt input.ll -lowerinvoke -load= ClangEnzyme-11.dylib -enzyme -o output.ll -S

from enzyme.

wsmoses avatar wsmoses commented on May 20, 2024

Also note that it appears homebrew has updated to LLVM 12, but has the default Enzyme install on LLVM 11, so you may also need to be explicit in using the right Clang (I'll update homebrew to keep enzyme at 12 as well shortly).

$ /usr/local/Cellar/llvm\@11/11.1.0_1/bin/clang++ test.cpp -I /usr//local/Cellar/eigen/3.3.9/include/eigen3 -S -emit-llvm -o input.ll -O3 -fno-vectorize -fno-slp-vectorize -fno-unroll-loops
$ /usr/local/Cellar/llvm\@11/11.1.0_1/bin/opt input.ll -lowerinvoke -load=LLVMEnzyme-11.dylib -enzyme -o output.ll -S
$ /usr/local/Cellar/llvm\@11/11.1.0_1/bin/clang++ output.ll -O3 -o matrix
$ ./matrix
5

0
2
4

from enzyme.

chrislupp avatar chrislupp commented on May 20, 2024

Thanks. The use of -lowerinvoke solved the missing symbols issue.

It might be worth noting that I switched to a docker image that I created as an Enzyme playground. Not sure if you think something like that is useful for others to experiment around with. But if so, I could try to find a way to share it (dockerfile pull request or an image on dockerhub).

from enzyme.

wsmoses avatar wsmoses commented on May 20, 2024

Following up here quickly (apologies on the delay as had a paper hackathon this weekend). The lowerinvoke should now no longer be needed regardless.

As do your docker playground that would definitely be useful!

If you build one, would you mind adding it to the website (the www branch of this repo)?

from enzyme.

chrislupp avatar chrislupp commented on May 20, 2024

No problem, know the feeling regarding papers. I just wanted to close the issue as it wasn't a problem any more.

Yeah, I can add a brief description/instructions to the website (aside from putting an image on dockerhub). But I will have to check if I have to run the dockerfile/image and the text for the website through the release process at work first. So it could potentially take a few weeks.

from enzyme.

chrislupp avatar chrislupp commented on May 20, 2024

Not sure if you use Docker, but I just pushed an image to Docker Hub set up with Enzyme for C/C++. It can be found under chrislupp/enzyme-playground. I'm putting together a brief guide for the website and will file a pull request when done.

from enzyme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.