forked from tensorflow/tensorflow
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland (Attempt #3) PR tensorflow#35985: [TFLite int16] 16-bit versio…
…n of ADD/SUB reference kernel operators Imported from GitHub PR tensorflow#35985 This PR is one of steps to extend 8-bit quantization to support symmetric 16-bit activations. Each activation is of type int16 and symmetric around zero. The weight tensor precision remains at 8-bit signed values. The bias is set to int64 precision. In this PR we introduce implementation and tests for ADD/SUB kernel reference function. The specification of this operator: SUB Input 0: data_type : int16 range : [-32768, 32767] granularity: per-tensor, zero_point=0 Input 1: data_type : int16 range : [-32768, 32767] granularity: per-tensor, zero_point=0 Output 0: data_type : int16 range : [-32768, 32767] granularity: per-tensor, zero_point=0 ADD Input 0: data_type : int16 range : [-32768, 32767] granularity: per-tensor, zero_point=0 Input 1: data_type : int16 range : [-32768, 32767] granularity: per-tensor, zero_point=0 Output 0: data_type : int16 range : [-32768, 32767] granularity: per-tensor, zero_point=0 Copybara import of the project: -- b94cb47 by Elena Zhelezina <elena.zhelezina@arm.com>: Added 16-bit version of ADD/SUB operators. Broadcasting is included. -- 924d0b7 by Elena Zhelezina <elena.zhelezina@arm.com>: Addressed reviewer comments. -- dd0d9e8 by Elena Zhelezina <elena.zhelezina@arm.com>: Added versioning to ADD/SUB + some rework of the existing code. -- abae3fd by Elena Zhelezina <elena.zhelezina@arm.com>: Added versioning for ADD/SUB with new option in the schema.fbs schema_generated.h is edited manually. -- 24f3f55 by Elena Zhelezina <elena.zhelezina@arm.com>: Fix for broken build. -- d252fe1 by Elena Zhelezina <elena.zhelezina@arm.com>: Fix for the failing internal test for NN delegates. -- 2223a5c by Elena Zhelezina <elena.zhelezina@arm.com>: Fix for asan failures. Change-Id: I2cf421ddda7f9e802202239136ab062bcd63b4aa -- 3c219a4 by Elena Zhelezina <elena.zhelezina@arm.com>: Added broadcast params to addsub structure. Change-Id: I61d7d4a94087d052a782890799211031f6ed3015 -- 9131a38 by Elena Zhelezina <elena.zhelezina@arm.com>: Corrected defaults. Change-Id: I9ea50c75014cc03ac91fdef0f5b4fe11395f7074 PiperOrigin-RevId: 324865496
- Loading branch information
1 parent
beab9b8
commit 6be604a
Showing
16 changed files
with
321 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.