JuliaMolSim / Molly.jl

Molecular simulation in Julia
Other
372 stars 51 forks source link

adding overload so GPU kernels execute without unsupported dynamic function call #77

Closed leios closed 1 year ago

leios commented 1 year ago

Several GPU kernels are not functional because of an unsupported dynamic function call to force(...). This adds a simple fallback for calling force(..., weight_14) as just force(...). It seems to work on my GPU, at least.

codecov[bot] commented 1 year ago

Codecov Report

Merging #77 (d77779b) into master (01dcf3e) will decrease coverage by 0.52%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   86.89%   86.37%   -0.53%     
==========================================
  Files          30       30              
  Lines        3099     3119      +20     
==========================================
+ Hits         2693     2694       +1     
- Misses        406      425      +19     
Impacted Files Coverage Δ
src/interactions/gravity.jl 100.00% <ø> (ø)
src/force.jl 84.61% <100.00%> (-0.73%) :arrow_down:
src/zygote.jl 77.54% <0.00%> (-2.78%) :arrow_down:
src/setup.jl 94.38% <0.00%> (ø)
src/chain_rules.jl 55.05% <0.00%> (ø)
src/interactions/fene_bond.jl 92.59% <0.00%> (ø)
src/interactions/cosine_angle.jl 95.00% <0.00%> (ø)
src/types.jl 96.59% <0.00%> (+0.03%) :arrow_up:

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 01dcf3e...d77779b. Read the comment docs.

jgreener64 commented 1 year ago

Thanks, I'll remove the redundant branch in force.jl after merging this.