!31506 [assistant][ops] Add UnsortedSegmentProd and UnsortedSegmentSum

Merge pull request !31506 from TR-nbu/UnsortedSegmentProd
This commit is contained in:
i-robot 2022-08-25 12:30:37 +00:00 committed by Gitee
commit 8de6ac475c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
64 changed files with 459 additions and 471 deletions

View File

@ -42,7 +42,9 @@ std::map<string, std::vector<std::pair<string, size_t>>> AicpuOpAttrToInputMap =
{prim::kPrimScatterNd->name(), {{"shape", 2}}},
{prim::kPrimReduceProd->name(), {{"axis", 1}}},
{prim::kPrimReverseV2->name(), {{"axis", 1}}},
{prim::kPrimBroadcastTo->name(), {{"shape", 1}}}};
{prim::kPrimBroadcastTo->name(), {{"shape", 1}}},
{prim::kPrimUnsortedSegmentProd->name(), {{"num_segments", 2}}},
{prim::kPrimUnsortedSegmentSum->name(), {{"num_segments", 2}}}};
bool GetAicpuOpAttrToInputInfo(const CNodePtr &kernel_node, std::vector<std::pair<string, size_t>> *info) {
std::string op_name = common::AnfAlgo::GetCNodeName(kernel_node);

View File

@ -15,10 +15,13 @@
*/
#include "plugin/device/cpu/kernel/unsorted_segment_arithmetic_cpu_kernel.h"
#include <complex>
namespace mindspore {
namespace kernel {
namespace {
using complex64 = std::complex<float>;
using complex128 = std::complex<double>;
using KernelRunFunc = UnsortedSegmentArithmeticCpuKernelMod::KernelRunFunc;
} // namespace
#define UNSORTED_SEGMENT_ARITH_CPU_REGISTER(T_DT, S_DT, T, S) \
@ -33,11 +36,11 @@ T GetInitValue(std::string kernel_name) {
static const std::map<std::string, T> UnsortedSegmentArithmeticInitValueMap{
{prim::kPrimUnsortedSegmentMax->name(), std::numeric_limits<T>::lowest()},
{prim::kPrimUnsortedSegmentMin->name(), std::numeric_limits<T>::max()},
{prim::kPrimUnsortedSegmentSum->name(), static_cast<T>(0.0)}};
{prim::kPrimUnsortedSegmentSum->name(), static_cast<T>(0.0)},
{prim::kPrimUnsortedSegmentProd->name(), static_cast<T>(1.0)}};
if (UnsortedSegmentArithmeticInitValueMap.find(kernel_name) == UnsortedSegmentArithmeticInitValueMap.end()) {
MS_LOG(ERROR) << "For '" << kernel_name << "', the current operator does not support this operation.";
return 0;
}
T init_value = UnsortedSegmentArithmeticInitValueMap.at(kernel_name);
@ -46,56 +49,41 @@ T GetInitValue(std::string kernel_name) {
template <typename T, typename S>
bool UnsortedSegmentArithmeticCpuKernelMod::ComputeFunc(T *input_addr, S *ids_addr, T *output_addr) {
if (kernel_name_ == prim::kPrimUnsortedSegmentMax->name()) {
for (size_t loop = 0; loop < loop_size_; loop++) {
auto output_index = ids_addr[loop];
if (output_index >= num_segments_) {
MS_LOG(ERROR) << "For '" << kernel_name_ << "', segment_ids value should be [0, num_segments)";
return false;
}
if (output_index < 0) {
/* segment_ids is less than 0, drop it */
continue;
}
T *cur_input = input_addr + loop * comp_size_;
T *cur_output = output_addr + output_index * comp_size_;
for (size_t comp = 0; comp < comp_size_; comp++) {
cur_output[comp] = cur_input[comp] > cur_output[comp] ? cur_input[comp] : cur_output[comp];
}
for (size_t loop = 0; loop < loop_size_; loop++) {
auto output_index = ids_addr[loop];
if (output_index < 0) {
/* segment_ids is less than 0, drop it */
continue;
}
} else if (kernel_name_ == prim::kPrimUnsortedSegmentMin->name()) {
for (size_t loop = 0; loop < loop_size_; loop++) {
auto output_index = ids_addr[loop];
if (output_index >= num_segments_) {
MS_LOG(ERROR) << "For '" << kernel_name_ << "', segment_ids value should be [0, num_segments)";
return false;
}
if (output_index < 0) {
/* segment_ids is less than 0, drop it */
continue;
}
T *cur_input = input_addr + loop * comp_size_;
T *cur_output = output_addr + output_index * comp_size_;
for (size_t comp = 0; comp < comp_size_; comp++) {
cur_output[comp] = cur_input[comp] < cur_output[comp] ? cur_input[comp] : cur_output[comp];
}
}
} else if (kernel_name_ == prim::kPrimUnsortedSegmentSum->name()) {
for (size_t loop = 0; loop < loop_size_; loop++) {
auto output_index = ids_addr[loop];
if (output_index >= num_segments_) {
MS_LOG(ERROR) << "For '" << kernel_name_ << "', segment_ids value should be [0, num_segments)";
return false;
}
if (output_index < 0) {
/* segment_ids is less than 0, drop it */
continue;
if (kernel_name_ == prim::kPrimUnsortedSegmentMax->name() ||
kernel_name_ == prim::kPrimUnsortedSegmentMin->name()) {
if constexpr (std::is_same_v<T, complex64>) {
MS_LOG(ERROR) << "For '" << kernel_name_ << "', input_x types can not be complex64.";
} else if constexpr (std::is_same_v<T, complex128>) {
MS_LOG(ERROR) << "For '" << kernel_name_ << "', input_x types can not be complex128.";
} else {
T *cur_input = input_addr + loop * comp_size_;
T *cur_output = output_addr + output_index * comp_size_;
for (size_t comp = 0; comp < comp_size_; comp++) {
if (kernel_name_ == prim::kPrimUnsortedSegmentMax->name()) {
cur_output[comp] = cur_input[comp] > cur_output[comp] ? cur_input[comp] : cur_output[comp];
} else if (kernel_name_ == prim::kPrimUnsortedSegmentMin->name()) {
cur_output[comp] = cur_input[comp] < cur_output[comp] ? cur_input[comp] : cur_output[comp];
}
}
}
} else if (kernel_name_ == prim::kPrimUnsortedSegmentSum->name()) {
T *cur_input = input_addr + loop * comp_size_;
T *cur_output = output_addr + output_index * comp_size_;
for (size_t comp = 0; comp < comp_size_; comp++) {
cur_output[comp] += cur_input[comp];
}
} else if (kernel_name_ == prim::kPrimUnsortedSegmentProd->name()) {
T *cur_input = input_addr + loop * comp_size_;
T *cur_output = output_addr + output_index * comp_size_;
for (size_t comp = 0; comp < comp_size_; comp++) {
cur_output[comp] *= cur_input[comp];
}
}
}
return true;
@ -122,6 +110,12 @@ bool UnsortedSegmentArithmeticCpuKernelMod::LaunchKernel(const std::vector<kerne
}
};
ParallelLaunchAutoSearch(task, out_size_, this, &parallel_search_info_);
for (size_t loop = 0; loop < loop_size_; loop++) {
if (ids_addr[loop] >= num_segments_) {
MS_LOG(ERROR) << "For '" << kernel_name_ << "', segment_ids value should be [0, " << num_segments_ << ")";
return false;
}
}
bool result = UnsortedSegmentArithmeticCpuKernelMod::ComputeFunc(input_addr, ids_addr, output_addr);
if (!result) {
return false;
@ -192,6 +186,8 @@ const std::vector<std::pair<KernelAttr, KernelRunFunc>> &UnsortedSegmentArithmet
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeFloat64, kNumberTypeInt64, double, int64_t)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeFloat32, kNumberTypeInt32, float, int)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeFloat32, kNumberTypeInt64, float, int64_t)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeFloat16, kNumberTypeInt32, float16, int)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeFloat16, kNumberTypeInt64, float16, int64_t)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeInt32, kNumberTypeInt32, int, int)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeInt32, kNumberTypeInt64, int, int64_t)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeUInt8, kNumberTypeInt32, uint8_t, int)},
@ -208,6 +204,10 @@ const std::vector<std::pair<KernelAttr, KernelRunFunc>> &UnsortedSegmentArithmet
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeUInt32, kNumberTypeInt64, uint32_t, int64_t)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeUInt64, kNumberTypeInt32, uint64_t, int)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeUInt64, kNumberTypeInt64, uint64_t, int64_t)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeComplex64, kNumberTypeInt32, complex64, int)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeComplex64, kNumberTypeInt64, complex64, int64_t)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeComplex128, kNumberTypeInt32, complex128, int)},
{UNSORTED_SEGMENT_ARITH_CPU_REGISTER(kNumberTypeComplex128, kNumberTypeInt64, complex128, int64_t)},
{UNSORTED_SEGMENT_ARITH_CPU_DY_REGISTER(kNumberTypeFloat64, kNumberTypeInt32, kNumberTypeInt32, double, int)},
{UNSORTED_SEGMENT_ARITH_CPU_DY_REGISTER(kNumberTypeFloat64, kNumberTypeInt64, kNumberTypeInt32, double, int64_t)},
{UNSORTED_SEGMENT_ARITH_CPU_DY_REGISTER(kNumberTypeFloat32, kNumberTypeInt32, kNumberTypeInt32, float, int)},
@ -253,5 +253,6 @@ const std::vector<std::pair<KernelAttr, KernelRunFunc>> &UnsortedSegmentArithmet
MS_KERNEL_FACTORY_REG(NativeCpuKernelMod, UnsortedSegmentMin, UnsortedSegmentArithmeticCpuKernelMod);
MS_KERNEL_FACTORY_REG(NativeCpuKernelMod, UnsortedSegmentMax, UnsortedSegmentArithmeticCpuKernelMod);
MS_KERNEL_FACTORY_REG(NativeCpuKernelMod, UnsortedSegmentSum, UnsortedSegmentArithmeticCpuKernelMod);
MS_KERNEL_FACTORY_REG(NativeCpuKernelMod, UnsortedSegmentProd, UnsortedSegmentArithmeticCpuKernelMod);
} // namespace kernel
} // namespace mindspore

