Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intrinsic pack replaced by pointers in get_params and get_gradients #183

Merged
merged 6 commits into from
Jun 14, 2024

Conversation

jvdp1
Copy link
Collaborator

@jvdp1 jvdp1 commented May 9, 2024

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
Copy link
Member

Thanks, @jvdp1, I'll test.

@milancurcic milancurcic self-requested a review May 10, 2024 18:21
Copy link
Member

@milancurcic milancurcic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I observe 12% speedup in the MNIST training example with this change. It's a good one. Thanks!

@milancurcic milancurcic merged commit 118f795 into modern-fortran:main Jun 14, 2024
2 checks passed
@jvdp1
Copy link
Collaborator Author

jvdp1 commented Jun 14, 2024

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

v0.16.1

  • forward-backward: 4.81s
  • update: 9.44s

v0.17.0

  • forward-backward: 4.80s
  • update: 5.61s

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants