Skip to content

add mixed precision training/matmul32 precision#1356

Open
jveitchmichaelis wants to merge 1 commit intoweecology:mainfrom
jveitchmichaelis:add_precision
Open

add mixed precision training/matmul32 precision#1356
jveitchmichaelis wants to merge 1 commit intoweecology:mainfrom
jveitchmichaelis:add_precision

Conversation

@jveitchmichaelis
Copy link
Collaborator

@jveitchmichaelis jveitchmichaelis commented Mar 19, 2026

Description

Adds config options to enabled mixed precision training via Lightning, and allow setting matmul32 precision on CUDA systems. This suppresses a warning from torch when CUDA cores are available, and also provides a decent speedup.

The defaults are auto equivalents to avoid any issues with existing models, but I've seen pretty good speedups using 16-mixed/high

AI-Assisted Development

  • I used AI tools (e.g., GitHub Copilot, ChatGPT, etc.) in developing this PR
  • I understand all the code I'm submitting
  • I have reviewed and validated all AI-generated code

AI tools used (if applicable):
Checks to make sure configs are consistent.

@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.35%. Comparing base (884502e) to head (6c14902).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/deepforest/main.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1356   +/-   ##
=======================================
  Coverage   87.35%   87.35%           
=======================================
  Files          24       24           
  Lines        2981     3014   +33     
=======================================
+ Hits         2604     2633   +29     
- Misses        377      381    +4     
Flag Coverage Δ
unittests 87.35% <66.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jveitchmichaelis jveitchmichaelis marked this pull request as ready for review March 20, 2026 14:23
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.

1 participant