Skip to content

Commit

Permalink
add temporary fix to example 1
Browse files Browse the repository at this point in the history
I am debugging issue with windows user. I noticed the latest version of
ifx/ifort builds with a different integer type which leads to error:

```
error #6284: There is no matching specific function for this generic function reference.   [TORCH_TENSOR_FROM_ARRAY]
   in_tensors(1) = torch_tensor_from_array(in_data, tensor_layout, torch_kCPU)
-------------------^
```

This can be removed by forcing the integer type to int64
  • Loading branch information
TomMelt committed Jun 19, 2024
1 parent 5faf51c commit e9db293
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/1_SimpleNet/simplenet_infer_fortran.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
program inference

! Import precision info from iso
use, intrinsic :: iso_fortran_env, only : sp => real32
use, intrinsic :: iso_fortran_env, only : sp => real32, int64

! Import our library for interfacing with PyTorch
use ftorch
Expand All @@ -18,7 +18,7 @@ program inference
real(wp), dimension(5), target :: in_data
real(wp), dimension(5), target :: out_data
integer, parameter :: n_inputs = 1
integer :: tensor_layout(1) = [1]
integer(int64) :: 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 e9db293

Please sign in to comment.