Browse Source

feat(mgb/dnn): add accuracy_depend_on_batch attribute

GitOrigin-RevId: 2be1db43d0
release-1.4
Megvii Engine Team 4 years ago
parent
commit
be6fb6b7c1
2 changed files with 11 additions and 1 deletions
  1. +9
    -0
      dnn/include/megdnn/oprs/base.h
  2. +2
    -1
      dnn/src/common/algo_base.cpp

+ 9
- 0
dnn/include/megdnn/oprs/base.h View File

@@ -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,
};

/**


+ 2
- 1
dnn/src/common/algo_base.cpp View File

@@ -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) {


Loading…
Cancel
Save