Home
last modified time | relevance | path

Searched full:zeros_like (Results 1 – 25 of 551) sorted by relevance

12345678910>>...23

/aosp_15_r20/external/executorch/kernels/test/
H A Dop_split_copy_test.cpp72 TensorList out = tlf.zeros_like(expected_out); in test_dtype()
159 TensorList out = tlf.zeros_like(expected_out); in TEST_F()
166 TensorList out2 = tlf.zeros_like(expected_out); in TEST_F()
209 TensorList out = tlf.zeros_like(expected_out); in TEST_F()
216 TensorList out2 = tlf.zeros_like(expected_out); in TEST_F()
268 TensorList out = tlf.zeros_like(expected_out); in TEST_F()
275 TensorList out2 = tlf.zeros_like(expected_out); in TEST_F()
292 TensorList out = tlf.zeros_like({input}); in TEST_F()
318 TensorList out = tlf.zeros_like({input}); in TEST_F()
331 TensorList out = tlf.zeros_like({input}); in TEST_F()
[all …]
H A Dop_unbind_copy_test.cpp66 TensorList out = tlf.zeros_like(expected_out); in test_unbind_dim0()
73 TensorList out2 = tlf.zeros_like(expected_out); in test_unbind_dim0()
103 TensorList out = tlf.zeros_like(expected_out); in test_unbind_dim1()
110 TensorList out2 = tlf.zeros_like(expected_out); in test_unbind_dim1()
152 TensorList out = tlf.zeros_like(expected_out); in test_unbind_dim2()
159 TensorList out2 = tlf.zeros_like(expected_out); in test_unbind_dim2()
233 TensorList out = tlf.zeros_like({input}); in TEST_F()
249 TensorList out = tlf.zeros_like(expected_out); in TEST_F()
257 out = tlf.zeros_like(expected_out); in TEST_F()
265 out = tlf.zeros_like(expected_out); in TEST_F()
[all …]
/aosp_15_r20/external/pytorch/test/inductor/
H A Dtest_triton_kernels.py79 output = torch.zeros_like(t1)
97 self.assertNotEqual(output, torch.zeros_like(t1))
100 output = torch.zeros_like(t1)
114 self.assertEqual(output, torch.zeros_like(t1))
242 output = torch.zeros_like(x)
249 output = torch.zeros_like(x)
327 output = torch.zeros_like(x)
356 output = torch.zeros_like(x)
388 o1 = torch.zeros_like(t1, requires_grad=grad)
392 o2 = torch.zeros_like(t1, requires_grad=grad)
[all …]
/aosp_15_r20/external/pytorch/tools/autograd/
H A Dderivatives.yaml161 # (implemented using zeros_like). These gradients are (hopefully) not
365 self: zeros_like(grad)
369 self: zeros_like(grad)
370 p: zeros_like(p)
374 self: zeros_like(grad)
390 self: zeros_like(grad)
394 self: zeros_like(grad)
486 other: zeros_like(other)
619 self: zeros_like(self)
623 self: zeros_like(self)
[all …]
/aosp_15_r20/external/pytorch/test/
H A Dtest_native_mha.py124 q_i[-1] = torch.zeros_like(q[0][-1], device=device, dtype=torch.float32)
129 q[0][-1] = torch.zeros_like(q[0][-1], device=device, dtype=torch.float32)
227 ynpt_final = torch.zeros_like(ypt)
234 t_i[-1] = torch.zeros_like(t_i[-1], device=device, dtype=dtype)
239 ypt[0][-1] = torch.zeros_like(ypt[0][-1], device=device, dtype=dtype)
240 ynpt[0][-1] = torch.zeros_like(ynpt[0][-1], device=device, dtype=dtype)
246 … weight_pt[0][-1] = torch.zeros_like(weight_pt[0][-1], device=device, dtype=dtype)
247 … weight_npt[0][-1] = torch.zeros_like(weight_npt[0][-1], device=device, dtype=dtype)
252 … weight_pt[0][nh][-1] = torch.zeros_like(weight_pt[0][nh][-1], device=device, dtype=dtype)
253 … weight_npt[0][nh][-1] = torch.zeros_like(weight_npt[0][nh][-1], device=device, dtype=dtype)
/aosp_15_r20/external/tensorflow/tensorflow/lite/testing/op_tests/
H A Dzeros_like.py15 """Test configs for zeros_like."""
24 """Make a set of tests to do zeros_like."""
32 """Build the zeros_like op testing graph."""
37 zeros = tf.zeros_like(input_tensor)
39 # constants-propagation through the above zeros_like, which it can't do if
40 # the output of the zeros_like as an output of the whole graphs (graph
43 # zeros_like as a Fill op, which is unsupported by TFLite, even as a custom
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/
H A Dnn_grad.py254 return (array_ops.zeros_like(op.inputs[0]),
255 array_ops.zeros_like(op.inputs[1]),
268 return (array_ops.zeros_like(op.inputs[0]),
269 array_ops.zeros_like(op.inputs[1]),
421 elu_x < 0, grad * op.inputs[0], array_ops.zeros_like(elu_x)))
429 selu_x < 0., grad * op.inputs[0], array_ops.zeros_like(selu_x)))
440 return (gen_nn_ops.relu6_grad(grad, x), array_ops.zeros_like(x))
455 alpha=alpha), array_ops.zeros_like(x))
494 return (gen_nn_ops.relu_grad(grad, x), array_ops.zeros_like(x))
718 return (array_ops.zeros_like(op.inputs[0]),
[all …]
H A Dcontrol_flow_state.py589 """Create zeros_like gradient for a loop exit.
640 result = array_ops.zeros_like(val, optimize=False)
644 """Create zeros_like for the specified output of an op.
660 return array_ops.zeros_like(op.outputs[index])
803 return array_ops.zeros_like(val, optimize=False)
827 return array_ops.zeros_like(val, optimize=False)
831 """Create zeros_like for the specified output of an op."""
H A Dmath_grad.py393 zeros = array_ops.zeros_like(op.inputs[0], dtype=op.inputs[0].dtype)
443 math_ops.greater(num_zeros, 1), array_ops.zeros_like(grad), grad)
471 zero_clipped_indices = math_ops.maximum(ids, array_ops.zeros_like(ids))
488 zero_slice = array_ops.zeros_like(gathered)
507 zeros = array_ops.zeros_like(gathered_grads)
554 math_ops.greater(num_zeros, 1), array_ops.zeros_like(grad), grad)
562 array_ops.zeros_like(op.inputs[1]))
1182 return array_ops.zeros_like(x)
1532 log_x = array_ops.where(mask, math_ops.log(safe_x), array_ops.zeros_like(x))
1545 zeros = array_ops.zeros_like(grad)
[all …]
/aosp_15_r20/external/pytorch/torch/distributed/optim/
H A Dfunctional_adamw.py84 state["exp_avg"] = torch.zeros_like(
88 state["exp_avg_sq"] = torch.zeros_like(
93 state["max_exp_avg_sq"] = torch.zeros_like(
156 state["exp_avg"] = torch.zeros_like(
160 state["exp_avg_sq"] = torch.zeros_like(
165 state["max_exp_avg_sq"] = torch.zeros_like(
H A Dfunctional_adam.py86 state["exp_avg"] = torch.zeros_like(
89 state["exp_avg_sq"] = torch.zeros_like(
93 state["max_exp_avg_sq"] = torch.zeros_like(
155 state["exp_avg"] = torch.zeros_like(
159 state["exp_avg_sq"] = torch.zeros_like(
164 state["max_exp_avg_sq"] = torch.zeros_like(
/aosp_15_r20/external/pytorch/test/ao/sparsity/
H A Dtest_parametrization.py27 self.linear.weight = nn.Parameter(torch.zeros_like(self.linear.weight) + 1.0)
28 self.seq[0].weight = nn.Parameter(torch.zeros_like(self.seq[0].weight) + 2.0)
29 self.seq[1].weight = nn.Parameter(torch.zeros_like(self.seq[1].weight) + 3.0)
31 self.linear = nn.Parameter(torch.zeros_like(self.linear.bias) + 10.0)
32 self.seq[0] = nn.Parameter(torch.zeros_like(self.seq[0].bias) + 20.0)
33 self.seq[0] = nn.Parameter(torch.zeros_like(self.seq[0].bias) + 30.0)
/aosp_15_r20/external/pytorch/test/jit/fixtures_srcs/
H A Dfixtures_src.py55 out = torch.zeros_like(x)
61 out = torch.zeros_like(x)
67 out = torch.zeros_like(x)
73 x = torch.zeros_like(x)
74 out = torch.zeros_like(x)
/aosp_15_r20/external/pytorch/test/jit/
H A Dtest_builtins.py192 a = torch.zeros_like(x, dtype=torch.uint8)
197 a = torch.zeros_like(x, dtype=torch.uint8)
202 a = torch.zeros_like(x, dtype=torch.uint8)
207 a = torch.zeros_like(x, dtype=torch.uint8)
212 a = torch.zeros_like(x, dtype=torch.float32)
222 a = torch.zeros_like(x, dtype=torch.float32, device="cuda")
/aosp_15_r20/external/executorch/backends/vulkan/test/op_tests/
H A Dsdpa_test.cpp229 at::Tensor v_cache = at::zeros_like(k_cache); in test_reference_sdpa()
231 at::Tensor k_cache_ref = at::zeros_like(k_cache); in test_reference_sdpa()
232 at::Tensor v_cache_ref = at::zeros_like(v_cache); in test_reference_sdpa()
301 at::Tensor v_cache = at::zeros_like(k_cache); in test_vulkan_sdpa()
324 at::Tensor k_cache_data = at::zeros_like(k_cache); in test_vulkan_sdpa()
325 at::Tensor v_cache_data = at::zeros_like(v_cache); in test_vulkan_sdpa()
381 at::Tensor vk_##x = at::zeros_like(x).contiguous(); \ in test_vulkan_sdpa()
/aosp_15_r20/external/tensorflow/tensorflow/core/ir/importexport/tests/roundtrip/
H A Dtest23.pbtxt27 name: "zeros_like"
41 input: "zeros_like"
43 input: "zeros_like"
69 s: "Variant storing an int, input and output of zeros_like:"
/aosp_15_r20/external/executorch/runtime/core/exec_aten/testing_util/test/
H A Dtensor_factory_test.cpp783 Tensor actual = tf.zeros_like(input); in run_zeros_like_test()
908 TensorList actual = tlf.zeros_like(templates); in TEST()
938 TensorList actual = tlf.zeros_like(templates); in TEST()
957 TensorList actual = tlf.zeros_like(templates); in TEST()
986 tf.zeros_like(zeros, TensorShapeDynamism::STATIC)); in TEST_F()
988 tf.zeros_like(zeros, TensorShapeDynamism::DYNAMIC_BOUND)); in TEST_F()
990 tf.zeros_like(zeros, TensorShapeDynamism::DYNAMIC_UNBOUND)); in TEST_F()
994 tf.zeros_like(zeros, TensorShapeDynamism::STATIC), in TEST_F()
995 tf.zeros_like(zeros, TensorShapeDynamism::DYNAMIC_BOUND)); in TEST_F()
997 tf.zeros_like(zeros, TensorShapeDynamism::STATIC), in TEST_F()
[all …]
/aosp_15_r20/external/tensorflow/tensorflow/lite/kernels/
H A Dzeros_like.cc27 namespace zeros_like { namespace
73 } // namespace zeros_like
77 zeros_like::Prepare, zeros_like::Eval}; in Register_ZEROS_LIKE()
/aosp_15_r20/external/pytorch/torch/_decomp/
H A Ddecompositions_for_jvp.py181 d_input = torch.zeros_like(input) # should be None but doesn't work with vjp
191 d_weight = torch.zeros_like(weight) # should be None but doesn't work with vjp
201 d_bias = torch.zeros_like(bias) # should be None but doesn't work with vjp
281 grad_weight = torch.zeros_like(
290 grad_bias = torch.zeros_like(
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/structured/
H A Dstructured_array_ops.py231 @dispatch.dispatch_for_types(array_ops.zeros_like, StructuredTensor)
232 def zeros_like(tensor, dtype=None, name=None, optimize=True): function
233 """Implementation of zeros_like for StructuredTensor for TF v1."""
245 >>> tf.zeros_like(st)
248 >>> tf.zeros_like(st, dtype=tf.int32)
260 with ops.name_scope(name, 'zeros_like', [input]) as name:
278 """Implementation of zeros_like for StructuredTensor for TF v1."""
/aosp_15_r20/external/pytorch/aten/src/ATen/native/
H A DConvolutionTBC.cpp13 #include <ATen/ops/zeros_like.h>
84 Tensor dInput = at::zeros_like(input, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in conv_tbc_backward()
98 Tensor dWeight = at::zeros_like(weight, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in conv_tbc_backward()
113 Tensor dBias = at::zeros_like(bias, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in conv_tbc_backward()
H A DLoss.cpp58 #include <ATen/ops/zeros_like.h>
173 auto zeros = at::zeros_like(cos, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in cosine_embedding_loss()
183 auto zeros = at::zeros_like(self, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in hinge_embedding_loss()
457 auto grad_input = at::zeros_like(input, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in smooth_l1_loss_backward()
482 auto grad_input = at::zeros_like(input, MemoryFormat::Contiguous); in huber_loss_backward()
499 Tensor grad_input = at::zeros_like(input, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in mse_loss_backward()
/aosp_15_r20/external/pytorch/torch/distributed/algorithms/ddp_comm_hooks/
H A Dquantization_hooks.py28 x = torch.zeros_like(y, device=y.device)
36 torch.zeros_like(
106 aggregated_dequantized_tensor = torch.zeros_like(
201 aggregated_dequantized_tensor = torch.zeros_like(
/aosp_15_r20/external/tensorflow/tensorflow/python/kernel_tests/array_ops/
H A Dconstant_op_test.py506 z_var = array_ops.zeros_like(d)
545 z = array_ops.zeros_like(d)
550 # Make sure zeros_like works even for dtypes that cannot be cast between
557 y = array_ops.zeros_like(x, dtype=out_type).eval()
579 zeros_like = array_ops.zeros_like(const_variant)
581 zeros_like, [const_variant, zeros_like],
582 message="Variant storing an int, input and output of zeros_like:").op
/aosp_15_r20/external/pytorch/torch/distributed/tensor/
H A D_tp_conv.py44 recv_from_right = torch.zeros_like(send_to_left)
45 recv_from_left = torch.zeros_like(send_to_right)
72 recv_from_right = torch.zeros_like(send_to_left)
73 recv_from_left = torch.zeros_like(send_to_right)

12345678910>>...23