forked from mindspore-Ecosystem/mindspore
!35148 Delete the definition of ControlDepend
Merge pull request !35148 from huangbingjian/rm_definition
This commit is contained in:
commit
df9b900c04
|
@ -1,38 +0,0 @@
|
|||
/**
|
||||
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "ops/control_depend.h"
|
||||
#include "utils/check_convert_utils.h"
|
||||
#include "ops/op_utils.h"
|
||||
#include "mindapi/src/helper.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace ops {
|
||||
MIND_API_OPERATOR_IMPL(ControlDepend, BaseOperator);
|
||||
void ControlDepend::Init(const int64_t depend_mode) { this->set_depend_mode(depend_mode); }
|
||||
|
||||
void ControlDepend::set_depend_mode(const int64_t depend_mode) {
|
||||
CheckAndConvertUtils::CheckInRange<int64_t>(kDependMode, depend_mode, kIncludeBoth, {0, 1}, name());
|
||||
(void)AddAttr(kDependMode, api::MakeValue(depend_mode));
|
||||
}
|
||||
|
||||
int64_t ControlDepend::get_depend_mode() const {
|
||||
auto value_ptr = GetAttr(kDependMode);
|
||||
return GetValue<int64_t>(value_ptr);
|
||||
}
|
||||
REGISTER_PRIMITIVE_C(kNameControlDepend, ControlDepend);
|
||||
} // namespace ops
|
||||
} // namespace mindspore
|
|
@ -1,39 +0,0 @@
|
|||
/**
|
||||
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef MINDSPORE_CORE_OPS_CONTROL_DEPEND_H_
|
||||
#define MINDSPORE_CORE_OPS_CONTROL_DEPEND_H_
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include "ops/base_operator.h"
|
||||
#include "mindapi/base/types.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace ops {
|
||||
constexpr auto kNameControlDepend = "ControlDepend";
|
||||
class MIND_API ControlDepend : public BaseOperator {
|
||||
public:
|
||||
MIND_API_BASE_MEMBER(ControlDepend);
|
||||
ControlDepend() : BaseOperator(kNameControlDepend) {}
|
||||
void Init(const int64_t depend_mode);
|
||||
void set_depend_mode(const int64_t depend_mode = 0);
|
||||
int64_t get_depend_mode() const;
|
||||
};
|
||||
using PrimControlDepend = std::shared_ptr<ControlDepend>;
|
||||
} // namespace ops
|
||||
} // namespace mindspore
|
||||
#endif // MINDSPORE_CORE_OPS_CONTROl_DEPEND_H_
|
|
@ -52,7 +52,6 @@
|
|||
#include "ops/custom_extract_features.h"
|
||||
#include "ops/concat.h"
|
||||
#include "ops/constant_of_shape.h"
|
||||
#include "ops/control_depend.h"
|
||||
#include "ops/cos.h"
|
||||
#include "ops/crop.h"
|
||||
#include "ops/depth_to_space.h"
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "mindspore/core/ops/op_utils.h"
|
||||
#include "ops/fusion/partial_fusion.h"
|
||||
#include "ops/call.h"
|
||||
#include "ops/control_depend.h"
|
||||
#include "ops/depend.h"
|
||||
#include "ops/quant_dtype_cast.h"
|
||||
#include "ops/make_tuple.h"
|
||||
|
|
Loading…
Reference in New Issue