hocl icon indicating copy to clipboard operation
hocl copied to clipboard

Issue with sobel1 example

Open jabcross opened this issue 3 years ago • 1 comments

On following the README for the Sobel1 application, I hit the following error:

$ build/bin/hoclc -dif examples/working/apps/sobel1/main.hcl
-------------------------------------------------------------------------------------------------
This is the HoCL compiler, version 1.2.2
-------------------------------------------------------------------------------------------------
Parsing file ./build/lib/hocl/stdlib.hcl
Parsing file examples/working/apps/sobel1/main.hcl
Internal error: Failure("DIF backend cannot retrieve parameter value").

The generated DIF file is as follows:


  topology {
    nodes = n16, n17, n18, n19, n20, n21;
    edges = e6(n18,n21), e7(n16,n21), e8(n17,n21), e9(n20,n21), e10(n19,n21), e11(n19,n21), e3(n16,n20), e4(n17,n20), e5(n19,n20), e1(n16,n19), e2(n17,n19);
    }

  actortype Sobel {
    input inp;
    output outp;
    param width, height;
    }

  actortype DisplayYUV {
    input y, u, v;
    output ;
    param id, width, height;
    }

  actortype ReadYUV {
    input ;
    output y, u, v;
    param width, height;
    }

  actor n16 {
    type: width;
    interface o->e1, o->e3, o->e7;
    }

  actor n17 {
    type: height;
    interface o->e2, o->e4, o->e8;
    }

  actor n18 {
    type: index;
    interface o->e6;
    }

  actor n19 {
    type: ReadYUV;

Note that it stops before closing actor n19. Any ideas on where I should look to solve this?

jabcross avatar Aug 11 '21 19:08 jabcross

Fixed in the current source tree. This may have to be adjusted according to the exact semantics of parameters in the latest DIF specification.

jserot avatar Aug 13 '21 13:08 jserot