1 #pragma once 2 #include <ATen/core/TensorBase.h> 3 4 namespace at::detail { 5 6 TORCH_CUDA_CPP_API TensorBase empty_cuda( 7 IntArrayRef size, 8 ScalarType dtype, 9 std::optional<Device> device_opt, 10 std::optional<c10::MemoryFormat> memory_format_opt); 11 12 TORCH_CUDA_CPP_API TensorBase empty_cuda( 13 IntArrayRef size, 14 std::optional<ScalarType> dtype_opt, 15 std::optional<Layout> layout_opt, 16 std::optional<Device> device_opt, 17 std::optional<bool> pin_memory_opt, 18 std::optional<c10::MemoryFormat> memory_format_opt); 19 20 TORCH_CUDA_CPP_API TensorBase empty_cuda( 21 IntArrayRef size, 22 const TensorOptions &options); 23 24 TORCH_CUDA_CPP_API TensorBase empty_strided_cuda( 25 IntArrayRef size, 26 IntArrayRef stride, 27 ScalarType dtype, 28 std::optional<Device> device_opt); 29 30 TORCH_CUDA_CPP_API TensorBase empty_strided_cuda( 31 IntArrayRef size, 32 IntArrayRef stride, 33 std::optional<ScalarType> dtype_opt, 34 std::optional<Layout> layout_opt, 35 std::optional<Device> device_opt, 36 std::optional<bool> pin_memory_opt); 37 38 TORCH_CUDA_CPP_API TensorBase empty_strided_cuda( 39 IntArrayRef size, 40 IntArrayRef stride, 41 const TensorOptions &options); 42 43 44 } // namespace at::detail 45