Return dict from versioned blob to (i, j), where i is index of producer op, j is the index of output of that op.
(ssa)
| 312 | |
| 313 | |
| 314 | def get_producer_map(ssa): |
| 315 | """ |
| 316 | Return dict from versioned blob to (i, j), |
| 317 | where i is index of producer op, j is the index of output of that op. |
| 318 | """ |
| 319 | producer_map = {} |
| 320 | for i in range(len(ssa)): |
| 321 | outputs = ssa[i][1] |
| 322 | for j, outp in enumerate(outputs): |
| 323 | producer_map[outp] = (i, j) |
| 324 | return producer_map |
| 325 | |
| 326 | |
| 327 | def get_consumer_map(ssa): |
no outgoing calls
no test coverage detected