devito
devito copied to clipboard
[WIP] Add gradient subsampling test
This PR is the next milestone leading up to the compression followup work. It adds a test that computes the gradient normally first, then does it again for dt/2
and then a third time for dt/2
but subsampling 1-in-2 in time. It then asserts equality between the three, ensuring that the subsampling implementation makes sense.
Currently, the norms for the three are:
grad_base 1498.496997261012 grad_2t 2996.1773245927657 grad_sub 1498.087825898719
which means the second case (where dt/2
is used without subsampling) probably needs a dt-related scaling factor somewhere. Can @mloubout point me to the best way to incorporate this factor so this test makes sense?
Also, even though norms are fairly close, test does not pass at tolerance=1e-3
. Might be a silly mistake that crept in. Looking for overall feedback at this point.
Codecov Report
Merging #1532 (7083017) into master (97570bb) will increase coverage by
6.91%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #1532 +/- ##
==========================================
+ Coverage 61.23% 68.15% +6.91%
==========================================
Files 203 124 -79
Lines 27608 16501 -11107
Branches 3910 2984 -926
==========================================
- Hits 16906 11246 -5660
+ Misses 10170 4740 -5430
+ Partials 532 515 -17
Impacted Files | Coverage Δ | |
---|---|---|
devito/builtins/initializers.py | 10.29% <0.00%> (-73.53%) |
:arrow_down: |
examples/seismic/model.py | 25.00% <0.00%> (-63.05%) |
:arrow_down: |
devito/data/utils.py | 26.20% <0.00%> (-60.27%) |
:arrow_down: |
devito/passes/clusters/aliases.py | 33.13% <0.00%> (-55.89%) |
:arrow_down: |
devito/finite_differences/coefficients.py | 19.29% <0.00%> (-52.64%) |
:arrow_down: |
examples/seismic/preset_models.py | 2.90% <0.00%> (-51.17%) |
:arrow_down: |
devito/mpi/routines.py | 47.31% <0.00%> (-47.64%) |
:arrow_down: |
devito/builtins/utils.py | 49.05% <0.00%> (-47.17%) |
:arrow_down: |
examples/seismic/utils.py | 26.89% <0.00%> (-47.06%) |
:arrow_down: |
devito/core/autotuning.py | 13.04% <0.00%> (-46.09%) |
:arrow_down: |
... and 149 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 97570bb...7083017. Read the comment docs.
Stale, closing