Home
last modified time | relevance | path

Searched refs:TensorOptions (Results 1 – 25 of 224) sorted by relevance

123456789

/external/pytorch/c10/core/
DTensorOptions.h139 struct C10_API TensorOptions { struct
140 TensorOptions() in TensorOptions() function
151 /* implicit */ TensorOptions(Layout layout) : TensorOptions() { in TensorOptions() function
160 /* implicit */ TensorOptions(T&& device) : TensorOptions() { in TensorOptions() function
175 /* implicit */ TensorOptions(Args&&... args) in TensorOptions() argument
176 : TensorOptions(Device(std::forward<Args>(args)...)) {} in TensorOptions()
179 /* implicit */ TensorOptions(caffe2::TypeMeta dtype) : TensorOptions() { in TensorOptions() argument
184 /* implicit */ TensorOptions(ScalarType dtype) : TensorOptions() { in TensorOptions() argument
189 /* implicit */ TensorOptions(MemoryFormat memory_format) : TensorOptions() { in TensorOptions() argument
195 C10_NODISCARD TensorOptions
[all …]
/external/pytorch/test/cpp/lazy/
Dtest_lazy_ops.cpp88 1., torch::TensorOptions(torch::kFloat).device(DefaultDevice())); in TEST_F()
91 1., torch::TensorOptions(torch::kFloat).device(torch::kLazy)); in TEST_F()
99 {2, 2}, torch::TensorOptions(torch::kFloat).device(DefaultDevice())); in TEST_F()
111 {2, 2}, torch::TensorOptions(torch::kFloat).device(DefaultDevice())); in TEST_F()
120 {2, 2}, torch::TensorOptions(torch::kFloat).device(DefaultDevice())); in TEST_F()
131 {2, 2}, torch::TensorOptions(torch::kFloat).device(DefaultDevice())); in TEST_F()
142 {2, 2}, torch::TensorOptions(torch::kFloat).device(DefaultDevice())) * in TEST_F()
155 {2, 2}, torch::TensorOptions(torch::kFloat).device(DefaultDevice())) * in TEST_F()
168 {2, 2}, torch::TensorOptions(torch::kFloat).device(DefaultDevice())) * in TEST_F()
181 {2, 2}, torch::TensorOptions(torch::kFloat).device(DefaultDevice())) * in TEST_F()
[all …]
/external/pytorch/test/mobile/lightweight_dispatch/
Dtest_codegen_unboxing.cpp93 at::Tensor expected = at::empty({1, 2}, c10::TensorOptions(c10::ScalarType::Float)); in TEST()
114 …at::Tensor expected_1 = at::tensor({-1.5, -0.75, 3.75, 7.5}, c10::TensorOptions(c10::ScalarType::F… in TEST()
118 …at::Tensor expected_2 = at::tensor({-3.0, -1.5, 7.5, 15.0}, c10::TensorOptions(c10::ScalarType::Fl… in TEST()
130 at::Tensor expected_1 = at::ones({1, 2, 6}, c10::TensorOptions(c10::ScalarType::Float)); in TEST()
143 const auto result_1 = bc.forward({at::tensor({1}, c10::TensorOptions(c10::ScalarType::Long))}); in TEST()
145 at::Tensor expected_1 = at::tensor({1.}, c10::TensorOptions(c10::ScalarType::Float)); in TEST()
170 …const auto result_1 = bc.forward({at::tensor({1, 2, 3}, c10::TensorOptions(c10::ScalarType::Long))… in TEST()
172 at::Tensor expected_1 = at::tensor({2, 3, 4}, c10::TensorOptions(c10::ScalarType::Long)); in TEST()
187 const auto result_1 = bc.forward({at::tensor({-12}, c10::TensorOptions(c10::ScalarType::Long))}); in TEST()
189 at::Tensor expected_1 = at::tensor({-4}, c10::TensorOptions(c10::ScalarType::Long)); in TEST()
[all …]
/external/pytorch/tools/autograd/templates/
Dvariable_factories.h45 inline at::Tensor tensor(detail::TensorDataContainer tensor_data_container, const at::TensorOptions
71 const at::TensorOptions& options = at::TensorOptions()) {
89 const at::TensorOptions& options = at::TensorOptions()) {
108 const at::TensorOptions& options = at::TensorOptions()) {
124 const at::TensorOptions& options = at::TensorOptions()) {
/external/pytorch/aten/src/ATen/native/metal/mpscnn/tests/
DMPSCNNTests.mm138 auto x1 = at::rand(size, at::TensorOptions(at::kCPU).dtype(at::kFloat));
151 auto t1 = at::rand(size, at::TensorOptions(at::kCPU).dtype(at::kFloat));
179 {N, C, IH, IW}, at::TensorOptions(at::kCPU).dtype(at::kFloat));
181 {OC, IC, KH, KW}, at::TensorOptions(at::kCPU).dtype(at::kFloat));
182 auto B = at::rand({OC}, at::TensorOptions(at::kCPU).dtype(at::kFloat));
210 auto X = at::rand(x, at::TensorOptions(at::kCPU).dtype(at::kFloat));
211 auto W = at::rand(w, at::TensorOptions(at::kCPU).dtype(at::kFloat));
212 auto B = at::rand(b, at::TensorOptions(at::kCPU).dtype(at::kFloat));
228 auto X = at::rand(size, at::TensorOptions(at::kCPU).dtype(at::kFloat));
239 auto X = at::rand(size, at::TensorOptions(at::kCPU).dtype(at::kFloat));
[all …]
/external/pytorch/test/cpp/api/
Dtensor_cuda.cpp40 tensor = tensor.to(at::TensorOptions({at::kCUDA, 1})); in TEST()
43 tensor = tensor.to(at::TensorOptions({at::kCUDA, 0})); in TEST()
46 tensor = tensor.to(at::TensorOptions(at::kDouble)); in TEST()
49 tensor = tensor.to(at::TensorOptions({at::kCUDA, 1})); in TEST()
52 tensor = tensor.to(at::TensorOptions(at::kInt)); in TEST()
55 tensor = tensor.to(at::TensorOptions(at::Device(at::kCPU))); in TEST()
58 tensor = tensor.to(at::TensorOptions(at::kCUDA)); in TEST()
70 other = at::empty({3, 4}, at::TensorOptions(at::kCUDA).dtype(at::kDouble)); in TEST()
76 other = at::empty({3, 4}, at::TensorOptions({at::kCUDA, 1}).dtype(at::kLong)); in TEST()
87 {3, 4}, at::TensorOptions(at::kFloat).device(at::Device("cuda"))); in TEST()
[all …]
Dtensor_options.cpp27 TensorOptions options; in TEST()
49 TensorOptions options; in TEST()
52 options = TensorOptions({kCPU, 0}); in TEST()
55 options = TensorOptions("cpu:0"); in TEST()
58 options = TensorOptions(kInt); in TEST()
62 TensorOptions(getDeprecatedTypeProperties(Backend::SparseCPU, kFloat)); in TEST()
66 TensorOptions(getDeprecatedTypeProperties(Backend::SparseCPU, kByte)); in TEST()
141 TensorOptions options; in TEST()
/external/pytorch/test/cpp/tensorexpr/
Dtest_kernel.cpp119 auto a = at::rand({8, 8}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
120 auto b = at::rand({8, 8}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
121 auto o = at::zeros({8, 8}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
156 auto a = at::rand({5, 3}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
157 auto b = at::rand({5, 3}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
158 auto o = at::zeros({5, 3}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
193 auto a = at::rand({5, 3}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
195 at::rand({3, 5}, TensorOptions(kCPU).dtype(at::kFloat)).transpose(0, 1); in TEST_F()
196 auto o = at::zeros({5, 3}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
231 auto a = at::rand({5, 3}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
[all …]
Dtest_dynamic_shapes.cpp70 auto a = at::rand({10, 5}, at::TensorOptions(at::kCPU).dtype(at::kFloat)); in TEST()
84 auto a = at::rand({50, 100}, at::TensorOptions(at::kCPU).dtype(at::kFloat)); in TEST()
155 auto a = at::rand({10, 5}, at::TensorOptions(at::kCPU).dtype(at::kFloat)); in TEST()
156 auto b = at::rand({10, 5}, at::TensorOptions(at::kCPU).dtype(at::kFloat)); in TEST()
170 auto a = at::rand({50, 100}, at::TensorOptions(at::kCPU).dtype(at::kFloat)); in TEST()
171 auto b = at::rand({50, 100}, at::TensorOptions(at::kCPU).dtype(at::kFloat)); in TEST()
246 auto a = at::rand({10, 5}, at::TensorOptions(at::kCPU).dtype(at::kFloat)); in TEST()
247 auto b = at::rand({1, 5}, at::TensorOptions(at::kCPU).dtype(at::kFloat)); in TEST()
261 auto a = at::rand({50, 100}, at::TensorOptions(at::kCPU).dtype(at::kFloat)); in TEST()
262 auto b = at::rand({1, 100}, at::TensorOptions(at::kCPU).dtype(at::kFloat)); in TEST()
[all …]
Dtest_quantization.cpp44 auto x = at::rand({2, 2}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
74 auto x = 2 * at::rand({2, 2}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
104 auto x = 2 * at::rand({1, 2, 2}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
155 auto x1 = at::rand({2, 2}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
156 auto x2 = at::rand({2, 2}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
198 auto x1 = at::rand({2, 2}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
199 auto x2 = at::rand({2, 2}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
237 auto x1 = at::rand({2, 2}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
290 auto x1 = at::rand({2, 2}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
291 auto x2 = at::rand({2, 2}, TensorOptions(kCPU).dtype(at::kFloat)); in TEST_F()
[all …]
/external/pytorch/aten/src/ATen/native/
DTensorFactories.cpp109 const TensorOptions& options, in window_function_checks()
161TensorOptions options = TensorOptions().dtype(dtype).layout(layout).device(device).pinned_memory(p… in arange()
220 c10::TensorOptions options = real.options(); in complex()
240 c10::TensorOptions options = abs.options(); in polar()
266TensorOptions options = TensorOptions().dtype(dtype).layout(layout).device(device).pinned_memory(p… in empty_names()
378TensorOptions options_ = TensorOptions().dtype(dtype).layout(layout).device(device).pinned_memory(… in AT_FORALL_SCALAR_TYPES_AND3()
380 TensorOptions options = in AT_FORALL_SCALAR_TYPES_AND3()
431TensorOptions options_ = TensorOptions().dtype(dtype).layout(layout).device(device).pinned_memory(… in empty_like_quantized()
438 TensorOptions options = in empty_like_quantized()
525TensorOptions options = TensorOptions().dtype(dtype).layout(layout).device(device).pinned_memory(p… in new_empty_strided_symint()
[all …]
/external/pytorch/aten/src/ATen/native/quantized/
DTensorFactories.cpp25TensorOptions options_ = TensorOptions().dtype(dtype).layout(layout).device(device).pinned_memory(… in empty_affine_quantized()
53TensorOptions options_ = TensorOptions().dtype(dtype).layout(layout).device(device).pinned_memory(… in empty_per_channel_affine_quantized()
79TensorOptions options_ = TensorOptions().dtype(dtype).layout(layout).device(device).pinned_memory(… in empty_unknown_quantized()
141 TensorOptions specified_options = in empty_quantized()
142 TensorOptions().dtype(dtype).layout(layout).device(device).pinned_memory(pin_memory); in empty_quantized()
149 TensorOptions options = qtensor.options() in empty_quantized()
/external/pytorch/aten/src/ATen/
DUtils.cpp22 Tensor tensor_cpu(ArrayRef<T> values, const TensorOptions& options) { in tensor_cpu()
33 Tensor tensor_backend(ArrayRef<T> values, const TensorOptions& options) { in tensor_backend()
39 Tensor tensor_complex_cpu(ArrayRef<T> values, const TensorOptions& options) { in tensor_complex_cpu()
52 const TensorOptions& options) { in tensor_complex_backend()
59 Tensor tensor(ArrayRef<T> values, const TensorOptions& options) { \
70 Tensor tensor(ArrayRef<T> values, const TensorOptions& options) { \
DUtils.h119 TORCH_API Tensor tensor_cpu(ArrayRef<T> values, const TensorOptions& options);
123 tensor_backend(ArrayRef<T> values, const TensorOptions& options);
127 tensor_complex_cpu(ArrayRef<T> values, const TensorOptions& options);
131 tensor_complex_backend(ArrayRef<T> values, const TensorOptions& options);
DEmptyTensor.h89 TORCH_API TensorBase empty_cpu(IntArrayRef size, const TensorOptions& options);
108 const TensorOptions& options);
131 TORCH_API TensorBase empty_meta(IntArrayRef size, const TensorOptions& options);
147 const TensorOptions& options);
164 const TensorOptions& options);
DInitialTensorOptions.h10 inline TensorOptions initialTensorOptions() { in initialTensorOptions()
11 return TensorOptions(kCPU).dtype(kFloat).layout(kStrided).requires_grad( in initialTensorOptions()
/external/pytorch/aten/src/ATen/ops/
Dfrom_blob.h59 TensorMaker& options(TensorOptions value) noexcept { in options()
98 TensorOptions opts_{};
112 const TensorOptions& options = {},
128 const TensorOptions& options = {},
143 const TensorOptions& options = {},
156 const TensorOptions& options = {}) {
163 const TensorOptions& options = {}) {
Dtensor.h9 TORCH_API Tensor tensor(ArrayRef<T> values, const TensorOptions& options); \
11 std::initializer_list<T> values, const TensorOptions& options) { \
14 inline Tensor tensor(T value, const TensorOptions& options) { \
/external/pytorch/aten/src/ATen/test/
Dnative_test.cpp26 void TestSplit(TensorOptions T, Tensor& t) { in TestSplit()
36 void TestChunk(TensorOptions T, Tensor& t) { in TestChunk()
71 void TestStack(TensorOptions T, Tensor& t) { in TestStack()
107 void TestSize(TensorOptions T, Tensor& t) { in TestSize()
129 void TestMatmul(TensorOptions T, Tensor& t, TensorOptions AccT) { in TestMatmul()
205 void TestStandardGammaGrad(TensorOptions T, Tensor& t) { in TestStandardGammaGrad()
225 void TestWhere(TensorOptions T, Tensor& t) { in TestWhere()
244 void test(TensorOptions T, TensorOptions AccT) { in test()
Dxpu_caching_host_allocator_test.cpp20 at::empty({N}, at::TensorOptions().dtype(at::kByte).pinned_memory(true)); in TEST()
120 at::empty({N}, at::TensorOptions().dtype(at::kByte).pinned_memory(false)); in TEST()
137 {N}, at::TensorOptions().dtype(at::kByte).pinned_memory(true)); in TEST()
146 {N}, at::TensorOptions().dtype(at::kByte).pinned_memory(true)); in TEST()
164 {N}, at::TensorOptions().dtype(at::kByte).pinned_memory(true)); in TEST()
171 {N}, at::TensorOptions().dtype(at::kByte).pinned_memory(true)); in TEST()
Dcuda_distributions_test.cu52 auto self = at::empty({4}, at::TensorOptions(at::kCUDA)); in assert_with_expected_uniforms()
85 at::empty({4}, at::TensorOptions(at::kCUDA)).uniform_(); in TEST()
127 at::empty({numel}, at::TensorOptions(at::kCUDA)).uniform_(); in TEST()
148 at::ones({4}, at::TensorOptions(at::kCUDA)).multinomial(4); in TEST()
Dcuda_caching_host_allocator_test.cpp19 at::empty({N}, at::TensorOptions().dtype(at::kByte).pinned_memory(true)); in TEST()
118 at::empty({N}, at::TensorOptions().dtype(at::kByte).pinned_memory(false)); in TEST()
135 {N}, at::TensorOptions().dtype(at::kByte).pinned_memory(true)); in TEST()
156 {N}, at::TensorOptions().dtype(at::kByte).pinned_memory(true)); in TEST()
163 {N}, at::TensorOptions().dtype(at::kByte).pinned_memory(true)); in TEST()
/external/pytorch/docs/cpp/source/notes/
Dtensor_creation.rst26 4. ``<tensor-options>`` is an instance of ``TensorOptions`` and configures the data type, device, l…
124 the very last argument to every factory function: a ``TensorOptions`` object,
127 ``TensorOptions`` is a class that encapsulates the construction axes of a
154 An instance of ``TensorOptions`` stores a concrete value for each of these
155 axes. Here is an example of creating a ``TensorOptions`` object that represents
162 torch::TensorOptions()
169 Notice how we use the '"builder"-style methods of ``TensorOptions`` to
194 ``TensorOptions`` object will take on its default value. For example, this is
195 our previous ``TensorOptions`` object, but with the ``dtype`` and ``layout``
200 auto options = torch::TensorOptions().device(torch::kCUDA, 1).requires_grad(true);
[all …]
/external/pytorch/aten/src/ATen/core/
DDeprecatedTypeProperties.h102 TensorOptions options(int16_t device_index = -1) const {
103 return TensorOptions().dtype(typeMeta())
110 TensorOptions options(std::optional<Device> device_opt) const { in options()
120 operator TensorOptions() const { in TensorOptions() function
/external/pytorch/aten/src/ATen/benchmarks/
Dquantize_per_channel.cpp15 0, 10, {channels}, at::TensorOptions().dtype(at::ScalarType::Int)); in quantize_per_channel_4d_contiguous()
32 at::TensorOptions().memory_format(at::MemoryFormat::ChannelsLast)); in quantize_per_channel_4d_channels_last()
35 0, 10, {channels}, at::TensorOptions().dtype(at::ScalarType::Int)); in quantize_per_channel_4d_channels_last()
51 0, 10, {channels}, at::TensorOptions().dtype(at::ScalarType::Int)); in quantize_per_channel_2d()

123456789