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

new tosa verifiers #87

Merged
merged 8 commits into from
Jan 18, 2024
Merged

Conversation

sayeddla
Copy link

@sayeddla sayeddla commented Jan 10, 2024

Added missing verifiers for concat, pad as per the tosa spec.
A brief list of cases covered in each verifier:

concat

  • Added verify method to cover the below checks
    • All inputs must have the same rank
    • Axis along which concatenation is to occur, in range from 0 to rank(shape)-1
  • Added new test cases in invalid.mlir to validate
    • All inputs must have the same data type
    • Output shape and type must match inferred shape and type

pad

  • Added InferTensorType interface to Tosa_pad. This will run verification of the inferred output types
  • Added verify method to test the padding tensor
    • rank of padding tensor must be [rank(inputShape), 2]
    • each element in the padding tensor must be >= 0
  • Added new test cases in invalid.mlir

@mgehre-amd
Copy link
Collaborator

Hey, thanks for the verifiers! I added a few comments. In general, I'd prefer small PRs, i.e. one PR per verifier.

Copy link
Collaborator

@mgehre-amd mgehre-amd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! The only open comment is about whether the llvm::cast / assuming ShapedType is fine.

@sayeddla sayeddla merged commit 3be558d into feature/fused-ops Jan 18, 2024
1 check passed
@sayeddla sayeddla deleted the sayeddla.new_tosa_verifiers branch January 18, 2024 09:29
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

Successfully merging this pull request may close these issues.

2 participants