-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support Float32
and other precisions
#196
Comments
The reason is a lack of testing infrastructure which can properly handle I've removed the |
@yebai and @Red-Portal discovered that we're going to need a rule to |
@yebai plan for this below: We plan to support testing functions involving uniform-precision data. For example, f(x::Float64, y::Float64)
f(x::Float32, y::Float32) should be fine, but we do not intend to add support for functions containing a range of precisions. For example, f(x::Float32, y::Float64) would not be testable. In order to support this, we would need to:
Once this is in place, we will need to
|
That sounds good to me; maybe we could promote low-precision types to the highest ones in arguments as a default? |
I think I'd rather just provide an informative error message, in order to avoid users thinking they're testing one thing, but actually testing another -- I can easily imagine a situation arising in which a user accidentally has a |
@penelopeysm discovered in TuringLang/docs#559 (comment) that Mooncake's current rule for matrix-matrix multiplication in LuxLib doesn't successfully handle the case that the two input arrays contain numbers at different precisions. It really shouldn't be too hard to handle this properly -- we would just need to re-write the current from_rrule implementations of the various variants of matrix-matrix multiplication found around here to have proper Mooncake rules which
Note: this is also a great opportunity to ensure excellent performance in Lux.jl -- the current implementations of the rules involve more allocations than are really needed, because we do not increment the gradients in-place. |
I'm marking this as done, because I believe #414 basically solves it . We can re-open if there is a reason to. |
Has this been addressed in previous PRs? |
It seems to be fine for |
EDIT: updated my comment above; see also, TuringLang/docs#559 (comment) |
The assumption of only supporting
Float64
is too strong. Are there any good reasons?I am labelling this as bugs to signal its priority.
The text was updated successfully, but these errors were encountered: