/third_party/mindspore/tests/ut/cpp/kernel/cpu/ |
D | sparse_apply_ftrl_cpu_kernel_test.cc | 59 void CreateWorkspaceAddress(std::vector<float> &new_grad, std::vector<int64_t> &new_indices, in CreateWorkspaceAddress() argument 61 workspace_.push_back(CreateKernelAddress(new_grad.data())); in CreateWorkspaceAddress() 91 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 95 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F() 118 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 122 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F() 149 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 153 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
|
D | sparse_apply_proximal_adagrad_cpu_kernel_test.cc | 57 void CreateWorkspaceAddress(std::vector<float> &new_grad, std::vector<int64_t> &new_indices, in CreateWorkspaceAddress() argument 59 workspace_.push_back(CreateKernelAddress(new_grad.data())); in CreateWorkspaceAddress() 90 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 94 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F() 116 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 120 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F() 146 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 150 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
|
D | sparse_apply_lazy_adam_cpu_kernel_test.cc | 61 void CreateWorkspaceAddress(std::vector<float> &new_grad, std::vector<int64_t> &new_indices, in CreateWorkspaceAddress() argument 63 workspace_.push_back(CreateKernelAddress(new_grad.data())); in CreateWorkspaceAddress() 99 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 103 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F() 126 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 130 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F() 157 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 161 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices); in TEST_F()
|
D | sparse_apply_adam_cpu_kernel_test.cc | 61 void CreateWorkspaceAddress(std::vector<float> &new_grad, std::vector<int64_t> &new_indices, in CreateWorkspaceAddress() argument 64 workspace_.push_back(CreateKernelAddress(new_grad.data())); in CreateWorkspaceAddress() 101 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 106 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices, m_t); in TEST_F() 129 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 134 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices, m_t); in TEST_F() 161 std::vector<float> new_grad(3 * 3 * 3); in TEST_F() local 166 CreateWorkspaceAddress(new_grad, new_indices, tmp_grad, tmp_indices, m_t); in TEST_F()
|
/third_party/mindspore/tests/ut/python/ops/ |
D | test_dynamic_shape.py | 51 new_grad = self.expand_dims(ids, 1) 52 new_grad = self.cast(new_grad, mstype.float32) + grad 53 return self.net(new_grad, ids) 85 new_grad = self.expand_dims(ids, 1) 86 new_grad = self.cast(new_grad, mstype.float32) + grad 87 return self.net(new_grad, ids)
|
/third_party/mindspore/mindspore/nn/wrap/ |
D | grad_reducer.py | 411 new_grad = grads 414 new_grad = self.map_(F.partial(reduce_opt, self.degree, self.mean, self.allgather), 417 new_grad = self.map_(F.partial(reduce_opt, self.degree, self.mean, self.allgather), 421 new_grad = self.map_(F.partial(reduce_opt, self.degree, self.mean, self.allgather, 424 new_grad = self.map_(F.partial(reduce_opt, self.degree, self.mean, self.allgather, 426 new_grad = self.map_(F.partial(_cast_datatype), datatypes, new_grad) 427 return new_grad
|
D | loss_scale.py | 440 new_grad = accu_grad * reciprocal(scale) 441 accu_grad = F.depend(accu_grad, new_grad) 443 new_grad = F.depend(new_grad, F.assign(accu_grad, zeros)) 444 return new_grad 449 new_grad = grad * reciprocal(scale) 450 accu_grad = F.depend(accu_grad, new_grad) 451 new_grad = F.depend(new_grad, F.assign(accu_grad, F.zeros_like(accu_grad))) 452 return new_grad
|
/third_party/mindspore/tests/ut/python/parallel/ |
D | test_loss_scale.py | 52 new_grad = C.clip_by_value(grad, F.cast(F.tuple_to_array((-clip_value,)), dt), 55 new_grad = nn.ClipByNorm()(grad, F.cast(F.tuple_to_array((clip_value,)), dt)) 56 return new_grad
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/ |
D | sparse_apply_proximal_adagrad_cpu_kernel.cc | 136 auto new_grad = reinterpret_cast<float *>(workspace[0]->addr); in LaunchKernel() local 141 SparseGradient<T> unique_sparse_grad({new_grad, new_indices, indices_size_}); in LaunchKernel()
|
D | sparse_apply_lazy_adam_cpu_kernel.cc | 139 auto *new_grad = reinterpret_cast<float *>(workspace[0]->addr); in LaunchKernel() local 144 SparseGradient<T> unique_sparse_grad({new_grad, new_indices, indices_size_}); in LaunchKernel()
|
D | sparse_apply_ftrl_cpu_kernel.cc | 147 auto *new_grad = reinterpret_cast<float *>(workspace[0]->addr); in LaunchKernel() local 152 SparseGradient<T> unique_sparse_grad({new_grad, new_indices, indices_size_}); in LaunchKernel()
|
D | sparse_apply_adam_cpu_kernel.cc | 159 auto *new_grad = reinterpret_cast<float *>(workspace[0]->addr); in LaunchKernel() local 165 SparseGradient<T> unique_sparse_grad({new_grad, new_indices, indices_size_}); in LaunchKernel()
|
/third_party/mindspore/tests/st/fl/albert/src/ |
D | cell_wrapper.py | 85 new_grad = C.clip_by_value(grad, F.cast(F.tuple_to_array((-clip_value,)), dt), 88 new_grad = ClipByNorm()(grad, F.cast(F.tuple_to_array((clip_value,)), dt)) 89 return new_grad
|
/third_party/mindspore/tests/st/networks/models/bert/src/ |
D | bert_for_pre_training.py | 56 new_grad = C.clip_by_value(grad, F.cast(F.tuple_to_array((-clip_value,)), dt), 59 new_grad = nn.ClipByNorm()(grad, F.cast(F.tuple_to_array((clip_value,)), dt)) 60 return new_grad
|
/third_party/mindspore/mindspore/ccsrc/ps/ |
D | optimizer_info.cc | 190 std::vector<float> new_grad(indices_size * segment_size); in ComputeMean() local 192 …mindspore::kernel::SparseGradient<int> unique_sparse_grad({new_grad.data(), new_indices.data(), in… in ComputeMean()
|
D | worker.cc | 798 std::vector<float> new_grad(partition_segment_size); in SparsePartitioner() local 800 …mindspore::kernel::SparseGradient<int> unique_sparse_grad({new_grad.data(), new_indices.data(), in… in SparsePartitioner()
|
/third_party/mindspore/mindspore/nn/optim/ |
D | thor.py | 87 new_grad = C.clip_by_value(grad, F.cast(F.tuple_to_array((-clip_value,)), dt), 90 new_grad = nn.ClipByNorm()(grad, F.cast(F.tuple_to_array((clip_value,)), dt)) 91 return new_grad
|