All Projects → SciML → AutoOptimize.jl

SciML / AutoOptimize.jl

Licence: MIT license
Automatic optimization and parallelization for Scientific Machine Learning (SciML)

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to AutoOptimize.jl

PoissonRandom.jl
Fast Poisson Random Numbers in pure Julia for scientific machine learning (SciML)
Stars: ✭ 13 (-83.12%)
Mutual labels:  high-performance-computing, scientific-machine-learning, sciml
Differentialequations.jl
Multi-language suite for high-performance solvers of differential equations and scientific machine learning (SciML) components
Stars: ✭ 2,023 (+2527.27%)
Mutual labels:  scientific-machine-learning, sciml
DiffEqUncertainty.jl
Fast uncertainty quantification for scientific machine learning (SciML) and differential equations
Stars: ✭ 61 (-20.78%)
Mutual labels:  scientific-machine-learning, sciml
HelicopterSciML.jl
Helicopter Scientific Machine Learning (SciML) Challenge Problem
Stars: ✭ 35 (-54.55%)
Mutual labels:  scientific-machine-learning, sciml
DiffEqCallbacks.jl
A library of useful callbacks for hybrid scientific machine learning (SciML) with augmented differential equation solvers
Stars: ✭ 43 (-44.16%)
Mutual labels:  scientific-machine-learning, sciml
SciPyDiffEq.jl
Wrappers for the SciPy differential equation solvers for the SciML Scientific Machine Learning organization
Stars: ✭ 19 (-75.32%)
Mutual labels:  scientific-machine-learning, sciml
MultiScaleArrays.jl
A framework for developing multi-scale arrays for use in scientific machine learning (SciML) simulations
Stars: ✭ 63 (-18.18%)
Mutual labels:  scientific-machine-learning, sciml
SciMLBenchmarks.jl
Benchmarks for scientific machine learning (SciML) software and differential equation solvers
Stars: ✭ 195 (+153.25%)
Mutual labels:  scientific-machine-learning, sciml
DiffEqOnlineServer
Backend for DiffEqOnline, a webapp for scientific machine learning (SciML)
Stars: ✭ 24 (-68.83%)
Mutual labels:  scientific-machine-learning, sciml
DiffEqDevTools.jl
Benchmarking, testing, and development tools for differential equations and scientific machine learning (SciML)
Stars: ✭ 37 (-51.95%)
Mutual labels:  scientific-machine-learning, sciml
BoundaryValueDiffEq.jl
Boundary value problem (BVP) solvers for scientific machine learning (SciML)
Stars: ✭ 23 (-70.13%)
Mutual labels:  scientific-machine-learning, sciml
diffeqr
Solving differential equations in R using DifferentialEquations.jl and the SciML Scientific Machine Learning ecosystem
Stars: ✭ 118 (+53.25%)
Mutual labels:  scientific-machine-learning, sciml
Quadrature.jl
A common interface for quadrature and numerical integration for the SciML scientific machine learning organization
Stars: ✭ 83 (+7.79%)
Mutual labels:  scientific-machine-learning, sciml
sciml.ai
The SciML Scientific Machine Learning Software Organization Website
Stars: ✭ 38 (-50.65%)
Mutual labels:  scientific-machine-learning, sciml
RootedTrees.jl
A collection of functionality around rooted trees to generate order conditions for Runge-Kutta methods in Julia for differential equations and scientific machine learning (SciML)
Stars: ✭ 24 (-68.83%)
Mutual labels:  scientific-machine-learning, sciml
Sundials.jl
Julia interface to Sundials, including a nonlinear solver (KINSOL), ODE's (CVODE and ARKODE), and DAE's (IDA) in a SciML scientific machine learning enabled manner
Stars: ✭ 167 (+116.88%)
Mutual labels:  scientific-machine-learning, sciml
DiffEqGPU.jl
GPU-acceleration routines for DifferentialEquations.jl and the broader SciML scientific machine learning ecosystem
Stars: ✭ 131 (+70.13%)
Mutual labels:  scientific-machine-learning, sciml
DiffEqNoiseProcess.jl
A library of noise processes for stochastic systems like stochastic differential equations (SDEs) and other systems that are present in scientific machine learning (SciML)
Stars: ✭ 34 (-55.84%)
Mutual labels:  scientific-machine-learning, sciml
GlobalSensitivity.jl
Robust, Fast, and Parallel Global Sensitivity Analysis (GSA) in Julia
Stars: ✭ 30 (-61.04%)
Mutual labels:  scientific-machine-learning, sciml
Kinetic.jl
Universal modeling and simulation of fluid dynamics upon machine learning
Stars: ✭ 82 (+6.49%)
Mutual labels:  scientific-machine-learning, sciml

AutoOptimize

Build Status

Note: This repo is still experimental!

Do you want your calculation to go faster but are also too lazy to optimize your code? Well I have a solution for you! Introducing the AutoOptimize system. With a simple ]add AutoOptimize, we'll send it straight to your home and SHIPPING IS FREE! In seconds your calculations will be taking seconds. So what do you have to lose? Here, come on in and I'll show you how to use it.

Making Code Fast, the Lazy Way

Define an ODEProblem, prob. Alright, I'll wait for you to catch up. Now call:

_prob = auto_optimize(prob)

Now _prob is better, so go use that one.

Example: Faster PDEs

using AutoOptimize, OrdinaryDiffEq, LinearAlgebra, SparseArrays

# Define the constants for the PDE
const α₂ = 1.0
const α₃ = 1.0
const β₁ = 1.0
const β₂ = 1.0
const β₃ = 1.0
const r₁ = 1.0
const r₂ = 1.0
const _DD = 100.0
const γ₁ = 0.1
const γ₂ = 0.1
const γ₃ = 0.1
const N = 32
const X = reshape([i for i in 1:N for j in 1:N],N,N)
const Y = reshape([j for i in 1:N for j in 1:N],N,N)
const α₁ = 1.0.*(X.>=4*N/5)

const Mx = Tridiagonal([1.0 for i in 1:N-1],[-2.0 for i in 1:N],[1.0 for i in 1:N-1])
const My = copy(Mx)
Mx[2,1] = 2.0
Mx[end-1,end] = 2.0
My[1,2] = 2.0
My[end,end-1] = 2.0

# Define the discretized PDE as an ODE function
function f(u,p,t)
    A = @view  u[:,:,1]
    B = @view  u[:,:,2]
    C = @view  u[:,:,3]
    MyA = My*A
    AMx = A*Mx
    DA = @. _DD*(MyA + AMx)
    dA = @. DA + α₁ - β₁*A - r₁*A*B + r₂*C
    dB = @. α₂ - β₂*B - r₁*A*B + r₂*C
    dC = @. α₃ - β₃*C + r₁*A*B - r₂*C
    cat(dA,dB,dC,dims=3)
end

u0 = zeros(N,N,3)
MyA = zeros(N,N);
AMx = zeros(N,N);
DA = zeros(N,N);
prob = ODEProblem(f,u0,(0.0,10.0))

But then you're like "but diz code is beautiful!" and I'm just proper chuffed: how do I make my benchmarks look good if you don't want to write good code?

Well, I guess this calls for Doctor Auto Optimize!

_prob,_alg = auto_optimize(prob)

After this churns away for a bit, you go boom:

@btime solve(_prob, TRBDF2()) # 168.558 ms (4925 allocations: 101.41 MiB)

and there you go, now you're solving 4 PDEs a second. What was it like before the optimization?

@btime solve(prob, TRBDF2(autodiff=false)) # 249.993 s (18560715 allocations: 1281.93 GiB)

That's a lean 1483x temporal speedup!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].