llvm-project
a7b5cb83 - [mlir][tosa] Improve slice op verifier (#181889)

Commit
6 days ago
[mlir][tosa] Improve slice op verifier (#181889) The slice op verifier was missing checks on the values of start and size inputs. Similar to other op verifiers, shape_t const inputs have been checked for validity against the spec. The commit adds checks for the following conditions: - start values must be non-negative - size values must be > 0 - start + size must be less than or equal to the input dimension size - the output shape must be consistent with the size values The commit also allows kInferableDimSize values (-1) to be passed in for start and size, which are used to indicate that the dimension size can be inferred by the compiler. The verifier will skip checks for any start or size value that is kInferableDimSize. With shape expressions being added, we should no longer require these values, but removal will be handled in a separate commit.
Author
Parents
Loading