-
Notifications
You must be signed in to change notification settings - Fork 85
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
refactor: fixed point representation to use native signed integers #635
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, several things are missing here:
- I left comments in your code
fp16
is not recognized by the compiler. Please have a look at the module cheat sheet.- The reimplementation of functions for
fp16
needs to have tests
} | ||
|
||
fn HALF() -> i32 { | ||
HALF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HALF
constant is type u32
but the returned type is i32
. you should change constant type
} | ||
|
||
fn ONE() -> i32 { | ||
ONE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ONE
constant is type u32
but the returned type is i32
. you should change constant type
} | ||
|
||
fn MAX() -> i32 { | ||
MAX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MAX
constant is type u32
but the returned type is i32
. you should change constant type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright. I'll look at all these
|
||
use orion::numbers::fixed_point::core::FixedTrait; | ||
use orion::numbers::fixed_point::implementations::fp16x16::math::{ | ||
core as core_math, trig, hyp, erf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these modules have functions implemented for FP16x16. Not the fp16 implementation. All the functions in that modules needs to be re-implemented for fp16 as well, otherwise you cannot import them in the fp16Impl
Pull Request type
This PR address fixed point representation to use native signed integers for FP16x16
Issue Number: #633
Does this introduce a breaking change?