mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Update QNNPACK (#15561)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15561 - Update QNNPACK submodule to master (API-incompatible) - Do matching changes in Caffe2 Int8 operators Reviewed By: dreiss Differential Revision: D13551322 fbshipit-source-id: 066f9087061167f7d7cfbc1c8f8628dfa93d056e
This commit is contained in:
committed by
Facebook Github Bot
parent
ed949e20cb
commit
9ad6ada9de
@ -68,6 +68,7 @@ class Int8AddOp final : public Operator<CPUContext> {
|
||||
static_cast<uint8_t>(Y_zero_point), Y_scale,
|
||||
activationLimits(Y_scale, Y_zero_point, Ac).first,
|
||||
activationLimits(Y_scale, Y_zero_point, Ac).second,
|
||||
0 /* flags */,
|
||||
&qnnpackOperator_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
|
@ -62,6 +62,7 @@ class Int8AveragePoolOp final : public ConvPoolOpBase<CPUContext> {
|
||||
Y->zero_point, Y->scale,
|
||||
activationLimits(Y->scale, Y->zero_point, Ac).first,
|
||||
activationLimits(Y->scale, Y->zero_point, Ac).second,
|
||||
0 /* flags */,
|
||||
&this->qnnpackGlobalOperator_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
@ -102,6 +103,7 @@ class Int8AveragePoolOp final : public ConvPoolOpBase<CPUContext> {
|
||||
Y->zero_point, Y->scale,
|
||||
activationLimits(Y->scale, Y->zero_point, Ac).first,
|
||||
activationLimits(Y->scale, Y->zero_point, Ac).second,
|
||||
0 /* flags */,
|
||||
&this->qnnpackOperator_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
|
@ -54,6 +54,7 @@ class Int8ChannelShuffleOp final : public ConvPoolOpBase<CPUContext> {
|
||||
const qnnp_status createStatus = qnnp_create_channel_shuffle_nc_x8(
|
||||
G /* groups */,
|
||||
C / G /* group channels */,
|
||||
0 /* flags */,
|
||||
&this->qnnpackOperator_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
|
@ -93,6 +93,7 @@ class Int8ConvOp final : public ConvPoolOpBase<CPUContext> {
|
||||
Y->scale,
|
||||
activationLimits(Y->scale, Y->zero_point, Ac).first,
|
||||
activationLimits(Y->scale, Y->zero_point, Ac).second,
|
||||
0 /* flags */,
|
||||
&this->qnnpackObject_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
|
@ -92,6 +92,7 @@ class Int8ConvTransposeOp final : public ConvTransposeUnpoolBase<CPUContext> {
|
||||
Y->scale,
|
||||
std::numeric_limits<uint8_t>::min(),
|
||||
std::numeric_limits<uint8_t>::max(),
|
||||
0 /* flags */,
|
||||
&this->qnnpackObject_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
|
@ -65,6 +65,7 @@ class Int8FCOp final : public Operator<CPUContext> {
|
||||
Y->scale,
|
||||
std::numeric_limits<uint8_t>::min(),
|
||||
std::numeric_limits<uint8_t>::max(),
|
||||
0 /* flags */,
|
||||
&this->qnnpackObject_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
@ -88,8 +89,7 @@ class Int8FCOp final : public Operator<CPUContext> {
|
||||
inputPtr,
|
||||
K /* input stride */,
|
||||
Y->t.template mutable_data<uint8_t>(),
|
||||
N /* output stride */,
|
||||
nullptr /* threadpool */);
|
||||
N /* output stride */);
|
||||
CAFFE_ENFORCE(
|
||||
setupStatus == qnnp_status_success,
|
||||
"failed to setup QNNPACK fully connected operator");
|
||||
|
@ -62,6 +62,7 @@ class Int8LeakyReluOp final : public Operator<CPUContext> {
|
||||
static_cast<uint8_t>(Y_zero_point), Y_scale,
|
||||
0 /* output min */,
|
||||
255 /* output max */,
|
||||
0 /* flags */,
|
||||
&qnnpackOperator_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
|
@ -55,6 +55,7 @@ class Int8MaxPoolOp final : public ConvPoolOpBase<CPUContext> {
|
||||
channels,
|
||||
activationLimits(Y->scale, Y->zero_point, Ac).first,
|
||||
activationLimits(Y->scale, Y->zero_point, Ac).second,
|
||||
0 /* flags */,
|
||||
&this->qnnpackOperator_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
|
@ -47,6 +47,7 @@ class Int8ReluOp final : public Operator<CPUContext> {
|
||||
1 /* channels */,
|
||||
X.zero_point /* output min */,
|
||||
255 /* output max */,
|
||||
0 /* flags */,
|
||||
&qnnpackOperator_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
|
@ -55,6 +55,7 @@ class Int8SigmoidOp final : public Operator<CPUContext> {
|
||||
static_cast<uint8_t>(Y_zero_point), Y_scale,
|
||||
0 /* output min */,
|
||||
255 /* output max */,
|
||||
0 /* flags */,
|
||||
&qnnpackOperator_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
|
@ -55,6 +55,7 @@ class Int8SoftmaxOp final : public Operator<CPUContext> {
|
||||
X.t.numel() / X.t.size(0) /* channels */,
|
||||
X_scale,
|
||||
static_cast<uint8_t>(Y_zero_point), Y_scale,
|
||||
0 /* flags */,
|
||||
&qnnpackOperator_);
|
||||
CAFFE_ENFORCE(
|
||||
createStatus == qnnp_status_success,
|
||||
|
2
third_party/QNNPACK
vendored
2
third_party/QNNPACK
vendored
Submodule third_party/QNNPACK updated: dd56525aef...6c62fddc6d
Reference in New Issue
Block a user