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

Fixed lossy #172

Merged
merged 9 commits into from
Feb 11, 2025
Merged

Fixed lossy #172

merged 9 commits into from
Feb 11, 2025

Conversation

desmonddak
Copy link
Contributor

Description & Motivation

We need converters from float to fixed that are lossy (e.g. are constrained by fixed parameters m, n. This PR creates this.

Related Issue(s)

Testing

Exhaustive testing at narrow widths, e.g., BF16->18.16.

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

No.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

Yes. Markdown updated to document the addition of optional inputs m,n and the checkOverflow flag.

@desmonddak desmonddak requested a review from mkorbel1 February 7, 2025 18:02
doc/components/fixed_point.md Outdated Show resolved Hide resolved
lib/src/arithmetic/float_to_fixed.dart Show resolved Hide resolved
lib/src/arithmetic/float_to_fixed.dart Show resolved Hide resolved
lib/src/arithmetic/float_to_fixed.dart Outdated Show resolved Hide resolved
lib/src/arithmetic/float_to_fixed.dart Show resolved Hide resolved
lib/src/arithmetic/values/fixed_point_value.dart Outdated Show resolved Hide resolved
@desmonddak
Copy link
Contributor Author

desmonddak commented Feb 7, 2025

I wonder if I should add a wrapper component called 'FloatToFixedPoint' which takes both a FloatingPoint and a FixedPoint, extending this Module and passing in the m, n from the FixedPoint. For the lossless case, we still need this class.

This idea should be covered in an FP refactoring for components.

@desmonddak desmonddak requested a review from mkorbel1 February 10, 2025 20:14
@desmonddak desmonddak merged commit ef785d2 into intel:main Feb 11, 2025
4 checks 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