forked from mindspore-Ecosystem/mindspore
fix scatternd op map and default precision mode in GE mode
This commit is contained in:
parent
d98d859756
commit
552b67ab0e
|
@ -112,7 +112,7 @@ constexpr const char kNameSGD[] = "SGD";
|
|||
constexpr const char kNameSigmoidCrossEntropyWithLogits[] = "SigmoidCrossEntropyWithLogits";
|
||||
constexpr const char kNameSigmoidCrossEntropyWithLogitsGrad[] = "SigmoidCrossEntropyWithLogitsGrad";
|
||||
constexpr const char kNameSigmoidCrossEntropyWithLogitsV2[] = "BCEWithLogitsLoss";
|
||||
constexpr const char kNameScatterNdD[] = "ScatterNd";
|
||||
constexpr const char kNameScatterNd[] = "ScatterNd";
|
||||
constexpr const char kNamePadD[] = "Pad";
|
||||
constexpr const char kNamePadV1[] = "PadV1";
|
||||
constexpr const char kNameMirrorPad[] = "MirrorPad";
|
||||
|
|
|
@ -236,7 +236,11 @@ void GetGeOptions(const std::shared_ptr<MsContext> &ms_context_ptr, std::map<std
|
|||
MS_LOG(WARNING) << "Set proto lib path failed!";
|
||||
}
|
||||
|
||||
(*ge_options)["ge.exec.precision_mode"] = "force_fp16";
|
||||
if (training == "1") {
|
||||
(*ge_options)["ge.exec.precision_mode"] = "allow_fp32_to_fp16";
|
||||
} else {
|
||||
(*ge_options)["ge.exec.precision_mode"] = "force_fp16";
|
||||
}
|
||||
|
||||
// Disable the global variable acc, only enable it while adding training graph in pipeline
|
||||
(*ge_options)["ge.exec.variable_acc"] = "0";
|
||||
|
|
|
@ -79,13 +79,11 @@ OUTPUT_MAP(GatherV2D) = {{0, OUTPUT_DESC(y)}};
|
|||
REG_ADPT_DESC(GatherV2D, prim::kPrimGather->name(), ADPT_DESC(GatherV2D))
|
||||
REG_ADPT_DESC(Gather, kNameGather, ADPT_DESC(GatherV2D))
|
||||
|
||||
// ScatterNdD
|
||||
INPUT_MAP(ScatterNdD) = {{1, INPUT_DESC(indices)}, {2, INPUT_DESC(x)}};
|
||||
INPUT_ATTR_MAP(ScatterNdD) = {
|
||||
{3, ATTR_DESC(shape, AnyTraits<std::vector<int64_t>>(), AnyTraits<std::vector<int64_t>>())}};
|
||||
ATTR_MAP(ScatterNdD) = EMPTY_ATTR_MAP;
|
||||
OUTPUT_MAP(ScatterNdD) = {{0, OUTPUT_DESC(y)}};
|
||||
REG_ADPT_DESC(ScatterNdD, kNameScatterNdD, ADPT_DESC(ScatterNdD))
|
||||
// ScatterNd
|
||||
INPUT_MAP(ScatterNd) = {{1, INPUT_DESC(indices)}, {2, INPUT_DESC(x)}, {3, INPUT_DESC(shape)}};
|
||||
ATTR_MAP(ScatterNd) = EMPTY_ATTR_MAP;
|
||||
OUTPUT_MAP(ScatterNd) = {{0, OUTPUT_DESC(y)}};
|
||||
REG_ADPT_DESC(ScatterNd, kNameScatterNd, ADPT_DESC(ScatterNd))
|
||||
|
||||
// ScatterNonAliasingAdd
|
||||
INPUT_MAP(ScatterNonAliasingAdd) = {{1, INPUT_DESC(x)}, {2, INPUT_DESC(indices)}, {3, INPUT_DESC(updates)}};
|
||||
|
|
|
@ -27,9 +27,8 @@ DECLARE_OP_ADAPTER(SliceD)
|
|||
DECLARE_OP_USE_INPUT_ATTR(SliceD)
|
||||
DECLARE_OP_USE_OUTPUT(SliceD)
|
||||
|
||||
DECLARE_OP_ADAPTER(ScatterNdD)
|
||||
DECLARE_OP_USE_INPUT_ATTR(ScatterNdD)
|
||||
DECLARE_OP_USE_OUTPUT(ScatterNdD)
|
||||
DECLARE_OP_ADAPTER(ScatterNd)
|
||||
DECLARE_OP_USE_OUTPUT(ScatterNd)
|
||||
|
||||
DECLARE_OP_ADAPTER(ScatterNonAliasingAdd)
|
||||
DECLARE_OP_USE_OUTPUT(ScatterNonAliasingAdd)
|
||||
|
|
Loading…
Reference in New Issue