Test FP16 support when available with Armadillo - #426
Merged
Conversation
…d and datatype. 2. Update IQN optimizer to build against Armadillo and Bandicoot. 3. Update IQN test cases to test against Armadillo and Bandicoot backend. 4. Update logisitic regression function, to support Armadillo and Bandicoot.
…dicoot datatypes.
…d Bandicoot datatypes.
1. AdaBelief 2. AdaBound 3. AMSBound 4. AdaGrad 5. Adam 6. Adamax 7. AMSGrad 8. Nadam 9. Nadamax 10. OptimisticAdam 11. Eve 12. FTML 13. LBFGS 14. Lookahead 15. Padam 16. QHAdam 17. SMORMS3 18. SpaleraSGD 19. SPSA 20. SWATS 21. WNGrad 22. Yogi 23. MomentumSGD 24. NesterovMomentum 25. QuasiHyperbolic 26. SGD 27. SGDR 28. SnapshotSGDR 29. CNE 30. CMAES 31. ActiveCMAES 32. PSO 33. LBestPSO 34. MOEAD 35. AugmentedLagrangian
1. AdaDelta 2. AdaSqrt 3. BigBatchSGD 4. CoordinateDescent (CD) 5. GradientDescent 6. GridSearch 7. NSGA2 8. ParallelSGD
1. DifferentialEvolution (DE) 2. RMSProp 3. SimulatedAnnealing (SA) 4. SARAH 5. SARAH+ 6. SVRG 7. BarzilaiBorweinDecay 8. DemonAdam 9. DemonSGD
…nce randg is not supported in Bandicoot.
Co-authored-by: Ryan Curtin <ryan@ratml.org>
…ndicoot if found).
… that allows to use a different datatype i.e. arma::fvec or coot::fvec.
…guide. Co-authored-by: Ryan Curtin <ryan@ratml.org>
Co-authored-by: Ryan Curtin <ryan@ratml.org>
Merged
…ilable during compilation.
zoq
reviewed
Sep 1, 2025
zoq
left a comment
Member
There was a problem hiding this comment.
Once the build issue is fixed, this seems ready to be merged from my side.
zoq
approved these changes
Sep 2, 2025
zoq
left a comment
Member
There was a problem hiding this comment.
Looks great to me, and a green build as well.
rcurtin
commented
Sep 2, 2025
| { /* Nothing to do. */ } | ||
|
|
||
| template<typename SelectionPolicyType, typename TransformationPolicyType> | ||
| // TODO: actually mark as deprecated! |
Member
Author
There was a problem hiding this comment.
Note to self: handle this in another PR!
conradsnicta
requested changes
Sep 3, 2025
conradsnicta
approved these changes
Sep 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR requires #425 to be merged, so, until then, the diff will be pretty mangled. We also can't merge this PR first, and I will need to do some rebasing as that PR gets updated and completed.
Whenever Armadillo provides the
arma::hmattype (FP16 matrices), this addsarma::hmatto the set of types that are tested. Each test type (arma::mat,arma::fmat,arma::hmat) has its own set of tolerances, as FP16 convergence cannot be expected to be as good as FP32 or FP64 convergence.The new file
tests/test_types.hppdefines the set of supported test types and macros that are used in tandem withTEMPLATE_TEST_CASE()to provide single test cases that test all supported element types.Throughout, to prevent
-Wnarrowingcompiler warnings, I had to make various modifications to explicitly castdoubles to the element type of the optimization. These do not change the functionality or behavior or ensmallen (at least tangibly), and when the element type isdoublethis is identical code to before.I tuned each of the tests so that they run 1000 times without any failures.
After this PR, it is possible without warnings to do FP16 optimizations with ensmallen.