Giter VIP home page Giter VIP logo

stencilflow's Issues

Using StencilFlow with Python source code

Hi there,
I am interested in optimising a stencil code written in Python using StencilFlow. From what I see in the repository and from what I read on your paper it is possible to do so by generating the SDFG from DACE and then transforming this into a JSON StencilFlow file with the tool bin/sdfg_to_stencilflow.py. Unfortunately, I haven't been able to do so, as I'm getting the error ValueError: Program has no outputs. Here a small code to reproduce:

import dace
import numpy as np

DIM = 10

@dace.program
def jacobi(a: dace.float64[DIM,DIM], b: dace.float64[DIM,DIM]):
    for i in range(1,DIM-1):
        for j in range(1,DIM-1):
            b[i] = b[i] + 2*a[-1,0] - 2*a[1,0] + 2*a[0,-1] - 2*a[0,1]

if __name__ == "__main__":
    a = np.array([[0 for j in range(DIM)] for i in range(DIM)], dtype=np.double)
    b = np.array([[0 for j in range(DIM)] for i in range(DIM)], dtype=np.double)
    jacobi(a,b)

I just fed the .sdfg file in .dacecache/jacobi to bin/sdfg_to_stencilflow.py. Is there any fundamental annotation that's missing? I wouldn't want to modify the source code, is it possible to run StencilFlow on this code as-is other than some basic annotations?

Note: I am using the DACE version that is frozen as submodule in this repository.

Thanks,
Gabriel

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.