Home
last modified time | relevance | path

Searched full:empty_like (Results 1 – 25 of 329) sorted by relevance

12345678910>>...14

/external/pytorch/aten/src/ATen/native/vulkan/ops/
DClone.cpp7 #include <ATen/ops/empty_like.h>
29 // Copy all strides, this is marginally faster than calling empty_like in clone()
32 self = at::empty_like(src); in clone()
35 self = at::empty_like(src, src.options(), memory_format); in clone()
/external/pytorch/aten/src/ATen/test/
Dcpu_rng_test.cpp211 auto expected = torch::empty_like(actual); in TEST_F()
225 auto expected = torch::empty_like(actual); in TEST_F()
239 auto expected = torch::empty_like(actual); in TEST_F()
253 auto expected = torch::empty_like(actual); in TEST_F()
266 auto expected = torch::empty_like(actual); in TEST_F()
279 auto expected = torch::empty_like(actual); in TEST_F()
292 auto expected = torch::empty_like(actual); in TEST_F()
308 auto expected = torch::empty_like(actual); in TEST_F()
325 auto expected = torch::empty_like(actual); in TEST_F()
342 auto expected = torch::empty_like(actual); in TEST_F()
[all …]
/external/pytorch/aten/src/ATen/
DTensorOperators.h9 #include <ATen/ops/empty_like.h>
19 ::at::empty_like(y, at::MemoryFormat::Preserve).fill_(x).sub_(y)) \
22 ::at::empty_like(y, at::MemoryFormat::Preserve).fill_(x).div_(y)) \
25 ::at::empty_like(y, at::MemoryFormat::Preserve).fill_(x).remainder_(y)) \
/external/pytorch/aten/src/ATen/native/quantized/
DFakeQuantPerTensorAffine.cpp83 auto Y = at::empty_like(self, self.options(), MemoryFormat::Preserve); in fake_quantize_per_tensor_affine_cachemask()
84 auto mask = at::empty_like(self, at::kBool, MemoryFormat::Preserve); in fake_quantize_per_tensor_affine_cachemask()
103 auto Y = at::empty_like(self, self.options(), MemoryFormat::Preserve); in _fake_quantize_per_tensor_affine_cachemask_tensor_qparams()
104 auto mask = at::empty_like(self, at::kBool, MemoryFormat::Preserve); in _fake_quantize_per_tensor_affine_cachemask_tensor_qparams()
207 auto dX = at::empty_like(X, X.options(), MemoryFormat::Preserve); in _fake_quantize_learnable_per_tensor_affine_backward()
208 auto dScale_vec = at::empty_like(X, X.options(), MemoryFormat::Preserve); in _fake_quantize_learnable_per_tensor_affine_backward()
209 auto dZeroPoint_vec = at::empty_like(X, X.options(), MemoryFormat::Preserve); in _fake_quantize_learnable_per_tensor_affine_backward()
DFakeQuantPerChannelAffine.cpp79 auto Y = at::empty_like(self, self.options(), MemoryFormat::Preserve); in fake_quantize_per_channel_affine_cachemask()
80 auto mask = at::empty_like(self, at::kBool, MemoryFormat::Preserve); in fake_quantize_per_channel_affine_cachemask()
214 auto dX = at::empty_like(X, X.options(), MemoryFormat::Preserve); in _fake_quantize_learnable_per_channel_affine_backward()
215 auto dScale_vec = at::empty_like(X, X.options(), MemoryFormat::Preserve); in _fake_quantize_learnable_per_channel_affine_backward()
216 auto dZeroPoint_vec = at::empty_like(X, X.options(), MemoryFormat::Preserve); in _fake_quantize_learnable_per_channel_affine_backward()
/external/pytorch/aten/src/ATen/native/
Dlayer_norm.cpp15 #include <ATen/ops/empty_like.h>
97 Tensor Y = at::native::empty_like( in layer_norm_cpu()
140 dX = at::native::empty_like( in layer_norm_backward_cpu()
149 dgamma = M > 0 ? at::native::empty_like( in layer_norm_backward_cpu()
165 dbeta = M > 0 ? at::native::empty_like( in layer_norm_backward_cpu()
230 at::empty_like(input), in math_native_layer_norm()
231 at::empty_like(input, c10::TensorOptions().dtype(result_type)), in math_native_layer_norm()
232 at::empty_like(input, c10::TensorOptions().dtype(result_type)) in math_native_layer_norm()
DDropout.cpp13 #include <ATen/ops/empty_like.h>
73 auto noise = feature_dropout ? make_feature_noise(input) : at::empty_like(input); in _dropout_impl()
107 return std::make_tuple(input, at::empty_like(input, input.options())); in native_dropout_cpu()
117 mask = at::empty_like(input, input.options().dtype(c10::CppTypeToScalarType<bool>::value)); in native_dropout_cpu()
DActivation.cpp34 #include <ATen/ops/empty_like.h>
434 Tensor result = at::empty_like(self); in hardtanh()
637 auto output = at::empty_like(self, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in rrelu_with_noise_cpu()
673 …return at::rrelu_with_noise(self, at::empty_like(self, LEGACY_CONTIGUOUS_MEMORY_FORMAT), lower, up… in rrelu()
678 …return at::rrelu_with_noise_(self, at::empty_like(self, LEGACY_CONTIGUOUS_MEMORY_FORMAT), lower, u… in rrelu_()
724 auto result = at::empty_like(self); in _prelu_kernel()
758 auto result = at::empty_like(input, at::MemoryFormat::Contiguous); in log_sigmoid_forward_cpu()
759 auto buffer = at::empty_like(input, at::MemoryFormat::Contiguous); in log_sigmoid_forward_cpu()
768 …Tensor result_tmp = result.is_contiguous() ? result : at::empty_like(result, at::MemoryFormat::Con… in log_sigmoid_forward_out_cpu()
786 auto grad_input = at::empty_like(grad_output); in log_sigmoid_backward_cuda()
[all …]
DRepeat.h10 #include <ATen/ops/empty_like.h>
27 return at::empty_like(repeats, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in repeat_interleave_common()
DTestOps.cpp23 #include <ATen/ops/empty_like.h>
39 Tensor output = at::empty_like(values); in _test_optional_intlist()
57 Tensor output = at::empty_like(values); in _test_optional_floatlist()
Dgroup_norm.cpp90 Tensor Y = at::native::empty_like( in native_group_norm()
134 dX = at::native::empty_like( in native_group_norm_backward()
143 dgamma = at::native::empty_like( in native_group_norm_backward()
152 dbeta = at::native::empty_like( in native_group_norm_backward()
/external/pytorch/torch/_library/
Dtriton.py73 >>> output = torch.empty_like(x)
198 >>> output = torch.empty_like(x)
212 >>> # empty_like = torch.ops.aten.empty_like.default(x_1, pin_memory = False)
216 >>> # 'in_ptr0': x_1, 'in_ptr1': y_1, 'out_ptr': empty_like,
219 >>> # return empty_like
/external/pytorch/aten/src/ATen/native/quantized/cpu/
DNormalization.cpp13 #include <ATen/ops/empty_like.h>
89 Tensor alpha = at::empty_like(mean, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in q_batch_norm1d_impl()
90 Tensor beta = at::empty_like(mean, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in q_batch_norm1d_impl()
198 Tensor alpha = at::empty_like(mean, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in q_batch_norm2d_impl()
199 Tensor beta = at::empty_like(mean, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in q_batch_norm2d_impl()
294 Tensor alpha = at::empty_like(mean, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in q_batch_norm3d_impl()
295 Tensor beta = at::empty_like(mean, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in q_batch_norm3d_impl()
/external/pytorch/aten/src/ATen/native/cuda/
DGridSampler.cpp9 #include <ATen/ops/empty_like.h>
56 auto grad_grid = at::empty_like(grid, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in grid_sampler_2d_backward_cuda()
75 auto grad_grid = at::empty_like(grid, LEGACY_CONTIGUOUS_MEMORY_FORMAT); in grid_sampler_3d_backward_cuda()
DTensorTopK.cpp15 #include <ATen/ops/empty_like.h>
87 Tensor sortedIndices = at::empty_like(indices); in TORCH_IMPL_FUNC()
88 Tensor sortedValues = at::empty_like(values); in TORCH_IMPL_FUNC()
DRangeFactories.cu16 #include <ATen/ops/empty_like.h>
79 Tensor r = !is_contiguous ? at::empty_like(result, LEGACY_CONTIGUOUS_MEMORY_FORMAT) : result; in linspace_cuda_out()
130 Tensor r = !is_contiguous ? at::empty_like(result, LEGACY_CONTIGUOUS_MEMORY_FORMAT) : result; in logspace_cuda_out()
196 Tensor r = !is_contiguous ? at::empty_like(result, LEGACY_CONTIGUOUS_MEMORY_FORMAT) : result; in range_cuda_out()
258 Tensor r = !is_contiguous ? at::empty_like(result, LEGACY_CONTIGUOUS_MEMORY_FORMAT) : result; in arange_cuda_out()
DRandperm.cu15 #include <ATen/ops/empty_like.h>
95 auto keys_tmp = at::empty_like(keys); in randperm_out_cuda()
111 auto keys_tmp = at::empty_like(keys); in randperm_out_cuda()
/external/pytorch/test/custom_operator/
Dpointwise.py13 return torch.empty_like(x)
19 return torch.empty_like(x)
/external/pytorch/test/inductor/
Dtest_inplacing_pass.py140 out = torch.empty_like(x)
159 out = torch.empty_like(x)
315 out1 = torch.empty_like(x)
316 out2 = torch.empty_like(x)
346 out = torch.empty_like(x)
415 subtest(torch.empty_like, name="empty_like"),
/external/pytorch/aten/src/ATen/native/mps/operations/
DWeightNorm.mm40 auto w = at::empty_like(v, LEGACY_CONTIGUOUS_MEMORY_FORMAT);
41 auto norms = at::empty_like(g, LEGACY_CONTIGUOUS_MEMORY_FORMAT);
101 auto grad_v = at::empty_like(saved_v, LEGACY_CONTIGUOUS_MEMORY_FORMAT);
102 auto grad_g = at::empty_like(saved_g, LEGACY_CONTIGUOUS_MEMORY_FORMAT);
/external/pytorch/test/torch_np/
Dtest_basic.py27 w.empty_like,
173 w.empty_like,
477 out = (w.empty_like(x1), w.empty_like(x1))
492 out = (w.empty_like(x1), w.empty_like(x1))
504 out1, out2 = w.empty_like(x1), w.empty_like(x1)
/external/pytorch/test/distributed/_composable/fsdp/
Dtest_fully_shard_overlap.py83 dummy_ag_output = torch.empty_like(lin.weight)
105 dummy_ag_output = torch.empty_like(lin.weight)
114 dummy_ag_output = torch.empty_like(lin.weight)
122 dummy_rs_input = torch.empty_like(lin.weight)
/external/pytorch/test/distributed/
Dtest_multi_threaded_pg.py45 torch.empty_like(input_tensor) for _ in range(dist.get_world_size())
62 torch.empty_like(input_tensor) for _ in range(dist.get_world_size())
79 torch.empty_like(input_tensor) for _ in range(dist.get_world_size())
153 torch.empty_like(input_tensor) for _ in range(self.world_size)
210 output_tensor_list = [torch.empty_like(tensor) for tensor in input_tensor_list]
/external/pytorch/test/distributed/fsdp/
Dtest_fsdp_apply.py56 fsdp, lambda param: torch.empty_like(param).fill_(1.0), self.assertNotEqual
63 fsdp, lambda param: torch.empty_like(param).fill_(1.0), self.assertEqual
/external/executorch/extension/llm/custom_ops/
Dsdpa_with_kv_cache.py133 return torch.empty_like(query)
141 return torch.empty_like(mat)
170 return torch.empty_like(query)

12345678910>>...14