Skip to content

Commit 81e1683

Browse files
authored
Merge pull request #9 from zrphercule/add_foxi_quantization
Add quantization support in onnxifi.h
2 parents 2bcc406 + 580559c commit 81e1683

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

foxi/onnxifi.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,22 @@ typedef struct onnxTensorDescriptorV1 {
863863
* For a scalar, this pointer can be NULL.
864864
*/
865865
const uint64_t* shape;
866+
/**
867+
* A flag indicates whether this tensor is a quantized tensor or not.
868+
* If it is a quantized tensor, the value should be set to 1.
869+
* By default it should be set to 0.
870+
*/
871+
uint8_t is_quantized;
872+
/**
873+
* Quantized tensor scale info.
874+
* For non-quantized tensor, this scale is not valid.
875+
*/
876+
float scale;
877+
/**
878+
* Quantized tensor bias info.
879+
* For non-quantized tensor, this bias is not valid.
880+
*/
881+
int32_t bias;
866882
/**
867883
* Pointers to tensor data.
868884
*

0 commit comments

Comments
 (0)