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

Fix accumulator and result types #14

Merged
merged 5 commits into from
Oct 8, 2024
Merged

Fix accumulator and result types #14

merged 5 commits into from
Oct 8, 2024

Conversation

kuhar
Copy link
Member

@kuhar kuhar commented Oct 7, 2024

For example, perform f16 matmul with f32 as the accumulator type and truncate the result to f16. This is more realistic than using f16 as the accumulator type.

Keep track of operand, accumulator, and result types in GemmConfig.

gemmbench/gemm_utils.py Outdated Show resolved Hide resolved
operand_element_type = config.operand_element_type
acc_element_type = config.accumulator_element_type
result_element_type = config.result_element_type
assert not operand_element_type.startswith('i'), "Integer types not supported yet"
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason integer types not supported? (would it not just work with this i8 operand, i32 accumulator, i8 result type?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Well they are not supported elsewhere either -- I didn't want to plumb through int8 support in the same PR

@kuhar kuhar requested a review from saienduri October 8, 2024 01:08
Copy link
Contributor

@saienduri saienduri left a comment

Choose a reason for hiding this comment

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

Thanks

gemmbench/gemm_utils.py Outdated Show resolved Hide resolved
@saienduri saienduri merged commit 5010a9a into nod-ai:main Oct 8, 2024
1 check passed
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