modern-fortran / neural-fortran

A parallel framework for deep learning
MIT License
395 stars 82 forks source link

Intrinsic `pack` replaced by pointers in `get_params` and `get_gradients` #183

Closed jvdp1 closed 3 months ago

jvdp1 commented 4 months ago

This PR proposes to replace some intrinsics pack by pointers in get_params and get_gradients. Pro: These changes reduced the times of update on my own tests by ~30%. Con: these procedures must be impure

milancurcic commented 4 months ago

Thanks, @jvdp1, I'll test.

jvdp1 commented 3 months ago

@milancurcic As discussed, using my datasets, here are the wall clock times for the steps forward-backward and update:

v0.16.1

v0.17.0

So, about a 40% speedup for the step update alone.