C++, Fortran
Python
Python, Matlab
Python, Matlab
C++, Fortran
C++, Fortran
Python
Fast
Easy
We love [Matlab, Lisp, Python, Ruby, Perl, Mathematica, and C]; they are wonderful and powerful. For the work we do — scientific computing, machine learning, data mining, large-scale linear algebra, distributed and parallel computing — each one is perfect for some aspects of the work and terrible for others. Each one is a trade-off.
We are greedy: we want more.
C++, Fortran
Python
Python, Matlab
Python, Matlab
C++, Fortran
C++, Fortran
Python
Fast
Easy
using CUDA
x_d = CUDA.fill(1.0f0, N) # a vector stored on the GPU filled with 1.0 (Float32)
y_d = CUDA.fill(2.0f0, N) # a vector stored on the GPU filled with 2.0
function add_broadcast!(y, x)
CUDA.@sync y .+= x
return
end
add_broadcast!(y_d, x_d)
numblocks = ceil(Int, length(y)/256)
CUDA.@sync begin
@cuda threads=256 blocks=numblocks gpu_add!(y, x)
end
Julia solves the two language problem!!
Julia is
EASIER
FASTER
Find out for yourself!
POMDP Models
+
=
Optimization
Specification
POMDPs.jl - An interface for defining and solving MDPs and POMDPs in Julia
[Egorov, Sunberg, et al., 2017]
Celeste Project
1.54 Petaflops
Previous C++ framework: APPL
"At the moment, the three packages are independent. Maybe one day they will be merged in a single coherent framework."
+
=
Julia is
EASIER
FASTER
#include <julia.h>
JULIA_DEFINE_FAST_TLS() // only define this once, in an executable (not in a shared library) if you want fast code.
int main(int argc, char *argv[])
{
/* required: setup the Julia context */
jl_init();
/* run Julia commands */
jl_eval_string("print(sqrt(2.0))");
/* strongly recommended: notify Julia that the
program is about to terminate. this allows
Julia time to cleanup pending write requests
and run all finalizers
*/
jl_atexit_hook(0);
return 0;
}
x=ccall((:mean,"libmean"),Float64,(Float64,Float64),2.0,5.0)
println(x)
3.5
double mean(double a, double b) {
return (a+b) / 2;
}
Julia from C
C from Julia
zachary.sunberg@colorado.edu