View File

@ -1,100 +0,0 @@
/**
* Copyright 2020-2022 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_CCSRC_BACKEND_KERNEL_COMPILER_CPU_UNSORTED_SEGMENT_SUM_CPU_KERNEL_H_
#define MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_CPU_UNSORTED_SEGMENT_SUM_CPU_KERNEL_H_
#include <vector>
#include <memory>
#include <unordered_map>
#include "plugin/device/cpu/kernel/cpu_kernel.h"
#include "plugin/factory/ms_factory.h"
#include "nnacl/base/unsorted_segment_sum_base.h"
namespace mindspore {
namespace kernel {
class UnsortedSegmentSumCpuKernelMod : public DeprecatedNativeCpuKernelMod {
public:
UnsortedSegmentSumCpuKernelMod() = default;
~UnsortedSegmentSumCpuKernelMod() override = default;
void InitKernel(const CNodePtr &kernel_node) override;
bool Launch(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &workspace,
const std::vector<AddressPtr> &outputs) override;
std::vector<KernelAttr> GetOpSupport() override {
static const std::vector<KernelAttr> support_list = {
KernelAttr().AddInputAttr(kNumberTypeFloat32).AddInputAttr(kNumberTypeInt32).AddOutputAttr(kNumberTypeFloat32),
KernelAttr().AddInputAttr(kNumberTypeFloat32).AddInputAttr(kNumberTypeInt64).AddOutputAttr(kNumberTypeFloat32),
KernelAttr().AddInputAttr(kNumberTypeInt32).AddInputAttr(kNumberTypeInt32).AddOutputAttr(kNumberTypeInt32),
KernelAttr().AddInputAttr(kNumberTypeInt32).AddInputAttr(kNumberTypeInt64).AddOutputAttr(kNumberTypeInt32),
KernelAttr()
.AddInputAttr(kNumberTypeFloat32)
.AddInputAttr(kNumberTypeInt32)
.AddInputAttr(kNumberTypeInt32)
.AddOutputAttr(kNumberTypeFloat32),
KernelAttr()
.AddInputAttr(kNumberTypeFloat32)
.AddInputAttr(kNumberTypeInt32)
.AddInputAttr(kNumberTypeInt64)
.AddOutputAttr(kNumberTypeFloat32),
KernelAttr()
.AddInputAttr(kNumberTypeFloat32)
.AddInputAttr(kNumberTypeInt64)
.AddInputAttr(kNumberTypeInt32)
.AddOutputAttr(kNumberTypeFloat32),
KernelAttr()
.AddInputAttr(kNumberTypeFloat32)
.AddInputAttr(kNumberTypeInt64)
.AddInputAttr(kNumberTypeInt64)
.AddOutputAttr(kNumberTypeFloat32),
KernelAttr()
.AddInputAttr(kNumberTypeInt32)
.AddInputAttr(kNumberTypeInt32)
.AddInputAttr(kNumberTypeInt32)
.AddOutputAttr(kNumberTypeInt32),
KernelAttr()
.AddInputAttr(kNumberTypeInt32)
.AddInputAttr(kNumberTypeInt32)
.AddInputAttr(kNumberTypeInt64)
.AddOutputAttr(kNumberTypeInt32),
KernelAttr()
.AddInputAttr(kNumberTypeInt32)
.AddInputAttr(kNumberTypeInt64)
.AddInputAttr(kNumberTypeInt32)
.AddOutputAttr(kNumberTypeInt32),
KernelAttr()
.AddInputAttr(kNumberTypeInt32)
.AddInputAttr(kNumberTypeInt64)
.AddInputAttr(kNumberTypeInt64)
.AddOutputAttr(kNumberTypeInt32)};
return support_list;
}
private:
TypeId dtype_{kTypeUnknown};
TypeId segment_ids_dtype_{kTypeUnknown};
size_t unit_num_{1};
size_t input_dim1_{1};
size_t output_dim0_{1};
size_t output_dim1_{1};
void ResetResource();
};
} // namespace kernel
} // namespace mindspore
#endif // MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_CPU_UNSORTED_SEGMENT_SUM_CPU_KERNEL_H_

View File

@ -222,6 +222,8 @@ constexpr auto kReverseV2 = "ReverseV2";
constexpr auto kSparseSparseMinimum = "SparseSparseMinimum";
constexpr auto kBroadcastTo = "BroadcastTo";
constexpr auto kSparseReshape = "SparseReshape";
constexpr auto kUnsortedSegmentSum = "UnsortedSegmentSum";
constexpr auto kUnsortedSegmentProd = "UnsortedSegmentProd";
// NN
constexpr auto kFractionalMaxPoolWithFixedKsize = "FractionalMaxPoolWithFixedKsize";
@ -497,9 +499,9 @@ GVAR_DEF(PrimitivePtr, kPrimStack, std::make_shared<Primitive>(kStack));
GVAR_DEF(PrimitivePtr, kPrimUnpack, std::make_shared<Primitive>("Unpack"));
GVAR_DEF(PrimitivePtr, kPrimUnstack, std::make_shared<Primitive>(kUnstack));
GVAR_DEF(PrimitivePtr, kPrimUnsortedSegmentMax, std::make_shared<Primitive>("UnsortedSegmentMax"));
GVAR_DEF(PrimitivePtr, kPrimUnsortedSegmentSum, std::make_shared<Primitive>("UnsortedSegmentSum"));
GVAR_DEF(PrimitivePtr, kPrimUnsortedSegmentProd, std::make_shared<Primitive>(kUnsortedSegmentProd));
GVAR_DEF(PrimitivePtr, kPrimUnsortedSegmentSum, std::make_shared<Primitive>(kUnsortedSegmentSum));
GVAR_DEF(PrimitivePtr, kPrimUnsortedSegmentMin, std::make_shared<Primitive>("UnsortedSegmentMin"));
GVAR_DEF(PrimitivePtr, kPrimUnsortedSegmentProd, std::make_shared<Primitive>("UnsortedSegmentProd"));
GVAR_DEF(PrimitivePtr, kPrimConcatOffset, std::make_shared<Primitive>("ConcatOffset"));
GVAR_DEF(PrimitivePtr, kPrimIdentityN, std::make_shared<Primitive>("IdentityN"));
GVAR_DEF(PrimitivePtr, kPrimReshape, std::make_shared<Primitive>("Reshape"));

View File

@ -38,6 +38,10 @@ abstract::ShapePtr UnsortedSegmentArithmeticInferShape(const PrimitivePtr &primi
MS_EXCEPTION_IF_NULL(segment_ids_shape_ptr);
auto num_segments_shape_ptr = input_args[kInputIndex2]->BuildShape();
MS_EXCEPTION_IF_NULL(num_segments_shape_ptr);
auto x_shape = CheckAndConvertUtils::ConvertShapePtrToShapeMap(input_args[kInputIndex0]->BuildShape())[kShape];
auto ids_shape = CheckAndConvertUtils::ConvertShapePtrToShapeMap(input_args[kInputIndex1]->BuildShape())[kShape];
(void)CheckAndConvertUtils::CheckInteger("input_x shape size", SizeToLong(x_shape.size()), kGreaterThan, 0,
prim_name);
auto num_segments = input_args[kInputIndex2]->cast<abstract::AbstractScalarPtr>();
int64_t num_segments_value = 0;
@ -64,9 +68,6 @@ abstract::ShapePtr UnsortedSegmentArithmeticInferShape(const PrimitivePtr &primi
<< "', num_segments value must be greater than 0, but got: " << num_segments_value << ".";
}
auto x_shape = CheckAndConvertUtils::ConvertShapePtrToShapeMap(input_args[kInputIndex0]->BuildShape())[kShape];
auto ids_shape = CheckAndConvertUtils::ConvertShapePtrToShapeMap(input_args[kInputIndex1]->BuildShape())[kShape];
for (auto ids_shape_value : ids_shape) {
if (ids_shape_value < 0) {
MS_EXCEPTION(ValueError) << "For '" << prim_name
@ -143,16 +144,17 @@ TypePtr UnsortedSegmentArithmeticInferType(const PrimitivePtr &primitive,
MS_EXCEPTION(TypeError) << "For '" << prim_name << "', input must be a tensor, but got: " << in_type_ptr->ToString()
<< ".";
}
std::set<TypePtr> in_type_set = {kFloat16, kFloat32, kInt32};
return CheckAndConvertUtils::CheckTensorTypeValid("x", in_type_ptr, in_type_set, prim_name);
return CheckAndConvertUtils::CheckSubClass("x", in_type_ptr, {kTensorType}, prim_name);
}
} // namespace
AbstractBasePtr UnsortedSegmentArithmeticInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
const std::vector<AbstractBasePtr> &input_args) {
MS_EXCEPTION_IF_NULL(primitive);
const int64_t kInputNum = 3;
(void)CheckAndConvertUtils::CheckInputArgs(input_args, kGreaterEqual, kInputNum, primitive->name());
for (const auto &item : input_args) {
MS_EXCEPTION_IF_NULL(item);
}
(void)CheckAndConvertUtils::CheckInputArgs(input_args, kGreaterEqual, kInputIndex3, primitive->name());
auto infer_type = UnsortedSegmentArithmeticInferType(primitive, input_args);
auto infer_shape = UnsortedSegmentArithmeticInferShape(primitive, input_args);
return abstract::MakeAbstract(infer_shape, infer_type);

View File

@ -147,13 +147,11 @@ TypePtr UnsortedSegmentSumInferType(const PrimitivePtr &primitive, const std::ve
(void)CheckAndConvertUtils::CheckScalarOrTensorTypesSame(args_num_segments, num_type_set, prim_name);
/* check input_x */
auto x_type_ptr = input_args[kInputIndex0]->BuildType();
std::set<TypePtr> x_type_set = {kFloat16, kFloat32, kFloat64, kInt8, kInt16, kInt32,
kInt64, kUInt8, kUInt16, kUInt32, kUInt64};
return CheckAndConvertUtils::CheckTensorTypeValid("input_x", x_type_ptr, x_type_set, prim_name);
return CheckAndConvertUtils::CheckSubClass("input_x", x_type_ptr, {kTensorType}, prim_name);
}
} // namespace
MIND_API_OPERATOR_IMPL(UnsortedSegmentSum, BaseOperator);
MIND_API_OPERATOR_IMPL(UnsortedSegmentSum, BaseOperator);
AbstractBasePtr UnsortedSegmentSumInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
const std::vector<AbstractBasePtr> &input_args) {
MS_EXCEPTION_IF_NULL(primitive);

View File

@ -1099,18 +1099,33 @@ def get_bprop_unsorted_segment_prod(self):
unsorted_segment_prod = P.UnsortedSegmentProd()
def bprop(x, segment_ids, num_segments, out, dout):
is_zero = equal(x, 0)
if x.dtype == mstype.complex64 or x.dtype == mstype.complex128:
is_zero = equal(x, F.scalar_to_tensor(0).astype(x.dtype))
else:
is_zero = equal(cast(x, mstype.float32), F.scalar_to_tensor(0).astype(np.float32))
num_zero = unsorted_segment_sum(cast(is_zero, mstype.int32), segment_ids, num_segments)
grad = select(greater(num_zero, 1), zeros_like(dout), dout)
non_zero_data = select(is_zero, ones_like(x), x)
if x.dtype == mstype.complex64 or x.dtype == mstype.complex128:
non_zero_data = select(is_zero, ones_like(x), x)
else:
temp_var = ones_like(cast(x, mstype.float32))
non_zero_data = select(is_zero, cast(temp_var, x.dtype), x)
non_zero_prod = unsorted_segment_prod(non_zero_data, segment_ids, num_segments)
zero_clipped_indices = maximum(segment_ids, zeros_like(segment_ids))
gathered_prod = gather(out, zero_clipped_indices, 0)
gathered_non_zero_prod = gather(non_zero_prod, zero_clipped_indices, 0)
prod_divided_by_x = gathered_prod / x
partial_derivative = select(is_zero, gathered_non_zero_prod, prod_divided_by_x)
if x.dtype == mstype.uint32 or x.dtype == mstype.uint64:
prod_divided_by_x = cast(gathered_prod, mstype.float32) / cast(x, mstype.float32)
else:
prod_divided_by_x = gathered_prod / x
partial_derivative = select(is_zero, gathered_non_zero_prod,
cast(prod_divided_by_x, gathered_non_zero_prod.dtype))
gathered_grad, _, _ = _gather_drop_negatives(grad, segment_ids, zero_clipped_indices, None)
dx = gathered_grad * partial_derivative
if x.dtype == mstype.uint32 or x.dtype == mstype.uint64:
temp_dx = cast(gathered_grad, mstype.float32) * cast(partial_derivative, mstype.float32)
dx = cast(temp_dx, x.dtype)
else:
dx = gathered_grad * partial_derivative
return dx, zeros_like(segment_ids), zeros_like(num_segments)
return bprop

View File

@ -336,3 +336,5 @@ from .reservoir_replay_buffer import _rrb_push_op_cpu
from .reservoir_replay_buffer import _rrb_sample_op_cpu
from .reservoir_replay_buffer import _rrb_destroy_op_cpu
from .sparse_reshape import _sparse_reshape_aicpu
from .unsorted_segment_sum import _unsorted_segment_sum_aicpu
from .unsorted_segment_prod import _unsorted_segment_prod_aicpu

View File

@ -0,0 +1,53 @@
# Copyright 2022 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.
# ============================================================================
"""UnsortedSegmentProd op"""
from mindspore.ops.op_info_register import op_info_register, AiCPURegOp, DataType
unsorted_segment_prod_op_info = AiCPURegOp("UnsortedSegmentProd") \
.fusion_type("OPAQUE") \
.input(0, "x", "required") \
.input(1, "segment_ids", "required") \
.input(2, "num_segments", "required") \
.output(0, "y", "required") \
.dtype_format(DataType.F16_Default, DataType.I32_Default, DataType.I32_Default, DataType.F16_Default) \
.dtype_format(DataType.F32_Default, DataType.I32_Default, DataType.I32_Default, DataType.F32_Default) \
.dtype_format(DataType.F64_Default, DataType.I32_Default, DataType.I32_Default, DataType.F64_Default) \
.dtype_format(DataType.U8_Default, DataType.I32_Default, DataType.I32_Default, DataType.U8_Default) \
.dtype_format(DataType.U16_Default, DataType.I32_Default, DataType.I32_Default, DataType.U16_Default) \
.dtype_format(DataType.U32_Default, DataType.I32_Default, DataType.I32_Default, DataType.U32_Default) \
.dtype_format(DataType.U64_Default, DataType.I32_Default, DataType.I32_Default, DataType.U64_Default) \
.dtype_format(DataType.I8_Default, DataType.I32_Default, DataType.I32_Default, DataType.I8_Default) \
.dtype_format(DataType.I16_Default, DataType.I32_Default, DataType.I32_Default, DataType.I16_Default) \
.dtype_format(DataType.I32_Default, DataType.I32_Default, DataType.I32_Default, DataType.I32_Default) \
.dtype_format(DataType.I64_Default, DataType.I32_Default, DataType.I32_Default, DataType.I64_Default) \
.dtype_format(DataType.F16_Default, DataType.I64_Default, DataType.I64_Default, DataType.F16_Default) \
.dtype_format(DataType.F32_Default, DataType.I64_Default, DataType.I64_Default, DataType.F32_Default) \
.dtype_format(DataType.F64_Default, DataType.I64_Default, DataType.I64_Default, DataType.F64_Default) \
.dtype_format(DataType.U8_Default, DataType.I64_Default, DataType.I64_Default, DataType.U8_Default) \
.dtype_format(DataType.U16_Default, DataType.I64_Default, DataType.I64_Default, DataType.U16_Default) \
.dtype_format(DataType.U32_Default, DataType.I64_Default, DataType.I64_Default, DataType.U32_Default) \
.dtype_format(DataType.U64_Default, DataType.I64_Default, DataType.I64_Default, DataType.U64_Default) \
.dtype_format(DataType.I8_Default, DataType.I64_Default, DataType.I64_Default, DataType.I8_Default) \
.dtype_format(DataType.I16_Default, DataType.I64_Default, DataType.I64_Default, DataType.I16_Default) \
.dtype_format(DataType.I32_Default, DataType.I64_Default, DataType.I64_Default, DataType.I32_Default) \
.dtype_format(DataType.I64_Default, DataType.I64_Default, DataType.I64_Default, DataType.I64_Default) \
.get_op_info()
@op_info_register(unsorted_segment_prod_op_info)
def _unsorted_segment_prod_aicpu():
"""UnsortedSegmentProd AiCPU register"""
return

View File

@ -0,0 +1,57 @@
# Copyright 2022 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.
# ============================================================================
"""UnsortedSegmentSum op"""
from mindspore.ops.op_info_register import op_info_register, AiCPURegOp, DataType
unsorted_segment_sum_op_info = AiCPURegOp("UnsortedSegmentSum") \
.fusion_type("OPAQUE") \
.input(0, "x", "required") \
.input(1, "segment_ids", "required") \
.input(2, "num_segments", "required") \
.output(0, "y", "required") \
.dtype_format(DataType.F16_Default, DataType.I32_Default, DataType.I32_Default, DataType.F16_Default) \
.dtype_format(DataType.F32_Default, DataType.I32_Default, DataType.I32_Default, DataType.F32_Default) \
.dtype_format(DataType.F64_Default, DataType.I32_Default, DataType.I32_Default, DataType.F64_Default) \
.dtype_format(DataType.U8_Default, DataType.I32_Default, DataType.I32_Default, DataType.U8_Default) \
.dtype_format(DataType.U16_Default, DataType.I32_Default, DataType.I32_Default, DataType.U16_Default) \
.dtype_format(DataType.U32_Default, DataType.I32_Default, DataType.I32_Default, DataType.U32_Default) \
.dtype_format(DataType.U64_Default, DataType.I32_Default, DataType.I32_Default, DataType.U64_Default) \
.dtype_format(DataType.I8_Default, DataType.I32_Default, DataType.I32_Default, DataType.I8_Default) \
.dtype_format(DataType.I16_Default, DataType.I32_Default, DataType.I32_Default, DataType.I16_Default) \
.dtype_format(DataType.I32_Default, DataType.I32_Default, DataType.I32_Default, DataType.I32_Default) \
.dtype_format(DataType.I64_Default, DataType.I32_Default, DataType.I32_Default, DataType.I64_Default) \
.dtype_format(DataType.C64_Default, DataType.I32_Default, DataType.I32_Default, DataType.C64_Default) \
.dtype_format(DataType.C128_Default, DataType.I32_Default, DataType.I32_Default, DataType.C128_Default) \
.dtype_format(DataType.F16_Default, DataType.I64_Default, DataType.I64_Default, DataType.F16_Default) \
.dtype_format(DataType.F32_Default, DataType.I64_Default, DataType.I64_Default, DataType.F32_Default) \
.dtype_format(DataType.F64_Default, DataType.I64_Default, DataType.I64_Default, DataType.F64_Default) \
.dtype_format(DataType.U8_Default, DataType.I64_Default, DataType.I64_Default, DataType.U8_Default) \
.dtype_format(DataType.U16_Default, DataType.I64_Default, DataType.I64_Default, DataType.U16_Default) \
.dtype_format(DataType.U32_Default, DataType.I64_Default, DataType.I64_Default, DataType.U32_Default) \
.dtype_format(DataType.U64_Default, DataType.I64_Default, DataType.I64_Default, DataType.U64_Default) \
.dtype_format(DataType.I8_Default, DataType.I64_Default, DataType.I64_Default, DataType.I8_Default) \
.dtype_format(DataType.I16_Default, DataType.I64_Default, DataType.I64_Default, DataType.I16_Default) \
.dtype_format(DataType.I32_Default, DataType.I64_Default, DataType.I64_Default, DataType.I32_Default) \
.dtype_format(DataType.I64_Default, DataType.I64_Default, DataType.I64_Default, DataType.I64_Default) \
.dtype_format(DataType.C64_Default, DataType.I64_Default, DataType.I64_Default, DataType.C64_Default) \
.dtype_format(DataType.C128_Default, DataType.I64_Default, DataType.I64_Default, DataType.C128_Default) \
.get_op_info()
@op_info_register(unsorted_segment_sum_op_info)
def _unsorted_segment_sum_aicpu():
"""UnsortedSegmentSum AiCPU register"""
return

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Ţ
0.1.1 MindSpore*1.9.0:Ţ

bprop.33:xbprop.33:[CNode]34:1bprop.33:[CNode]34:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op22

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:£
0.1.1 MindSpore*1.9.0:£

bprop.14:xbprop.14:[CNode]15:1bprop.14:[CNode]15:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:-Default/S-Prim-hyper_map[zeros_like_leaf]-op9
@ -9,6 +9,6 @@ z
bprop.14:x*
bprop.14:out*
bprop.14:dout2
bprop.14:[CNode]16:3:@be2452f9b8134bd7781e5e22020d19b2d36a287f74516a0778f7310f36e43b8bPb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
bprop.14:[CNode]16:3:@abb533f39a011ae73d109e945feea7d72d7b1f540d8413d31d05b9f3b49d0463PbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¤
0.1.1 MindSpore*1.9.0:¤

bprop.17:xbprop.17:[CNode]18:1bprop.17:[CNode]18:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op11
@ -9,6 +9,6 @@ z
bprop.17:x*
bprop.17:out*
bprop.17:dout2
bprop.17:[CNode]19:3:@be2452f9b8134bd7781e5e22020d19b2d36a287f74516a0778f7310f36e43b8bPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh
bprop.17:[CNode]19:3:@abb533f39a011ae73d109e945feea7d72d7b1f540d8413d31d05b9f3b49d0463Pb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Ţ
0.1.1 MindSpore*1.9.0:Ţ

bprop.22:xbprop.22:[CNode]23:1bprop.22:[CNode]23:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op14

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Ţ
0.1.1 MindSpore*1.9.0:Ţ

bprop.26:xbprop.26:[CNode]27:1bprop.26:[CNode]27:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op17

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Â
0.1.1 MindSpore*1.9.0:Â

bprop.61:ybprop.61:[CNode]62:1bprop.61:[CNode]62:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op43
@ -12,6 +12,6 @@ bprop.61:x*
bprop.61:y*
bprop.61:out*
bprop.61:dout2
bprop.61:[CNode]63:3:@7dd1cd68c00464e444752d0c18538ec3eaafde6001adaf9a71ee3997563fb2efPb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
bprop.61:[CNode]63:3:@7dd1cd68c00464e444752d0c18538ec3eaafde6001adaf9a71ee3997563fb2efPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¤
0.1.1 MindSpore*1.9.0:¤

bprop.68:xbprop.68:[CNode]69:1bprop.68:[CNode]69:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op48
@ -9,6 +9,6 @@ z
bprop.68:x*
bprop.68:out*
bprop.68:dout2
bprop.68:[CNode]70:3:@565f906930f68ca2413e9ad958d105e129e717cd183b95d11d65a8b0b030fc0dPb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
bprop.68:[CNode]70:3:@565f906930f68ca2413e9ad958d105e129e717cd183b95d11d65a8b0b030fc0dPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:<3A>
0.1.1 MindSpore*1.9.0:<3A>
s
bprop.20:doutbprop.20:[CNode]21:1bprop.20:[CNode]21:1"REF::S-Prim-MakeTuple:2:Default/S-Prim-MakeTuple-op13bprop.20*

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¶
0.1.1 MindSpore*1.9.0:¶

bprop.116:xbprop.116:[CNode]117:1bprop.116:[CNode]117:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op84

@ -7,6 +7,6 @@
bprop.116:x*
bprop.116:out*
bprop.116:dout2
bprop.116:[CNode]118:3:@be2452f9b8134bd7781e5e22020d19b2d36a287f74516a0778f7310f36e43b8bPb&
bprop.116:[CNode]118:3:@abb533f39a011ae73d109e945feea7d72d7b1f540d8413d31d05b9f3b49d0463Pb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,14 +1,14 @@
0.1.1 MindSpore*1.9.0:ť
§
bprop_depend.31:ybprop_depend.31:[CNode]32:1bprop_depend.31:[CNode]32:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op25
Ą
bprop_depend.31:dout
bprop_depend.31:[CNode]32:1bprop_depend.31:[CNode]33:3bprop_depend.31:[CNode]33:3"REF::S-Prim-MakeTuple:4:Default/S-Prim-MakeTuple-op26bprop_depend.31*
bprop_depend.31:x*
bprop_depend.31:y*
bprop_depend.31:out*
bprop_depend.31:dout2
bprop_depend.31:[CNode]33:3:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPbH
0.1.1 MindSpore*1.9.0:˛
­
bprop_depend.187:ybprop_depend.187:[CNode]188:1bprop_depend.187:[CNode]188:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:/Default/S-Prim-hyper_map[zeros_like_leaf]-op136
­
bprop_depend.187:dout
bprop_depend.187:[CNode]188:1bprop_depend.187:[CNode]189:3bprop_depend.187:[CNode]189:3"REF::S-Prim-MakeTuple:4:Default/S-Prim-MakeTuple-op137bprop_depend.187*
bprop_depend.187:x*
bprop_depend.187:y*
bprop_depend.187:out*
bprop_depend.187:dout2
bprop_depend.187:[CNode]189:3:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,27 +1,23 @@
0.1.1 MindSpore*1.9.0:°

bprop.13:dout
bprop.13:y
bprop.13:keep_probbprop.13:[CNode]14:1bprop.13:[CNode]14:1"REF::S-Prim-DropoutDoMask:2:!Default/S-Prim-DropoutDoMask-op10

bprop.13:ybprop.13:[CNode]15:3bprop.13:[CNode]15:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:4:.Default/S-Prim-hyper_map[zeros_like_leaf]-op11
š
bprop.13:keep_probbprop.13:[CNode]16:5bprop.13:[CNode]16:5"(REF::S-Prim-hyper_map[zeros_like_leaf]:4:.Default/S-Prim-hyper_map[zeros_like_leaf]-op12
¦
bprop.13:[CNode]14:1
bprop.13:[CNode]15:3
bprop.13:[CNode]16:5bprop.13:[CNode]17:6bprop.13:[CNode]17:6"REF::S-Prim-MakeTuple:7:Default/S-Prim-MakeTuple-op13bprop.13*
bprop.13:x*
bprop.13:y*
bprop.13:keep_prob*
bprop.13:out*
bprop.13:dout2
bprop.13:[CNode]17:6:@7faca3fef81704f702bc2f83f8c62d96fac23f5ebc51bcaaa3034eaa79348058PbH
#S-Prim-hyper_map[zeros_like_leaf]:4!S-Prim-hyper_map[zeros_like_leaf]b.
S-Prim-DropoutDoMask:2S-Prim-DropoutDoMaskb&
S-Prim-MakeTuple:7S-Prim-MakeTupleh
0.1.1 MindSpore*1.9.0:Ó
¢
bprop.111:dout
bprop.111:y
bprop.111:keep_probbprop.111:[CNode]112:1bprop.111:[CNode]112:1"REF::S-Prim-DropoutDoMask:2:!Default/S-Prim-DropoutDoMask-op80

bprop.111:ybprop.111:[CNode]113:3bprop.111:[CNode]113:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:4:.Default/S-Prim-hyper_map[zeros_like_leaf]-op81
Ÿ
bprop.111:keep_probbprop.111:[CNode]114:5bprop.111:[CNode]114:5"(REF::S-Prim-hyper_map[zeros_like_leaf]:4:.Default/S-Prim-hyper_map[zeros_like_leaf]-op82
°
bprop.111:[CNode]112:1
bprop.111:[CNode]113:3
bprop.111:[CNode]114:5bprop.111:[CNode]115:6bprop.111:[CNode]115:6"REF::S-Prim-MakeTuple:7:Default/S-Prim-MakeTuple-op83 bprop.111*
bprop.111:x*
bprop.111:y*
bprop.111:keep_prob*
bprop.111:out*
bprop.111:dout2
bprop.111:[CNode]115:6:@7faca3fef81704f702bc2f83f8c62d96fac23f5ebc51bcaaa3034eaa79348058Pb&
S-Prim-MakeTuple:7S-Prim-MakeTupleb.
S-Prim-DropoutDoMask:2S-Prim-DropoutDoMaskbH
#S-Prim-hyper_map[zeros_like_leaf]:4!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,16 +1,16 @@
0.1.1 MindSpore*1.9.0:Ú
0.1.1 MindSpore*1.9.0:ö

bprop.51:shapebprop.51:[CNode]52:1bprop.51:[CNode]52:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op35
š
bprop.51:keep_probbprop.51:[CNode]53:3bprop.51:[CNode]53:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op36
<EFBFBD>
bprop.3:shapebprop.3:[CNode]4:1bprop.3:[CNode]4:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:-Default/S-Prim-hyper_map[zeros_like_leaf]-op2

bprop.3:keep_probbprop.3:[CNode]5:3bprop.3:[CNode]5:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:-Default/S-Prim-hyper_map[zeros_like_leaf]-op3

bprop.3:[CNode]4:1
bprop.3:[CNode]5:3bprop.3:[CNode]6:4bprop.3:[CNode]6:4"REF::S-Prim-MakeTuple:5:Default/S-Prim-MakeTuple-op4bprop.3*
bprop.3:shape*
bprop.3:keep_prob*
bprop.3:out*
bprop.3:dout2
bprop.3:[CNode]6:4:@7faca3fef81704f702bc2f83f8c62d96fac23f5ebc51bcaaa3034eaa79348058Pb&
bprop.51:[CNode]52:1
bprop.51:[CNode]53:3bprop.51:[CNode]54:4bprop.51:[CNode]54:4"REF::S-Prim-MakeTuple:5:Default/S-Prim-MakeTuple-op37bprop.51*
bprop.51:shape*
bprop.51:keep_prob*
bprop.51:out*
bprop.51:dout2
bprop.51:[CNode]54:4:@7faca3fef81704f702bc2f83f8c62d96fac23f5ebc51bcaaa3034eaa79348058Pb&
S-Prim-MakeTuple:5S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¶
0.1.1 MindSpore*1.9.0:¶

bprop.122:xbprop.122:[CNode]123:1bprop.122:[CNode]123:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op88

@ -7,6 +7,6 @@
bprop.122:x*
bprop.122:out*
bprop.122:dout2
bprop.122:[CNode]124:3:@be2452f9b8134bd7781e5e22020d19b2d36a287f74516a0778f7310f36e43b8bPb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
bprop.122:[CNode]124:3:@abb533f39a011ae73d109e945feea7d72d7b1f540d8413d31d05b9f3b49d0463PbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Ţ
0.1.1 MindSpore*1.9.0:Ţ

bprop.71:xbprop.71:[CNode]72:1bprop.71:[CNode]72:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op50

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:ú
0.1.1 MindSpore*1.9.0:ú
˜
bprop.158:xbprop.158:[CNode]159:1bprop.158:[CNode]159:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:/Default/S-Prim-hyper_map[zeros_like_leaf]-op114
˜

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Ţ
0.1.1 MindSpore*1.9.0:Ţ

bprop.83:xbprop.83:[CNode]84:1bprop.83:[CNode]84:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op59

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Þ
0.1.1 MindSpore*1.9.0:Þ

bprop.79:xbprop.79:[CNode]80:1bprop.79:[CNode]80:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op56
@ -15,6 +15,6 @@ bprop.79:x*
bprop.79:y*
bprop.79:out*
bprop.79:dout2
bprop.79:[CNode]82:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:5S-Prim-MakeTupleh
bprop.79:[CNode]82:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPb&
S-Prim-MakeTuple:5S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Þ
0.1.1 MindSpore*1.9.0:Þ

bprop.64:xbprop.64:[CNode]65:1bprop.64:[CNode]65:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op45
@ -15,6 +15,6 @@ bprop.64:x*
bprop.64:y*
bprop.64:out*
bprop.64:dout2
bprop.64:[CNode]67:4:@7dd1cd68c00464e444752d0c18538ec3eaafde6001adaf9a71ee3997563fb2efPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:5S-Prim-MakeTupleh
bprop.64:[CNode]67:4:@7dd1cd68c00464e444752d0c18538ec3eaafde6001adaf9a71ee3997563fb2efPb&
S-Prim-MakeTuple:5S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,9 +1,9 @@
0.1.1 MindSpore*1.8.0:ü
0.1.1 MindSpore*1.9.0:ü
m
bprop.3:doutbprop.3:[CNode]4:1bprop.3:[CNode]4:1"REF::S-Prim-MakeTuple:2:Default/S-Prim-MakeTuple-op2bprop.3*
bprop.3:x*
bprop.3:out*
bprop.3:dout2
bprop.3:[CNode]4:1:@be2452f9b8134bd7781e5e22020d19b2d36a287f74516a0778f7310f36e43b8bPb&
bprop.3:[CNode]4:1:@abb533f39a011ae73d109e945feea7d72d7b1f540d8413d31d05b9f3b49d0463Pb&
S-Prim-MakeTuple:2S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¤
0.1.1 MindSpore*1.9.0:¤

bprop.30:xbprop.30:[CNode]31:1bprop.30:[CNode]31:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op20

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¸
0.1.1 MindSpore*1.9.0:¸
˜
bprop.179:xbprop.179:[CNode]180:1bprop.179:[CNode]180:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:/Default/S-Prim-hyper_map[zeros_like_leaf]-op130
<EFBFBD>

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¸
0.1.1 MindSpore*1.9.0:¸
˜
bprop.176:xbprop.176:[CNode]177:1bprop.176:[CNode]177:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:/Default/S-Prim-hyper_map[zeros_like_leaf]-op128
<EFBFBD>
@ -7,6 +7,6 @@
bprop.176:x*
bprop.176:out*
bprop.176:dout2
bprop.176:[CNode]178:3:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
bprop.176:[CNode]178:3:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Þ
0.1.1 MindSpore*1.9.0:Þ

bprop.91:xbprop.91:[CNode]92:1bprop.91:[CNode]92:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op65
@ -15,6 +15,6 @@ bprop.91:x*
bprop.91:y*
bprop.91:out*
bprop.91:dout2
bprop.91:[CNode]94:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPb&
S-Prim-MakeTuple:5S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
bprop.91:[CNode]94:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:5S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Þ
0.1.1 MindSpore*1.9.0:Þ

bprop.87:xbprop.87:[CNode]88:1bprop.87:[CNode]88:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op62
@ -15,6 +15,6 @@ bprop.87:x*
bprop.87:y*
bprop.87:out*
bprop.87:dout2
bprop.87:[CNode]90:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:5S-Prim-MakeTupleh
bprop.87:[CNode]90:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPb&
S-Prim-MakeTuple:5S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Š
0.1.1 MindSpore*1.9.0:Š

bprop.46:startbprop.46:[CNode]47:1bprop.46:[CNode]47:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op31


View File

@ -1,14 +1,14 @@
0.1.1 MindSpore*1.9.0:
§
bprop_load.48:u_monadbprop_load.48:[CNode]49:1bprop_load.48:[CNode]49:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op38
<EFBFBD>
bprop_load.48:dout
bprop_load.48:[CNode]49:1bprop_load.48:[CNode]50:3bprop_load.48:[CNode]50:3"REF::S-Prim-MakeTuple:4:Default/S-Prim-MakeTuple-op39 bprop_load.48*
bprop_load.48:param*
bprop_load.48:u_monad*
bprop_load.48:out*
bprop_load.48:dout2
bprop_load.48:[CNode]50:3:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPb&
0.1.1 MindSpore*1.9.0:¨
­
bprop_load.204:u_monadbprop_load.204:[CNode]205:1bprop_load.204:[CNode]205:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:/Default/S-Prim-hyper_map[zeros_like_leaf]-op149
¥
bprop_load.204:dout
bprop_load.204:[CNode]205:1bprop_load.204:[CNode]206:3bprop_load.204:[CNode]206:3"REF::S-Prim-MakeTuple:4:Default/S-Prim-MakeTuple-op150bprop_load.204*
bprop_load.204:param*
bprop_load.204:u_monad*
bprop_load.204:out*
bprop_load.204:dout2
bprop_load.204:[CNode]206:3:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Þ
0.1.1 MindSpore*1.9.0:Þ

bprop.95:xbprop.95:[CNode]96:1bprop.95:[CNode]96:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op68
@ -15,6 +15,6 @@ bprop.95:x*
bprop.95:y*
bprop.95:out*
bprop.95:dout2
bprop.95:[CNode]98:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:5S-Prim-MakeTupleh
bprop.95:[CNode]98:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPb&
S-Prim-MakeTuple:5S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¤
0.1.1 MindSpore*1.9.0:¤

bprop.40:xbprop.40:[CNode]41:1bprop.40:[CNode]41:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op27

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:ç
0.1.1 MindSpore*1.9.0:ç

bprop.99:xbprop.99:[CNode]100:1bprop.99:[CNode]100:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op71
@ -15,6 +15,6 @@ bprop.99:x*
bprop.99:y*
bprop.99:out*
bprop.99:dout2
bprop.99:[CNode]102:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPb&
S-Prim-MakeTuple:5S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
bprop.99:[CNode]102:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:5S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:Ţ
0.1.1 MindSpore*1.9.0:Ţ

bprop.75:xbprop.75:[CNode]76:1bprop.75:[CNode]76:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op53

View File

@ -1,24 +1,24 @@
0.1.1 MindSpore*1.9.0:Ý

bprop.7:indicesbprop.7:[CNode]8:1bprop.7:[CNode]8:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:-Default/S-Prim-hyper_map[zeros_like_leaf]-op5
<EFBFBD>
bprop.7:depthbprop.7:[CNode]9:3bprop.7:[CNode]9:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:-Default/S-Prim-hyper_map[zeros_like_leaf]-op6

bprop.7:on_valuebprop.7:[CNode]10:4bprop.7:[CNode]10:4"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:-Default/S-Prim-hyper_map[zeros_like_leaf]-op7
0.1.1 MindSpore*1.9.0:
˜
bprop.55:indicesbprop.55:[CNode]56:1bprop.55:[CNode]56:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op38
<EFBFBD>
bprop.7:off_valuebprop.7:[CNode]11:5bprop.7:[CNode]11:5"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:-Default/S-Prim-hyper_map[zeros_like_leaf]-op8
³
bprop.7:[CNode]8:1
bprop.7:[CNode]9:3
bprop.7:[CNode]10:4
bprop.7:[CNode]11:5bprop.7:[CNode]12:6bprop.7:[CNode]12:6"REF::S-Prim-MakeTuple:7:Default/S-Prim-MakeTuple-op9bprop.7*
bprop.7:indices*
bprop.7:depth*
bprop.7:on_value*
bprop.7:off_value*
bprop.7:out*
bprop.7:dout2
bprop.7:[CNode]12:6:@7faca3fef81704f702bc2f83f8c62d96fac23f5ebc51bcaaa3034eaa79348058PbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:7S-Prim-MakeTupleh
bprop.55:depthbprop.55:[CNode]57:3bprop.55:[CNode]57:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op39

bprop.55:on_valuebprop.55:[CNode]58:4bprop.55:[CNode]58:4"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op40
š
bprop.55:off_valuebprop.55:[CNode]59:5bprop.55:[CNode]59:5"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op41
¼
bprop.55:[CNode]56:1
bprop.55:[CNode]57:3
bprop.55:[CNode]58:4
bprop.55:[CNode]59:5bprop.55:[CNode]60:6bprop.55:[CNode]60:6"REF::S-Prim-MakeTuple:7:Default/S-Prim-MakeTuple-op42bprop.55*
bprop.55:indices*
bprop.55:depth*
bprop.55:on_value*
bprop.55:off_value*
bprop.55:out*
bprop.55:dout2
bprop.55:[CNode]60:6:@7faca3fef81704f702bc2f83f8c62d96fac23f5ebc51bcaaa3034eaa79348058Pb&
S-Prim-MakeTuple:7S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:”
0.1.1 MindSpore*1.9.0:”
Œ
bprop.8:xbprop.8:[CNode]9:1bprop.8:[CNode]9:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:-Default/S-Prim-hyper_map[zeros_like_leaf]-op5
u
@ -7,6 +7,6 @@ u
bprop.8:x*
bprop.8:out*
bprop.8:dout2
bprop.8:[CNode]10:3:@be2452f9b8134bd7781e5e22020d19b2d36a287f74516a0778f7310f36e43b8bPb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
bprop.8:[CNode]10:3:@abb533f39a011ae73d109e945feea7d72d7b1f540d8413d31d05b9f3b49d0463PbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:
0.1.1 MindSpore*1.9.0:
Œ
bprop.5:xbprop.5:[CNode]6:1bprop.5:[CNode]6:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:-Default/S-Prim-hyper_map[zeros_like_leaf]-op3
s
@ -7,6 +7,6 @@ s
bprop.5:x*
bprop.5:out*
bprop.5:dout2
bprop.5:[CNode]7:3:@be2452f9b8134bd7781e5e22020d19b2d36a287f74516a0778f7310f36e43b8bPbH
bprop.5:[CNode]7:3:@abb533f39a011ae73d109e945feea7d72d7b1f540d8413d31d05b9f3b49d0463PbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¶
0.1.1 MindSpore*1.9.0:¶

bprop.125:xbprop.125:[CNode]126:1bprop.125:[CNode]126:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op90

@ -7,6 +7,6 @@
bprop.125:x*
bprop.125:out*
bprop.125:dout2
bprop.125:[CNode]127:3:@be2452f9b8134bd7781e5e22020d19b2d36a287f74516a0778f7310f36e43b8bPbH
bprop.125:[CNode]127:3:@abb533f39a011ae73d109e945feea7d72d7b1f540d8413d31d05b9f3b49d0463PbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:ý
0.1.1 MindSpore*1.9.0:ý

bprop.103:xbprop.103:[CNode]104:1bprop.103:[CNode]104:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op74
š
@ -11,6 +11,6 @@
bprop.103:axis*
bprop.103:out*
bprop.103:dout2
bprop.103:[CNode]106:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:5S-Prim-MakeTupleh
bprop.103:[CNode]106:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPb&
S-Prim-MakeTuple:5S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:ý
0.1.1 MindSpore*1.9.0:ý

bprop.107:xbprop.107:[CNode]108:1bprop.107:[CNode]108:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op77
š

View File

@ -1,24 +1,21 @@
0.1.1 MindSpore*1.9.0:¿
u
bprop.18:dout
bprop.18:ybprop.18:dgrad:1bprop.18:dgrad:1"REF::S-Prim-ReluGrad:2:Default/S-Prim-ReluGrad-op14

bprop.18:ybprop.18:[CNode]19:3bprop.18:[CNode]19:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:4:.Default/S-Prim-hyper_map[zeros_like_leaf]-op15
Œ
bprop.18:dgrad:1
bprop.18:[CNode]19:3bprop.18:[CNode]20:5bprop.18:[CNode]20:5"REF::S-Prim-MakeTuple:6:Default/S-Prim-MakeTuple-op16bprop.18*
bprop.18:grad*
bprop.18:y*
bprop.18:out*
bprop.18:dout2
bprop.18:[CNode]20:5:@7faca3fef81704f702bc2f83f8c62d96fac23f5ebc51bcaaa3034eaa79348058PbH
#S-Prim-hyper_map[zeros_like_leaf]:4!S-Prim-hyper_map[zeros_like_leaf]b&
0.1.1 MindSpore*1.9.0:Ù
z
bprop.150:dout
bprop.150:ybprop.150:dgrad:1bprop.150:dgrad:1"REF::S-Prim-ReluGrad:2:Default/S-Prim-ReluGrad-op107
˜
bprop.150:ybprop.150:[CNode]151:3bprop.150:[CNode]151:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:4:/Default/S-Prim-hyper_map[zeros_like_leaf]-op108

bprop.150:dgrad:1
bprop.150:[CNode]151:3bprop.150:[CNode]152:5bprop.150:[CNode]152:5"REF::S-Prim-MakeTuple:6:Default/S-Prim-MakeTuple-op109 bprop.150*
bprop.150:grad*
bprop.150:y*
bprop.150:out*
bprop.150:dout2
bprop.150:[CNode]152:5:@7faca3fef81704f702bc2f83f8c62d96fac23f5ebc51bcaaa3034eaa79348058Pb&
S-Prim-MakeTuple:6S-Prim-MakeTuplebr
S-Prim-ReluGrad:2S-Prim-ReluGrad
output_names€Š Zoutput€+
input_names€ŠZ
y_backprop€ŠZx€h
y_backprop€ŠZx€bH
#S-Prim-hyper_map[zeros_like_leaf]:4!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¤
0.1.1 MindSpore*1.9.0:¤

bprop.43:xbprop.43:[CNode]44:1bprop.43:[CNode]44:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op29
@ -9,6 +9,6 @@ z
bprop.43:x*
bprop.43:out*
bprop.43:dout2
bprop.43:[CNode]45:3:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
bprop.43:[CNode]45:3:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:ø
0.1.1 MindSpore*1.9.0:ø
š
bprop.128:condbprop.128:[CNode]129:1bprop.128:[CNode]129:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op92

@ -23,9 +23,9 @@
bprop.128:y*
bprop.128:out*
bprop.128:dout2
bprop.128:[CNode]134:8:@be2452f9b8134bd7781e5e22020d19b2d36a287f74516a0778f7310f36e43b8bPb&
S-Prim-MakeTuple:9S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]bv
bprop.128:[CNode]134:8:@abb533f39a011ae73d109e945feea7d72d7b1f540d8413d31d05b9f3b49d0463PbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:9S-Prim-MakeTuplebv
S-Prim-Select:5 S-Prim-Select
output_names€Š Zoutput€3
input_names€ŠZ condition€ŠZx€ŠZy€h

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¶
0.1.1 MindSpore*1.9.0:¶

