Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No tracer no cry #88

Merged
merged 3 commits into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
name = "Yota"
uuid = "cd998857-8626-517d-b929-70ad188a48f0"
authors = ["Andrei Zhabinski <andrei.zhabinski@gmail.com>"]
version = "0.4.4"
version = "0.5.0"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
IRTools = "7869d1d1-7146-5819-86e3-90919afe41df"
Ghost = "4f8f7498-1303-42e1-920c-5033445536df"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[compat]
CUDA = "3"
ChainRules = "0.7.65"
ChainRulesCore = "0.9"
ChainRulesCore = "0.10"
ChainRules = "0.8"
FiniteDifferences = "0.12"
IRTools = "0.4"
OrderedCollections = "1.4"
Setfield = "0.7"
Ghost = "0.1"
julia = "1.6"
2 changes: 1 addition & 1 deletion src/chainrules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function rrule(::typeof(Broadcast.broadcasted), f::F, args...) where F
ys, pbs = unzip(rrule.(f, args...))
function pullback(Δ)
dxs = map((pb, Δ) -> pb(Δ), pbs, Δ)
return NO_FIELDS, unzip(dxs)...
return NoTangent(), unzip(dxs)...
end
return ys, pullback
end
95 changes: 0 additions & 95 deletions src/compile.jl

This file was deleted.

24 changes: 6 additions & 18 deletions src/core.jl
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
import Statistics
using LinearAlgebra
using Setfield
using OrderedCollections
using IRTools
using ChainRulesCore
using ChainRules
using CUDA
using Ghost
using Ghost: Tape, Variable, V, Call, mkcall, Constant, inputs
using Ghost: bound, _getfield, compile, play!, isstruct, ungetfield, ungetindex, uncat
using Ghost: unbroadcast, unbroadcast_prod_x, unbroadcast_prod_y
using Ghost: remove_first_parameter, kwfunc_signature, call_signature


include("funres.jl")
include("utils.jl")
include("scatter/scatter.jl")
include("helpers.jl")
include("drules.jl")
include("chainrules.jl")
include("devices.jl")
include("tape.jl")
include("trace.jl")
include("grad.jl")
include("compile.jl")
include("update.jl")
include("gradcheck.jl")


const BEST_AVAILABLE_DEVICE = Ref{AbstractDevice}(CPU())
best_available_device() = BEST_AVAILABLE_DEVICE[]

function __init__()
if CUDA.functional()
BEST_AVAILABLE_DEVICE[] = GPU(1)
end
update_chainrules_primitives!()
end
57 changes: 0 additions & 57 deletions src/devices.jl

This file was deleted.

Loading