Giter VIP home page Giter VIP logo

novia's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

novia's Issues

Problem with automated analysis script

Hi there, I've successfully followed the Docker Install and Docker Run steps as outlined in the README. However, I run into issues with the automated analysis scripts when running the examples. It seems that the formatting of source.log creates errors when being parsed by preanalysis.py.

For each example, except for incremental, I see the following error during the Pre-merge Report:

Traceback (most recent call last):
  File "/opt/NOVIA/fusion/analysis/scripts/preanalysis.py", line 59, in <module>
    main(sys.argv[1:])
  File "/opt/NOVIA/fusion/analysis/scripts/preanalysis.py", line 30, in main
    funcs = re.search("\[.*\]",line).group(0)[1:-2].split(';')
AttributeError: 'NoneType' object has no attribute 'group'

I see that the first line,Original, from source.log is being searched for brackets. re.search("\[.*\]","Original") returns NoneType, which prompts the error AttributeError: 'NoneType' object has no attribute 'group'. Within preanalysis.py at line 30, would skipping lines that do not have these brackets permanently solve this issue without breaking the pipeline? Modifying lines 27-32 of preanalysis.py as such appears to work for me:

for num, line in enumerate(fsource, 1):
    if str(fstats['BB'][i]) in line:
        start = num
        if re.search("\[.*\]", line) is not None:
            funcs = re.search("\[.*\]",line).group(0)[1:-2].split(';')
            if(funcs[0] != ''):

Thank you for the help! NOVIA is quite a neat tool ๐Ÿ˜

Edit: I've opened a pull request with this fix.

Feature request: dot files instead of PNGs

Hello there! Would it be possible to integrate the generation of .dot files alongside the .pngs generated by NOVIA?

It would be useful on our end since some of our software analysis utilities ingest .dot files.

issues with clang/llvm

Hello again! I've been attempting to run Novia on my own bitcode and have run into problems with clang and LLVM.

As a preface, I have built two Novia Docker images:

  1. NOVIA built with scripts/compile_llvm_minimal.sh
  2. NOVIA built with scripts/compile_llvm.sh

Motivation

I have my own code (a sparse-matrix multiply called spmm) that is built using CMake's -flto flag to emit LLVM IR bitcode (see this Stack Overflow post for how I accomplish this). I realize that I could copy one of the examples in fusion/examples and create a Makefile, but it would be nice to have my CMake build process work since my code can become quite complex.

Building NOVIA with scripts/compile_llvm_minimal.sh

I followed the README and am able to successfully emit bitcode in the examples (fusion/examples/*). However, when attempting to use CMake on my own code (spmm), I see the following error:

root@etc-gpu-09:/opt/spmm/build# make
Scanning dependencies of target spmm
[ 25%] Building CXX object src/CMakeFiles/spmm.dir/main.cc.o
[ 50%] Building CXX object src/CMakeFiles/spmm.dir/dmm.cc.o
[ 75%] Building CXX object src/CMakeFiles/spmm.dir/spmm.cc.o
[100%] Linking CXX executable spmm
/usr/bin/ld: /opt/NOVIA/llvm-project/build/bin/../lib/LLVMgold.so: error loading plugin: /opt/NOVIA/llvm-project/build/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/CMakeFiles/spmm.dir/build.make:114: src/spmm] Error 1
make[1]: *** [CMakeFiles/Makefile2:94: src/CMakeFiles/spmm.dir/all] Error 2
make: *** [Makefile:95: all] Error 2

Below is a screenshot of what the setup looks like from within the container:

novia-screenshot

I believe this is because scripts/compile_llvm_minimal.sh does not build lld, LLVM's linker. As such, I attempted to build the second Docker image using scripts/compile_llvm.sh for a full build.

Building NOVIA with scripts/compile_llvm.sh

For the second image, the only modification is to scripts/install.sh, which now looks like this:

...
$DIR/scripts/compile_graphviz.sh
$DIR/scripts/compile_llvm.sh
...

After building, I run the container and attempt to use clang, but there does not appear to be one:

> source NOVIA/env.sh
> clang --version
bash: clang: command not found

Within my CMakeErrors.log, I see many issues indicating something going wrong with the build process. A sample of this is as follows:

Run Build Command(s):/usr/bin/ninja cmTC_d4fe0 && [1/2] Building C object CMakeFiles/cmTC_d4fe0.dir/CheckIncludeFile.c.o
FAILED: CMakeFiles/cmTC_d4fe0.dir/CheckIncludeFile.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_d4fe0.dir/CheckIncludeFile.c.o   -c CheckIncludeFile.c
CheckIncludeFile.c:1:10: fatal error: malloc/malloc.h: No such file or directory
    1 | #include <malloc/malloc.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

Is there some -D___ flag in scripts/install_llvm.sh that is missing?

Support for other versions of llvm

Is there a specific reason why llvm-13 was chosen? Will there eventually be support for other versions of llvm in the future?

Thank you for the help!

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.