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

Add constraints and runtime API to typecast #2380

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

arminaleTT
Copy link
Contributor

@arminaleTT arminaleTT commented Mar 5, 2025

Ticket

#2315

Problem description

The optimizer needs more ops with constraints and runtime support to be able to ingest real models. Typecast is used in resnet (#2277)

What's changed

Added constraints and runtime API support for typecast. Added unit tests for the new APIs

Closes #2315

Checklist

  • New/Existing tests provide coverage for changes

@arminaleTT arminaleTT self-assigned this Mar 5, 2025
@arminaleTT arminaleTT added TTNN Op Perf Model TTNN Constraints&L1 Issues related to compiler-TTNN constraints&L1 interface labels Mar 5, 2025
Copy link
Contributor

@azecevicTT azecevicTT left a comment

Choose a reason for hiding this comment

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

Dialect changes LGTM.


const auto inputShape = getInput().getType().getShape();
const auto outputShape =
mlir::cast<RankedTensorType>(getResult().getType()).getShape();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: unnecessary cast


const auto inputShape = getInput().getType().getShape();
const auto outputShape =
mlir::cast<RankedTensorType>(getResult().getType()).getShape();
Copy link
Contributor

Choose a reason for hiding this comment

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

Here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TTNN Constraints&L1 Issues related to compiler-TTNN constraints&L1 interface TTNN Op Perf Model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add constraints and runtime API for typecast
2 participants