bprop.119:xbprop.119:[CNode]120:1bprop.119:[CNode]120:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op86

@ -7,6 +7,6 @@
bprop.119:x*
bprop.119:out*
bprop.119:dout2
bprop.119:[CNode]121:3:@be2452f9b8134bd7781e5e22020d19b2d36a287f74516a0778f7310f36e43b8bPbH
bprop.119:[CNode]121:3:@abb533f39a011ae73d109e945feea7d72d7b1f540d8413d31d05b9f3b49d0463PbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¤
0.1.1 MindSpore*1.9.0:¤

bprop.37:xbprop.37:[CNode]38:1bprop.37:[CNode]38:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op25
@ -9,6 +9,6 @@ z
bprop.37:x*
bprop.37:out*
bprop.37:dout2
bprop.37:[CNode]39:3:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
bprop.37:[CNode]39:3:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,33 +1,33 @@
0.1.1 MindSpore*1.9.0:©
0.1.1 MindSpore*1.9.0:à
ª
bprop_switch.37:condbprop_switch.37:[CNode]38:1bprop_switch.37:[CNode]38:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op29
¨
bprop_switch.37:tbbprop_switch.37:[CNode]39:3bprop_switch.37:[CNode]39:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:4:.Default/S-Prim-hyper_map[zeros_like_leaf]-op30
µ
bprop_switch.37:cond
bprop_switch.37:dout
bprop_switch.37:[CNode]39:3bprop_switch.37:[CNode]40:5bprop_switch.37:[CNode]40:5"REF::S-Prim-Switch:6:Default/S-Prim-Switch-op31
¨
bprop_switch.37:fbbprop_switch.37:[CNode]41:7bprop_switch.37:[CNode]41:7"(REF::S-Prim-hyper_map[zeros_like_leaf]:8:.Default/S-Prim-hyper_map[zeros_like_leaf]-op32

