torch_tensor_from_array Interface

public interface torch_tensor_from_array

Interface for directing torch_tensor_from_array to possible input types and ranks


Module Procedures

public subroutine torch_tensor_from_array_int8_1d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 1 containing data of type int8

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int8), intent(in), target :: data_in(:)

Input data that tensor will point at

integer, intent(in) :: layout(1)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int8_2d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 2 containing data of type int8

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int8), intent(in), target :: data_in(:,:)

Input data that tensor will point at

integer, intent(in) :: layout(2)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int8_3d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 3 containing data of type int8

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int8), intent(in), target :: data_in(:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(3)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int8_4d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 4 containing data of type int8

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int8), intent(in), target :: data_in(:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(4)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int8_5d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 5 containing data of type int8

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int8), intent(in), target :: data_in(:,:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(5)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int16_1d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 1 containing data of type int16

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int16), intent(in), target :: data_in(:)

Input data that tensor will point at

integer, intent(in) :: layout(1)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int16_2d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 2 containing data of type int16

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int16), intent(in), target :: data_in(:,:)

Input data that tensor will point at

integer, intent(in) :: layout(2)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int16_3d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 3 containing data of type int16

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int16), intent(in), target :: data_in(:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(3)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int16_4d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 4 containing data of type int16

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int16), intent(in), target :: data_in(:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(4)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int16_5d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 5 containing data of type int16

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int16), intent(in), target :: data_in(:,:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(5)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int32_1d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 1 containing data of type int32

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int32), intent(in), target :: data_in(:)

Input data that tensor will point at

integer, intent(in) :: layout(1)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int32_2d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 2 containing data of type int32

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int32), intent(in), target :: data_in(:,:)

Input data that tensor will point at

integer, intent(in) :: layout(2)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int32_3d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 3 containing data of type int32

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int32), intent(in), target :: data_in(:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(3)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int32_4d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 4 containing data of type int32

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int32), intent(in), target :: data_in(:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(4)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int32_5d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 5 containing data of type int32

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int32), intent(in), target :: data_in(:,:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(5)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int64_1d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 1 containing data of type int64

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int64), intent(in), target :: data_in(:)

Input data that tensor will point at

integer, intent(in) :: layout(1)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int64_2d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 2 containing data of type int64

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int64), intent(in), target :: data_in(:,:)

Input data that tensor will point at

integer, intent(in) :: layout(2)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int64_3d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 3 containing data of type int64

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int64), intent(in), target :: data_in(:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(3)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int64_4d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 4 containing data of type int64

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int64), intent(in), target :: data_in(:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(4)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_int64_5d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 5 containing data of type int64

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

integer(kind=int64), intent(in), target :: data_in(:,:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(5)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_real32_1d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 1 containing data of type real32

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

real(kind=real32), intent(in), target :: data_in(:)

Input data that tensor will point at

integer, intent(in) :: layout(1)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_real32_2d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 2 containing data of type real32

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

real(kind=real32), intent(in), target :: data_in(:,:)

Input data that tensor will point at

integer, intent(in) :: layout(2)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_real32_3d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 3 containing data of type real32

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

real(kind=real32), intent(in), target :: data_in(:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(3)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_real32_4d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 4 containing data of type real32

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

real(kind=real32), intent(in), target :: data_in(:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(4)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_real32_5d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 5 containing data of type real32

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

real(kind=real32), intent(in), target :: data_in(:,:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(5)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_real64_1d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 1 containing data of type real64

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

real(kind=real64), intent(in), target :: data_in(:)

Input data that tensor will point at

integer, intent(in) :: layout(1)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_real64_2d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 2 containing data of type real64

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

real(kind=real64), intent(in), target :: data_in(:,:)

Input data that tensor will point at

integer, intent(in) :: layout(2)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_real64_3d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 3 containing data of type real64

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

real(kind=real64), intent(in), target :: data_in(:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(3)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_real64_4d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 4 containing data of type real64

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

real(kind=real64), intent(in), target :: data_in(:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(4)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor

public subroutine torch_tensor_from_array_real64_5d(tensor, data_in, layout, c_device_type, device_index, requires_grad)

Return a Torch tensor pointing to data_in array of rank 5 containing data of type real64

Arguments

Type IntentOptional Attributes Name
type(torch_tensor), intent(out) :: tensor

Returned tensor

real(kind=real64), intent(in), target :: data_in(:,:,:,:,:)

Input data that tensor will point at

integer, intent(in) :: layout(5)

Control order of indices

integer(kind=c_int), intent(in) :: c_device_type

Device type the tensor will live on (torch_kCPU or torch_kCUDA)

integer(kind=c_int), intent(in), optional :: device_index

device index to use for torch_kCUDA case

logical, intent(in), optional :: requires_grad

Whether gradients need to be computed for the created tensor