Skip to content

Instantly share code, notes, and snippets.

julia> using SnoopCompileCore, SnoopCompile
julia> invalidations = @snoopr using Flux;
julia> trees = invalidation_trees(invalidations);
insert_backedges for MethodInstance for var"#emit_llvm#109"(::Bool, ::Bool, ::Bool, ::Bool, ::typeof(GPUCompiler.emit_llvm), ::GPUCompiler.CompilerJob, ::Core.MethodInstance)
insert_backedges for MethodInstance for store!(::Dict{Any, Any}, ::Symbol, ::Any)
insert_backedges for MethodInstance for store!(::Dict{Any, Any}, ::Symbol, ::Symbol)
insert_backedges for MethodInstance for match_inner(::Symbol, ::Any, ::Dict{Any, Any})
insert_backedges for MethodInstance for (::IRTools.Inner.var"#77#79"{IRTools.Inner.var"#85#86"{typeof(MacroTools.rmlines)}})(::IRTools.Inner.Statement)
# This file is machine-generated - editing it directly is not advised
[[AbstractFFTs]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "485ee0867925449198280d4af84bdb46a2a404d0"
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
version = "1.0.1"
[[AbstractTrees]]
git-tree-sha1 = "03e0550477d86222521d254b741d470ba17ea0b5"
@DhairyaLGandhi
DhairyaLGandhi / Project.toml
Last active March 12, 2021 19:29
CUDNN Test
[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55"
LLVM = "929cbde3-209d-540e-8aea-75f648917ca0"
Metalhead = "dbeba491-748d-5e0e-a39e-b530a07fa0cc"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
2020-06-19T11:47:52.217233+00:00 app[web.1]: libllvm = "/tmp/build_9a9c13ab7e0812bef1f1993077640115/julia/bin/../lib/julia/libLLVM-8jl.so"
2020-06-19T11:47:23.633866+00:00 app[web.1]: ErrorException("could not load library \"/tmp/build_9a9c13ab7e0812bef1f1993077640115/julia/bin/../lib/julia/libLLVM-8jl.so\"\n/tmp/build_9a9c13ab7e0812bef1f1993077640115/julia/bin/../lib/julia/libLLVM-8jl.so: cannot open shared object file: No such file or directory")
2020-06-19T11:47:27.167271+00:00 app[web.1]: fatal: error thrown and no exception handler available.
2020-06-19T11:47:27.167284+00:00 app[web.1]: #<null>
2020-06-19T11:47:27.168959+00:00 app[web.1]: jl_errorf at /buildworker/worker/package_linux64/build/src/rtutils.c:77
2020-06-19T11:47:27.169147+00:00 app[web.1]: jl_load_dynamic_library at /buildworker/worker/package_linux64/build/src/dlload.c:233
2020-06-19T11:47:27.171884+00:00 app[web.1]: jl_get_library_ at /buildworker/worker/package_linux64/build/src/runtime_ccall.cpp:50
2020-06-19T11:47:27.171956+00:00 app[w
2020-06-19T09:40:01.974372+00:00 app[web.1]: 4: symbol=_ZN4llvm4Pass11setResolverEPNS_16AnalysisResolverE; lookup in file=/lib/x86_64-linux-gnu/libpthread.so.0 [0]
2020-06-19T09:40:01.974373+00:00 app[web.1]: 4: symbol=_ZN4llvm4Pass11setResolverEPNS_16AnalysisResolverE; lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
2020-06-19T09:40:01.974373+00:00 app[web.1]: 4: symbol=_ZN4llvm4Pass11setResolverEPNS_16AnalysisResolverE; lookup in file=/app/julia/bin/../lib/julia/libLLVM-8jl.so [0]
2020-06-19T09:40:01.974373+00:00 app[web.1]: 4: binding file /app/julia/bin/../lib/julia/libLLVM-8jl.so [0] to /app/julia/bin/../lib/julia/libLLVM-8jl.so [0]: normal symbol `_ZN4llvm4Pass11setResolverEPNS_16AnalysisResolverE' [JL_LLVM_8.0]
2020-06-19T09:40:01.974373+00:00 app[web.1]: 4: symbol=_ZN4llvm13PMDataManager22initializeAnalysisImplEPNS_4PassE; lookup in file=julia [0]
2020-06-19T09:40:01.974374+00:00 app[web.1]: 4: symbol=_ZN4llvm13PMDataManager22initializeAnalysisImplEPNS_4PassE; lookup in file=/app/julia/bin/../
2020-06-19T08:49:56.576787+00:00 app[web.1]: fatal: error thrown and no exception handler available.
2020-06-19T08:49:56.578559+00:00 app[web.1]: #<null>
2020-06-19T08:49:56.580631+00:00 app[web.1]: jl_errorf at /buildworker/worker/package_linux64/build/src/rtutils.c:77
2020-06-19T08:49:56.580925+00:00 app[web.1]: jl_load_dynamic_library at /buildworker/worker/package_linux64/build/src/dlload.c:233
2020-06-19T08:49:56.584505+00:00 app[web.1]: jl_get_library_ at /buildworker/worker/package_linux64/build/src/runtime_ccall.cpp:50
2020-06-19T08:49:56.584715+00:00 app[web.1]: jl_get_library_ at /buildworker/worker/package_linux64/build/src/runtime_ccall.cpp:39 [inlined]
2020-06-19T08:49:56.584741+00:00 app[web.1]: jl_load_and_lookup at /buildworker/worker/package_linux64/build/src/runtime_ccall.cpp:61
2020-06-19T08:49:56.642676+00:00 app[web.1]: jlplt_LLVMResetFatalErrorHandler_30338 at /app/julia/lib/julia/sys.so (unknown line)
2020-06-19T08:49:56.652829+00:00 app[web.1]: macro expansion at /app/.julia/packages/L
using MacroTools: @forward
struct Imm{T,N} <: AbstractArray{T,N}
data::AbstractArray{T,N}
optinds::Dict{T,T}
iscommited::Ref{Bool}
end
# struct IsCommitted end
# struct IsNotCommitted end

Flux has taken some major strides in the past couple of years since it has been out. So this piece is to talk a little bit about what has changed.

flux-logo

Starting with a bit of housekeeping. This piece will introduce some basic guidelines to Julia programming and should hopefully help with your understanding of the language and using it with a few neat tricks. Another task is to clarify what Flux and its ecosystem isn't. It isn't a strictly deep learning library, although it does have most of the primitives for deep learning defined. It is essentially a framework for differentiable programming.

For a TL;DR, differentiable programming ($\partial$P) is a way of treating arbitrary programs as differentiable. Put it easily, it is a generalisation of the way we treat deep learning as consisting of a forward pass and a backwards pass. It applies the chain rule (refer the equation below) to every operatoin that takes place in a p

@DhairyaLGandhi
DhairyaLGandhi / pong.html
Created July 3, 2019 13:52
Pong - Javascript
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pong</title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<!-- Basic styling, centering the canvas -->