bprop_switch.37:cond
bprop_switch.37:[CNode]41:7
bprop_switch.37:doutbprop_switch.37:[CNode]42:9bprop_switch.37:[CNode]42:9"REF::S-Prim-Switch:10:Default/S-Prim-Switch-op33
Ì
bprop_switch.37:[CNode]38:1
bprop_switch.37:[CNode]40:5
bprop_switch.37:[CNode]42:9bprop_switch.37:[CNode]43:11bprop_switch.37:[CNode]43:11"REF::S-Prim-MakeTuple:12:Default/S-Prim-MakeTuple-op34bprop_switch.37*
bprop_switch.37:cond*
bprop_switch.37:tb*
bprop_switch.37:fb*
bprop_switch.37:out*
bprop_switch.37:dout2
bprop_switch.37:[CNode]43:11:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPb
S-Prim-Switch:6 S-Prim-SwitchbH
#S-Prim-hyper_map[zeros_like_leaf]:8!S-Prim-hyper_map[zeros_like_leaf]b'
°
bprop_switch.193:condbprop_switch.193:[CNode]194:1bprop_switch.193:[CNode]194:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:/Default/S-Prim-hyper_map[zeros_like_leaf]-op140
®
bprop_switch.193:tbbprop_switch.193:[CNode]195:3bprop_switch.193:[CNode]195:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:4:/Default/S-Prim-hyper_map[zeros_like_leaf]-op141
¾
bprop_switch.193:cond
bprop_switch.193:dout
bprop_switch.193:[CNode]195:3bprop_switch.193:[CNode]196:5bprop_switch.193:[CNode]196:5"REF::S-Prim-Switch:6:Default/S-Prim-Switch-op142
®
bprop_switch.193:fbbprop_switch.193:[CNode]197:7bprop_switch.193:[CNode]197:7"(REF::S-Prim-hyper_map[zeros_like_leaf]:8:/Default/S-Prim-hyper_map[zeros_like_leaf]-op143
¿
bprop_switch.193:cond
bprop_switch.193:[CNode]197:7
bprop_switch.193:doutbprop_switch.193:[CNode]198:9bprop_switch.193:[CNode]198:9"REF::S-Prim-Switch:10:Default/S-Prim-Switch-op144
×
bprop_switch.193:[CNode]194:1
bprop_switch.193:[CNode]196:5
bprop_switch.193:[CNode]198:9bprop_switch.193:[CNode]199:11bprop_switch.193:[CNode]199:11"REF::S-Prim-MakeTuple:12:Default/S-Prim-MakeTuple-op145bprop_switch.193*
bprop_switch.193:cond*
bprop_switch.193:tb*
bprop_switch.193:fb*
bprop_switch.193:out*
bprop_switch.193:dout2
bprop_switch.193:[CNode]199:11:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b'
S-Prim-MakeTuple:12S-Prim-MakeTupleb!
S-Prim-Switch:10 S-Prim-SwitchbH
#S-Prim-hyper_map[zeros_like_leaf]:4!S-Prim-hyper_map[zeros_like_leaf]bH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
#S-Prim-hyper_map[zeros_like_leaf]:8!S-Prim-hyper_map[zeros_like_leaf]b
S-Prim-Switch:6 S-Prim-Switchh

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:ú
0.1.1 MindSpore*1.9.0:ú
˜
bprop.162:xbprop.162:[CNode]163:1bprop.162:[CNode]163:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:/Default/S-Prim-hyper_map[zeros_like_leaf]-op117
˜
@ -11,6 +11,6 @@
bprop.162:y*
bprop.162:out*
bprop.162:dout2
bprop.162:[CNode]165:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:5S-Prim-MakeTupleh
bprop.162:[CNode]165:4:@1bd2dbdf4be3507b9b4edda63675968c63a3fc7b6aefb516020b2fc1163cd59fPb&
S-Prim-MakeTuple:5S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,22 +1,22 @@
0.1.1 MindSpore*1.9.0:°
¿
bprop_tuple_getitem.21:data"bprop_tuple_getitem.21:[CNode]22:1"bprop_tuple_getitem.21:[CNode]22:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op17
å
"bprop_tuple_getitem.21:[CNode]22:1
bprop_tuple_getitem.21:idx
bprop_tuple_getitem.21:dout"bprop_tuple_getitem.21:[CNode]23:3"bprop_tuple_getitem.21:[CNode]23:3"REF::S-Prim-tuple_setitem:4:!Default/S-Prim-tuple_setitem-op18
¾
bprop_tuple_getitem.21:idx"bprop_tuple_getitem.21:[CNode]24:5"bprop_tuple_getitem.21:[CNode]24:5"(REF::S-Prim-hyper_map[zeros_like_leaf]:6:.Default/S-Prim-hyper_map[zeros_like_leaf]-op19
È
"bprop_tuple_getitem.21:[CNode]23:3
"bprop_tuple_getitem.21:[CNode]24:5"bprop_tuple_getitem.21:[CNode]25:7"bprop_tuple_getitem.21:[CNode]25:7"REF::S-Prim-MakeTuple:8:Default/S-Prim-MakeTuple-op20bprop_tuple_getitem.21*
bprop_tuple_getitem.21:data*
bprop_tuple_getitem.21:idx*
bprop_tuple_getitem.21:out*
bprop_tuple_getitem.21:dout2$
"bprop_tuple_getitem.21:[CNode]25:7:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPb&
0.1.1 MindSpore*1.9.0:Õ
Å
bprop_tuple_getitem.153:data$bprop_tuple_getitem.153:[CNode]154:1$bprop_tuple_getitem.153:[CNode]154:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:/Default/S-Prim-hyper_map[zeros_like_leaf]-op110
î
$bprop_tuple_getitem.153:[CNode]154:1
bprop_tuple_getitem.153:idx
bprop_tuple_getitem.153:dout$bprop_tuple_getitem.153:[CNode]155:3$bprop_tuple_getitem.153:[CNode]155:3"REF::S-Prim-tuple_setitem:4:"Default/S-Prim-tuple_setitem-op111
Ä
bprop_tuple_getitem.153:idx$bprop_tuple_getitem.153:[CNode]156:5$bprop_tuple_getitem.153:[CNode]156:5"(REF::S-Prim-hyper_map[zeros_like_leaf]:6:/Default/S-Prim-hyper_map[zeros_like_leaf]-op112
Ñ
$bprop_tuple_getitem.153:[CNode]155:3
$bprop_tuple_getitem.153:[CNode]156:5$bprop_tuple_getitem.153:[CNode]157:7$bprop_tuple_getitem.153:[CNode]157:7"REF::S-Prim-MakeTuple:8:Default/S-Prim-MakeTuple-op113bprop_tuple_getitem.153*
bprop_tuple_getitem.153:data*
bprop_tuple_getitem.153:idx*
bprop_tuple_getitem.153:out*
bprop_tuple_getitem.153:dout2&
$bprop_tuple_getitem.153:[CNode]157:7:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPb&
S-Prim-MakeTuple:8S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]bH
#S-Prim-hyper_map[zeros_like_leaf]:6!S-Prim-hyper_map[zeros_like_leaf]b.
S-Prim-tuple_setitem:4S-Prim-tuple_setitembH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
S-Prim-tuple_setitem:4S-Prim-tuple_setitemh

