tardis-sn / stardis

TARDIS stellar radiative transfer
https://tardis-sn.github.io/stardis/
11 stars 15 forks source link

Refactor and add CUDA JIT compilation to `voigt_profile()` #113

Closed smokestacklightnin closed 1 year ago

smokestacklightnin commented 1 year ago

:pencil: Description

Type: :rocket: feature

This pull request refactors voigt_profile() and adds CUDA JIT compilation to the same function. Basic unit tests are also included.

This pull request should be merged (hopefully immediately) after pull request #107

:vertical_traffic_light: Testing

How did you test these changes?

:ballot_box_with_check: Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #113 (7e322be) into main (9c2da67) will decrease coverage by 3.50%. The diff coverage is 16.32%.

:exclamation: Current head 7e322be differs from pull request most recent head 02cdb29. Consider uploading reports for the commit 02cdb29 to get more accurate results

@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
- Coverage   72.87%   69.37%   -3.50%     
==========================================
  Files          21       21              
  Lines         693      738      +45     
==========================================
+ Hits          505      512       +7     
- Misses        188      226      +38     
Files Changed Coverage Δ
stardis/opacities/tests/test_voigt.py 0.00% <0.00%> (ø)
stardis/opacities/voigt.py 32.85% <33.33%> (+0.20%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

tardis-bot commented 1 year ago

*beep* *bop* Hi human, I ran benchmarks as you asked comparing main (9c2da67ccae47cf58204563c1da339c340ce8150) and the latest commit (02cdb2934c996f8ffa2dd6f71d236d39ff6027e0). Here are the logs produced by ASV. Results can also be downloaded as artifacts here. Significantly changed benchmarks:

```diff ```

All benchmarks:

```diff All benchmarks: before after ratio [9c2da67c] [02cdb293] 13.4±0.04s 13.2±0.01s 0.98 run_stardis.BenchmarkRunStardis.time_run_stardis ```