Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: operand #2 does not dominate this use #64

Open
clw5710 opened this issue Jun 8, 2023 · 0 comments
Open

Error: operand #2 does not dominate this use #64

clw5710 opened this issue Jun 8, 2023 · 0 comments

Comments

@clw5710
Copy link

clw5710 commented Jun 8, 2023

Has anyone encountered this error? I ran the pretrained resnet18 model from torchvision. This was provided in the pytorch samples folder. Where can I start debugging this? Here is the full error:

scalehls-opt resnet18_torchvision.mlir -scaleflow-pytorch-pipeline="top-func=forward loop-tile-size=8 loop-unroll-factor=4" | scalehls-translate -scalehls-emit-hlscpp > resnet18_torchvision.cpp <unknown>:0: error: operand #2 does not dominate this use <unknown>:0: note: see current operation: "hls.dataflow.node"(<<UNKNOWN SSA VALUE>>, <<UNKNOWN SSA VALUE>>, <<UNKNOWN SSA VALUE>>, <<UNKNOWN SSA VALUE>>) ({ ^bb0(%arg0: memref<256x2x2xf32, 12>, %arg1: memref<512x256x3x3xf32, 12>, %arg2: memref<512xf32, 7>, %arg3: memref<512xf32, 7>): "affine.for"() ({ ^bb0(%arg4: index): "affine.for"() ({ ^bb0(%arg5: index): "affine.for"() ({ ^bb0(%arg6: index): "affine.for"() ({ ^bb0(%arg7: index): "hls.dataflow.schedule"(%arg4, %arg3, %arg2, %arg0, %arg1, %arg5, %arg7, %arg6) ({ ^bb0(%arg8: index, %arg9: memref<512xf32, 7>, %arg10: memref<512xf32, 7>, %arg11: memref<256x2x2xf32, 12>, %arg12: memref<512x256x3x3xf32, 12>, %arg13: index, %arg14: index, %arg15: index): %0 = "hls.dataflow.buffer"() {depth = 1 : i32} : () -> memref<8x8xf32, 7> %1 = "hls.dataflow.buffer"() {depth = 1 : i32} : () -> memref<8xf32, 7> "hls.dataflow.node"(%arg11, %1, %arg8, %arg13, %arg15) ({ ^bb0(%arg16: memref<256x2x2xf32, 12>, %arg17: memref<8xf32, 7>, %arg18: index, %arg19: index, %arg20: index): "affine.for"() ({ ^bb0(%arg21: index): %2 = "affine.load"(%arg16, %arg21, %arg18, %arg19, %arg20) {map = affine_map<(d0, d1, d2, d3) -> (d0 + d1 * 8, d2 - 1, d3 - 1)>} : (memref<256x2x2xf32, 12>, index, index, index, index) -> f32 "affine.store"(%2, %arg17, %arg21) {map = affine_map<(d0) -> (d0)>} : (f32, memref<8xf32, 7>, index) -> () "affine.yield"() : () -> () }) {lower_bound = affine_map<() -> (0)>, parallel, step = 1 : index, upper_bound = affine_map<() -> (8)>} : () -> () }) {inputTaps = [0 : i32], operand_segment_sizes = array<i32: 1, 1, 3>} : (memref<256x2x2xf32, 12>, memref<8xf32, 7>, index, index, index) -> () "hls.dataflow.node"(%arg12, %0, %arg13, %arg15, %arg14, %arg8) ({ ^bb0(%arg16: memref<512x256x3x3xf32, 12>, %arg17: memref<8x8xf32, 7>, %arg18: index, %arg19: index, %arg20: index, %arg21: index): "affine.for"() ({ ^bb0(%arg22: index): "affine.for"() ({ ^bb0(%arg23: index): %2 = "affine.load"(%arg16, %arg18, %arg19, %arg22, %arg20, %arg23, %arg21) {map = affine_map<(d0, d1, d2, d3, d4, d5) -> (d2 + d3 * 8, d4 + d5 * 8, d0, d1)>} : (memref<512x256x3x3xf32, 12>, index, index, index, index, index, index) -> f32 "affine.store"(%2, %arg17, %arg22, %arg23) {map = affine_map<(d0, d1) -> (d0, d1)>} : (f32, memref<8x8xf32, 7>, index, index) -> () "affine.yield"() : () -> () }) {lower_bound = affine_map<() -> (0)>, parallel, step = 1 : index, upper_bound = affine_map<() -> (8)>} : () -> () "affine.yield"() : () -> () }) {lower_bound = affine_map<() -> (0)>, parallel, step = 1 : index, upper_bound = affine_map<() -> (8)>} : () -> () }) {inputTaps = [0 : i32], operand_segment_sizes = array<i32: 1, 1, 4>} : (memref<512x256x3x3xf32, 12>, memref<8x8xf32, 7>, index, index, index, index) -> () "hls.dataflow.node"(%arg10, %1, %0, %arg9, %arg14, %arg15, %arg13, %arg8) ({ ^bb0(%arg16: memref<512xf32, 7>, %arg17: memref<8xf32, 7>, %arg18: memref<8x8xf32, 7>, %arg19: memref<512xf32, 7>, %arg20: index, %arg21: index, %arg22: index, %arg23: index): "affine.for"() ({ ^bb0(%arg24: index): "affine.for"() ({ ^bb0(%arg25: index): %2 = "affine.load"(%arg16, %arg25, %arg20) {map = affine_map<(d0, d1) -> (d0 + d1 * 8)>} : (memref<512xf32, 7>, index, index) -> f32 %3 = "affine.load"(%arg19, %arg25, %arg20) {map = affine_map<(d0, d1) -> (d0 + d1 * 8)>} : (memref<512xf32, 7>, index, index) -> f32 %4 = "hls.affine.select"(%arg22, %arg21, %arg24, %arg23, %2, %3) {condition = affine_set<(d0, d1, d2, d3) : (d2 + d3 * 8 == 0, d0 == 0, d1 == 0)>} : (index, index, index, index, f32, f32) -> f32 %5 = "affine.load"(%arg17, %arg24) {map = affine_map<(d0) -> (d0)>} : (memref<8xf32, 7>, index) -> f32 %6 = "affine.load"(%arg18, %arg25, %arg24) {map = affine_map<(d0, d1) -> (d0, d1)>} : (memref<8x8xf32, 7>, index, index) -> f32 %7 = "arith.mulf"(%5, %6) : (f32, f32) -> f32 %8 = "arith.addf"(%4, %7) : (f32, f32) -> f32 "affine.store"(%8, %arg19, %arg25, %arg20) {map = affine_map<(d0, d1) -> (d0 + d1 * 8)>} : (f32, memref<512xf32, 7>, index, index) -> () "affine.yield"() : () -> () }) {lower_bound = affine_map<() -> (0)>, parallel, point, step = 1 : index, upper_bound = affine_map<() -> (8)>} : () -> () "affine.yield"() : () -> () }) {lower_bound = affine_map<() -> (0)>, point, step = 1 : index, upper_bound = affine_map<() -> (8)>} : () -> () }) {inputTaps = [0 : i32, 0 : i32, 0 : i32], operand_segment_sizes = array<i32: 3, 1, 4>} : (memref<512xf32, 7>, memref<8xf32, 7>, memref<8x8xf32, 7>, memref<512xf32, 7>, index, index, index, index) -> () }) : (index, memref<512xf32, 7>, memref<512xf32, 7>, memref<256x2x2xf32, 12>, memref<512x256x3x3xf32, 12>, index, index, index) -> () "affine.yield"() : () -> () }) {lower_bound = affine_map<() -> (0)>, parallel, step = 1 : index, upper_bound = affine_map<() -> (64)>} : () -> () "affine.yield"() : () -> () }) {lower_bound = affine_map<() -> (0)>, step = 1 : index, upper_bound = affine_map<() -> (3)>} : () -> () "affine.yield"() : () -> () }) {lower_bound = affine_map<() -> (0)>, step = 1 : index, upper_bound = affine_map<() -> (3)>} : () -> () "affine.yield"() : () -> () }) {lower_bound = affine_map<() -> (0)>, step = 1 : index, upper_bound = affine_map<() -> (32)>} : () -> () }) {inputTaps = [0 : i32, 0 : i32, 0 : i32], operand_segment_sizes = array<i32: 3, 1, 0>} : (memref<256x2x2xf32, 12>, memref<512x256x3x3xf32, 12>, memref<512xf32, 7>, memref<512xf32, 7>) -> () <unknown>:0: note: operand defined here (op in the same block)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant