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 in loop_dim_size conversion #6

Open
EmilySillars opened this issue Apr 11, 2024 · 0 comments
Open

Error in loop_dim_size conversion #6

EmilySillars opened this issue Apr 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@EmilySillars
Copy link
Collaborator

for inputs.matmul2.mlir,

"builtin.module"() ({
  %0:3 = "test.op"() : () -> (memref<5x7xf32>, memref<7x6xf32>, memref<5x6xf32>)
  "linalg.generic"(%0#0, %0#1, %0#2) <{indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d2)>, affine_map<(d0, d1, d2) -> (d2, d1)>, affine_map<(d0, d1, d2) -> (d0, d1)>], iterator_types = [#linalg.iterator_type<parallel>, #linalg.iterator_type<parallel>, #linalg.iterator_type<reduction>], operandSegmentSizes = array<i32: 2, 1>}> ({
  ^bb0(%arg0: f32, %arg1: f32, %arg2: f32):
    %1 = "arith.mulf"(%arg0, %arg1) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32
    %2 = "arith.addf"(%arg2, %1) <{fastmath = #arith.fastmath<none>}> : (f32, f32) -> f32
    "linalg.yield"(%2) : (f32) -> ()
  }) : (memref<5x7xf32>, memref<7x6xf32>, memref<5x6xf32>) -> ()
}) : () -> ()

we get the following workload,

workload = {
    0: {
        "operator_type": "default",
        "equation": "O[d0][d1] += I[d0][d2] * W[d2][d1]",
        "dimension_relations": [],
        "loop_dim_size": {"D0": 5, "D1": 7, "D2": 7},
        "operand_precision": {"O": 32, "O_final": 32, "W": 32, "I": 32},
        "operand_source": {"W": [], "I": []},
        "constant_operands": ["I", "W"],
        "padding": {},
    }
}

Which I believe is incorrect.
Shouldn't the loop_dim_size for D1 be 6 here?
Something is going wrong with the way loop_dim_size fields are parsed.

@EmilySillars EmilySillars added the bug Something isn't working label Apr 11, 2024
@EmilySillars EmilySillars self-assigned this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant