-
Notifications
You must be signed in to change notification settings - Fork 7
Refactor scalar IR nodes #2203
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 scalar IR nodes #2203
Conversation
Everything uses template class Scalar
using Double = Scalar<double>; | ||
using Int = Scalar<int64_t>; |
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.
This is a bit confusing. Should we change the name to FloatingPoint
and Integer
?
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.
I'm fine with the names, just didn't want to change the existing names. I'd prefer shorter nameas and keep Int
as is and rename Double
to Float
. What do you think?
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.
That sounds good to me
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.
Actually, Float
seems a little off to me as the default underlying type is double
, Double
seems more intuitive. Let's keep the names as is.
The only blocking comment is #2203 (comment), otherwise LGTM |
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.
Thanks for refactoring! I am wondering if I should start using Scalar
to replace Attribute
in exprs when applicable. It makes more sense to store a Bool*
instead of a Attribute<bool>*
Yeah, I don't know if that would have any immediate benefit, but I guess it would make IR serialization a little easier. |
Follow-up to #2197 and #2198
Removed
Float
.Double
,Int
andBool
useScalar
template class.