Skip to content

Commit

Permalink
test: update examples to use FT_INT
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMelt committed Sep 13, 2024
1 parent 9b44d95 commit 36cad91
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/1_SimpleNet/simplenet_infer_fortran.f90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ program inference
! Set up Fortran data structures
real(wp), dimension(5), target :: in_data
real(wp), dimension(5), target :: out_data
integer(int64) :: tensor_layout(1) = [1]
integer(FT_INT) :: tensor_layout(1) = [1]

! Set up Torch data structures
! The net, a vector of input tensors (in this case we only have one), and the output tensor
Expand Down
4 changes: 2 additions & 2 deletions examples/2_ResNet18/resnet_infer_fortran.f90
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ subroutine main()

integer, parameter :: in_dims = 4
integer :: in_shape(in_dims) = [1, 3, 224, 224]
integer :: in_layout(in_dims) = [1, 2, 3, 4]
integer(FT_INT) :: in_layout(in_dims) = [1, 2, 3, 4]
integer, parameter :: out_dims = 2
integer :: out_shape(out_dims) = [1, 1000]
integer :: out_layout(out_dims) = [1, 2]
integer(FT_INT) :: out_layout(out_dims) = [1, 2]

! Path to input data
character(len=100) :: data_dir
Expand Down
2 changes: 1 addition & 1 deletion examples/4_MultiIO/multiionet_infer_fortran.f90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ program inference
real(wp), dimension(4), target :: in_data2
real(wp), dimension(4), target :: out_data1
real(wp), dimension(4), target :: out_data2
integer :: tensor_layout(1) = [1]
integer(FT_INT) :: tensor_layout(1) = [1]

! Set up Torch data structures
! The net, a vector of input tensors (in this case we only have one), and the output tensor
Expand Down

0 comments on commit 36cad91

Please sign in to comment.