CGRAME / CGRA-ME-ISSUES

CGRA-ME is an open-source framework for modelling and exploring coarse grain reconfigurable architectures and CAD.
2 stars 0 forks source link

mapper fail with couldn't find the search tree edge #4

Closed KelvinChung2000 closed 4 months ago

KelvinChung2000 commented 4 months ago

I am running the following command:

cgrame --II 2 -m BothSmallTimeThenHeurFullTime --gen-testbench --mapper-opts max_threads=16 -c hycube -g graph_loop1.dot

And the following error is produced.

BothSmallTimeThenHeurFullTimemapper: ILPMapper completed quickly!
start of CGRA-ME +0.000000 @0.000000
     reduce MRRG +0.025936 @0.025936
  end of CGRA-ME +0.013562 @0.039498
[stdout]
!==>
!==> TERMINATING! An exception reached the top of the stack. Exception chain:
!==>  .what(): [ERROR] couldn't find the search tree edge with same target as i11_add_out-1
!==>
[stderr]
!==>
!==> TERMINATING! An exception reached the top of the stack. Exception chain:
!==>  .what(): [ERROR] couldn't find the search tree edge with same target as i11_add_out-1
!==>
terminate called after throwing an instance of 'cgrame_error'
  what():  [ERROR] couldn't find the search tree edge with same target as i11_add_out-1

The following is the graph_loop1.dot, which is from the benchmarks/microbench/two_loops/two_loops.c

digraph G {
    const0 [opcode=const, constVal="0"];
    i0_phi [opcode=phi];
    input0 [opcode=input];
    i2_data_size1 [opcode=const, constVal="36"];
    i2_mul1 [opcode=mul];
    i2_add1 [opcode=add];
    i2_data_size2 [opcode=const, constVal="4"];
    i2_mul2 [opcode=mul];
    i2_add2 [opcode=add];
    i3_load [opcode=load, memName=""];
    const1 [opcode=const, constVal="3"];
    i4_add [opcode=add];
    i5_mul [opcode=mul];
    const2 [opcode=const, constVal="6"];
    i6_add [opcode=add];
    i7_mul [opcode=mul];
    const3 [opcode=const, constVal="4294967294"];
    i8_add [opcode=add];
    input1 [opcode=input];
    i9_data_size1 [opcode=const, constVal="36"];
    i9_mul1 [opcode=mul];
    i9_add1 [opcode=add];
    i9_data_size2 [opcode=const, constVal="4"];
    i9_mul2 [opcode=mul];
    i9_add2 [opcode=add];
    i10_store [opcode=store, memName=""];
    const4 [opcode=const, constVal="1"];
    i11_add [opcode=add];
    const5 [opcode=const, constVal="9"];
    i12_icmp [opcode=icmp];
    bb0 [opcode=input];
    ".preheader" [opcode=input];
    i13_br [opcode=br];
    const0 -> i0_phi [operand=RHS];
    const0 -> i2_mul1 [operand=any2input];
    const0 -> i9_mul1 [operand=any2input];
    i0_phi -> i2_mul2 [operand=any2input];
    i0_phi -> i9_mul2 [operand=any2input];
    i0_phi -> i11_add [operand=any2input];
    input0 -> i2_add1 [operand=any2input];
    i2_data_size1 -> i2_mul1 [operand=any2input];
    i2_mul1 -> i2_add1 [operand=any2input];
    i2_add1 -> i2_add2 [operand=any2input];
    i2_data_size2 -> i2_mul2 [operand=any2input];
    i2_mul2 -> i2_add2 [operand=any2input];
    i2_add2 -> i3_load [operand=addr];
    i3_load -> i4_add [operand=any2input];
    i3_load -> i5_mul [operand=any2input];
    const1 -> i4_add [operand=any2input];
    const1 -> i5_mul [operand=any2input];
    i4_add -> i7_mul [operand=any2input];
    i5_mul -> i6_add [operand=any2input];
    const2 -> i6_add [operand=any2input];
    i6_add -> i7_mul [operand=any2input];
    i7_mul -> i8_add [operand=any2input];
    const3 -> i8_add [operand=any2input];
    i8_add -> i10_store [operand=data];
    input1 -> i9_add1 [operand=any2input];
    i9_data_size1 -> i9_mul1 [operand=any2input];
    i9_mul1 -> i9_add1 [operand=any2input];
    i9_add1 -> i9_add2 [operand=any2input];
    i9_data_size2 -> i9_mul2 [operand=any2input];
    i9_mul2 -> i9_add2 [operand=any2input];
    i9_add2 -> i10_store [operand=addr];
    const4 -> i11_add [operand=any2input];
    i11_add -> i0_phi [operand=LHS];
    i11_add -> i12_icmp [operand=LHS];
    const5 -> i12_icmp [operand=RHS];
    i12_icmp -> i13_br [operand=branch_cond];
    bb0 -> i13_br [operand=branch_true];
    ".preheader" -> i13_br [operand=branch_false];
}