View File

@ -1,17 +1,17 @@
0.1.1 MindSpore*1.9.0:ş
0.1.1 MindSpore*1.9.0:Ö
Ĺ
bprop_update_state.200:u_monad#bprop_update_state.200:[CNode]201:1#bprop_update_state.200:[CNode]201:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:/Default/S-Prim-hyper_map[zeros_like_leaf]-op146
¿
bprop_update_state.44:u_monad!bprop_update_state.44:[CNode]45:1!bprop_update_state.44:[CNode]45:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op35
š
bprop_update_state.44:x!bprop_update_state.44:[CNode]46:3!bprop_update_state.44:[CNode]46:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:4:.Default/S-Prim-hyper_map[zeros_like_leaf]-op36
Ä
!bprop_update_state.44:[CNode]45:1
!bprop_update_state.44:[CNode]46:3!bprop_update_state.44:[CNode]47:5!bprop_update_state.44:[CNode]47:5"REF::S-Prim-MakeTuple:6:Default/S-Prim-MakeTuple-op37bprop_update_state.44*
bprop_update_state.44:u_monad*
bprop_update_state.44:x*
bprop_update_state.44:out*
bprop_update_state.44:dout2#
!bprop_update_state.44:[CNode]47:5:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPb&
bprop_update_state.200:x#bprop_update_state.200:[CNode]202:3#bprop_update_state.200:[CNode]202:3"(REF::S-Prim-hyper_map[zeros_like_leaf]:4:/Default/S-Prim-hyper_map[zeros_like_leaf]-op147
Í
#bprop_update_state.200:[CNode]201:1
#bprop_update_state.200:[CNode]202:3#bprop_update_state.200:[CNode]203:5#bprop_update_state.200:[CNode]203:5"REF::S-Prim-MakeTuple:6:Default/S-Prim-MakeTuple-op148bprop_update_state.200*
bprop_update_state.200:u_monad*
bprop_update_state.200:x*
bprop_update_state.200:out*
bprop_update_state.200:dout2%
#bprop_update_state.200:[CNode]203:5:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPb&
S-Prim-MakeTuple:6S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:4!S-Prim-hyper_map[zeros_like_leaf]bH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]bH
#S-Prim-hyper_map[zeros_like_leaf]:4!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -1,5 +1,5 @@
0.1.1 MindSpore*1.8.0:¢
0.1.1 MindSpore*1.9.0:¢

