@@ -88,19 +88,19 @@ program concurrent_inferences
88
88
neural_network = neural_network_t(double_precision_file_t(network_file_name))
89
89
90
90
print * ," Defining an array of tensor_t input objects with random normalized components"
91
- allocate (outputs(lat,lon, lev))
92
- allocate ( inputs(lat,lon, lev))
93
- allocate (input_components(lat,lon, lev,neural_network% num_inputs()))
91
+ allocate (outputs(lat,lev,lon ))
92
+ allocate ( inputs(lat,lev,lon ))
93
+ allocate (input_components(lat,lev,lon ,neural_network% num_inputs()))
94
94
call random_number (input_components)
95
95
96
- do concurrent(i= 1 :lat, j = 1 :lon, k = 1 :lev )
97
- inputs(i,j,k ) = tensor_t(input_components(i,j,k ,:))
96
+ do concurrent(i= 1 :lat, k = 1 :lev, j = 1 :lon )
97
+ inputs(i,k,j ) = tensor_t(input_components(i,k,j ,:))
98
98
end do
99
99
100
100
print * ," Performing double-precision concurrent inference"
101
101
call system_clock (t_start, clock_rate)
102
- do concurrent(i= 1 :lat, j = 1 :lon, k = 1 :lev )
103
- outputs(i,j,k ) = neural_network% infer(inputs(i,j,k ))
102
+ do concurrent(i= 1 :lat, k = 1 :lev, j = 1 :lon )
103
+ outputs(i,k,j ) = neural_network% infer(inputs(i,k,j ))
104
104
end do
105
105
call system_clock (t_finish)
106
106
print * ," Double-precision concurrent inference time: " , real (t_finish - t_start, real64)/ real (clock_rate, real64)
0 commit comments