cornell-zhang/hcl-dialect

[Build] Create Schedule Fails with `assert` Statement in fcompute

Closed this issue · 1 comments

Description

The struct test case use Python's assert to check whether field type is correct. This breaks schedule creation.

Relevant test case

mlir/test_dtype.py::test_struct

Error message

python: /home/nz264/shared/llvm-project-14.0.0/mlir/lib/Dialect/Affine/IR/AffineOps.cpp:2248: static void mlir::AffineLoadOp::buil
d(mlir::OpBuilder&, mlir::OperationState&, mlir::Value, mlir::AffineMap, mlir::ValueRange): Assertion `map.getNumInputs() == mapOp
erands.size() && "inconsistent index info"' failed.

Seems like assert's operand value was built but there is no operation to consume them, not exactly sure if this is the issue. This is low priority and probably not easy to fix? This thread is just to keep a note and we can fix it later.

Ref commit

  • This repo: f123a6e
  • HCL frontend repo: 340cb912bc063b6830bb7651dc4ddabeed31136c

After adding HCL AST, using assert during input python function tracing works