Skip to content

Weird RecMin II generated by Morpher. #10

@halfmanli

Description

@halfmanli

Here's the code:

int a[10], b[10], c[10];
__attribute__((noinline)) void test() {
    for (int i = 0; i < 10; i++) {
#ifdef CGRA_COMPILER
        please_map_me();
#endif
        c[i] = a[i] * b[i];
    }
}

int main() { test(); }

Here's my command:

python -u run_morpher.py cava/test_recii.c test config/microspeech_hycube_mm_0.yaml

And Morpher says:

MAP begin... 
Initial target II = 4 (ResMin II = 2 , RecMin II = 4, UserGiven II = 0 )
Current target II = 4, Iteration = 0
noConflicts!
Current target II = 4, Iteration = 1
noCongestion!
noConflicts!
Map Success with II = 4!!!

That's weird because there's no dependency between the i-th iteration and (i+1)-th iteration. Could you please explain the reason why RecMin II is 4 here? I really appreciate that. @zhaoying-LI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions