Skip to content

[TOSA] Add F16 and BF16 support for tosa.clamp #4281

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

justin-ngo-arm
Copy link
Contributor

@justin-ngo-arm justin-ngo-arm commented Jul 23, 2025

Add F16 and BF16 for torch ops that are lowered to tosa.clamp

Signed-off-by: Justin Ngo <justin.ngo@arm.com>
Change-Id: I0f1ed0249018b40d068af3a2d02a93776c0c4a5f
@@ -31,6 +31,20 @@

#include "mlir/Dialect/Tosa/Utils/QuantUtils.h"

namespace {

namespace limits {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a proper place to define these constants? I plan to use them within TorchToTosa.cpp only, but they are not TOSA-specific constants.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vivekkhandelwal1 do you have any suggestions here ?

@sjarus sjarus requested a review from sahas3 July 23, 2025 19:40
@sahas3
Copy link
Member

sahas3 commented Jul 25, 2025

Hi @sjarus / @justin-ngo-arm, I'm on vacation through end of next week. So I won't be able to do a timely review on this one.

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.

3 participants