diff --git a/dnn/include/megdnn/oprs/base.h b/dnn/include/megdnn/oprs/base.h index f356d9bb..56d3297f 100644 --- a/dnn/include/megdnn/oprs/base.h +++ b/dnn/include/megdnn/oprs/base.h @@ -127,6 +127,15 @@ public: * \brief whether the algo is usable once shape changed. * */ USABLE_DEPEND_ON_SHAPE = 1 << 2, + + /** + * \brief whether the accuracy of the algo is dependent with respect + * to batch + * In the case of using algorithm with this attribute, even if the + * content of each batch is the same, the output under multiple batch + * input and single batch input may not equal + * */ + ACCURACY_DEPEND_ON_BATCH = 1 << 3, }; /** diff --git a/dnn/src/common/algo_base.cpp b/dnn/src/common/algo_base.cpp index 21ef9172..c71b10f6 100644 --- a/dnn/src/common/algo_base.cpp +++ b/dnn/src/common/algo_base.cpp @@ -19,7 +19,8 @@ using namespace megdnn; cb(DEFAULT) \ cb(REPRODUCIBLE) \ cb(NAIVE) \ - cb(USABLE_DEPEND_ON_SHAPE) + cb(USABLE_DEPEND_ON_SHAPE) \ + cb(ACCURACY_DEPEND_ON_BATCH) namespace { inline const char* attr_str(const AlgoAttribute& attr) {