bprop.11:xbprop.11:[CNode]12:1bprop.11:[CNode]12:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:-Default/S-Prim-hyper_map[zeros_like_leaf]-op7
@ -9,6 +9,6 @@ y
bprop.11:x*
bprop.11:out*
bprop.11:dout2
bprop.11:[CNode]13:3:@be2452f9b8134bd7781e5e22020d19b2d36a287f74516a0778f7310f36e43b8bPbH
bprop.11:[CNode]13:3:@abb533f39a011ae73d109e945feea7d72d7b1f540d8413d31d05b9f3b49d0463PbH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]b&
S-Prim-MakeTuple:4S-Prim-MakeTupleh

View File

@ -1,12 +1,12 @@
0.1.1 MindSpore*1.9.0:¿
¼
bprop_stop_gradient.34:x"bprop_stop_gradient.34:[CNode]35:1"bprop_stop_gradient.34:[CNode]35:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:.Default/S-Prim-hyper_map[zeros_like_leaf]-op27
¤
"bprop_stop_gradient.34:[CNode]35:1"bprop_stop_gradient.34:[CNode]36:3"bprop_stop_gradient.34:[CNode]36:3"REF::S-Prim-MakeTuple:4:Default/S-Prim-MakeTuple-op28bprop_stop_gradient.34*
bprop_stop_gradient.34:x*
bprop_stop_gradient.34:out*
bprop_stop_gradient.34:dout2$
"bprop_stop_gradient.34:[CNode]36:3:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPb&
0.1.1 MindSpore*1.9.0:Ò
Â
bprop_stop_gradient.190:x$bprop_stop_gradient.190:[CNode]191:1$bprop_stop_gradient.190:[CNode]191:1"(REF::S-Prim-hyper_map[zeros_like_leaf]:2:/Default/S-Prim-hyper_map[zeros_like_leaf]-op138
«
$bprop_stop_gradient.190:[CNode]191:1$bprop_stop_gradient.190:[CNode]192:3$bprop_stop_gradient.190:[CNode]192:3"REF::S-Prim-MakeTuple:4:Default/S-Prim-MakeTuple-op139bprop_stop_gradient.190*
bprop_stop_gradient.190:x*
bprop_stop_gradient.190:out*
bprop_stop_gradient.190:dout2&
$bprop_stop_gradient.190:[CNode]192:3:@9a6bb7e850c8f74f5c8a035d4570b2cf22c22277315f89eec3ad4f7ef4f7878dPb&
S-Prim-MakeTuple:4S-Prim-MakeTuplebH
#S-Prim-hyper_map[zeros_like_leaf]:2!S-Prim-hyper_map[zeros_like_leaf]h

