-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cast input of embedding op only if its dtype is different than int32. #45
Conversation
I don't specifically mind if we do this at the other part of the code. However, from the current perspective, it seems to me that the op definition is the best place to keep this logic. Why? The first place to check for uncertenties regarding op support, or some special logic binds to certain ops is the definition itself. Therefore, doing specific casting in certain cases seems like a good spot to be done in this place. Let me know your thoughts, and if you have a better suggestion where this logic should lay |
Yeah, having checks in op definition seems logical! |
1dd990a
to
4b8b6be
Compare
Added check to cast input only if its dtype is different than int32. However, this won't save us from casting int32 to in32 because if we have int64 as input to embedding we will add cast to int32. However, since forge doesn't support int64, |
I see. Can we skip cast for int64 as well until MLIR solves problem on their end? Also, if we do so, let's open tech dept issues + add good forst issue label :)) This is pretty localised change, so will be okay :)) |
4b8b6be
to
d0ed894
Compare
Added int64 check and an explanation why we are doing that. After I merge I will open tech debt with reference to this part of code... |
… instead of always.
d0ed894
to
17e017a
Compare
Cast input of embedding op only if its dtype is different than int32, instead of always.