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

Enable choosing of input type for lowering tests #1776

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

ctodTT
Copy link
Contributor

@ctodTT ctodTT commented Jan 14, 2025

Allows the choosing of input types to generated MLIR and golden checks via inputs_types kwarg. Take torch.dtypes as inputs, then converts them to MLIR Types upon context introduction.

Closes #1765

@ctodTT ctodTT force-pushed the ctod/test-other-type-inputs branch from ffe8e86 to 1e18da0 Compare January 14, 2025 19:58
Copy link
Contributor

@nsmithtt nsmithtt left a comment

Choose a reason for hiding this comment

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

This change looks great!

As for goldens and TTNN only supporting floats, since it will probably be this way for the foreseeable future, perhaps we should just store all goldens as type f32, regardless of the format.

Alternatively in the ttrt golden callback we could just automatically format covert the golden tensor into the same type as a the ttnn tensor.

Lmk what you think.

@ctodTT ctodTT force-pushed the ctod/test-other-type-inputs branch from 1e18da0 to 8b0133b Compare January 22, 2025 21:22
@ctodTT ctodTT force-pushed the ctod/test-other-type-inputs branch from 8b0133b to 7c14d38 Compare January 22, 2025 21:24
@ctodTT ctodTT merged commit 78601d6 into main Jan 22, 2025
23 checks passed
@ctodTT ctodTT deleted the ctod/test-other-type-inputs branch January 22, 2025 23:46
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.

Add Support For Choosing Input Type
2 participants