View File

@ -2384,7 +2384,7 @@ class Tile(PrimitiveWithInfer):
return out
class UnsortedSegmentSum(PrimitiveWithInfer):
class UnsortedSegmentSum(Primitive):
r"""
Computes the sum of a tensor along segments.
@ -2416,43 +2416,6 @@ class UnsortedSegmentSum(PrimitiveWithInfer):
"""Initialize UnsortedSegmentSum"""
self.init_prim_io_names(inputs=['x', 'segment_ids', 'num_segments'], outputs=['y'])
def __infer__(self, x, segment_ids, num_segments):
x_type = x['dtype']
x_shp = x['shape']
validator.check_subclass("input_x", x_type, mstype.tensor, self.name)
validator.check_value_type("x_shape", x_shp, [list], self.name)
x_shp_len = len(x_shp)
validator.check_positive_int(x_shp_len, "rank of input_x", self.name)
segment_ids_shp = segment_ids['shape']
segment_ids_type = segment_ids['dtype']
validator.check_subclass("segment_ids", segment_ids_type, mstype.tensor, self.name)
validator.check_value_type("segment_ids", segment_ids_shp, [list], self.name)
segment_ids_shp_len = len(segment_ids_shp)
validator.check_positive_int(segment_ids_shp_len, "rank of segment_ids", self.name)
validator.check(f'rank of input_x', len(x_shp),
'rank of segments_id', len(segment_ids_shp), Rel.GE, self.name)
if not is_shape_unknown(x_shp) and not is_shape_unknown(segment_ids_shp):
# only validate when both shapes fully known
for i, value in enumerate(segment_ids_shp):
validator.check("ids[%d]" % i, value, 'input[%d]' % i, x_shp[i], Rel.EQ, self.name)
num_segments_v = num_segments['value']
num_segments_type = num_segments['dtype']
validator.check_subclass("num_segments", num_segments_type, [mstype.tensor, mstype.number], self.name)
if isinstance(num_segments_type, type(mstype.tensor)):
validator.check_tensor_dtype_valid("num_segments", num_segments_type, [mstype.int32, mstype.int64],
self.name)
shp = [-1]
else:
validator.check_value_type('num_segments', num_segments_v, [int], self.name)
validator.check_positive_int(num_segments_v, "num_segments", self.name)
shp = [num_segments_v]
shp += x_shp[segment_ids_shp_len:]
out = {'shape': shp,
'dtype': mstype.tensor_type(x_type.element_type()),
'value': None}
return out
class UnsortedSegmentMin(PrimitiveWithCheck):
r"""
@ -2619,7 +2582,7 @@ class UnsortedSegmentProd(Primitive):
Refer to :func:`mindspore.ops.unsorted_segment_prod` for more detail.
Supported Platforms:
``Ascend`` ``GPU``
``Ascend`` ``GPU`` ``CPU``
Examples:
>>> from mindspore import Tensor