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

Simple memory tools #598

Closed
wants to merge 1 commit into from
Closed

Simple memory tools #598

wants to merge 1 commit into from

Conversation

MikeInnes
Copy link
Member

e.g.

julia> m = Chain(Dense(10, 5, relu), Dense(5, 2)) |> gpu
Chain(Dense(10, 5, NNlib.relu), Dense(5, 2))

julia> y = m(gpu(rand(10)))
Tracked 2-element CuArray{Float32,1}:
 0.14124388f0
 1.0137802f0

julia> Tracker.mem(y)
511

This is pretty coarse grained for now (Zygote already has something much more advanced).

@bhvieira
Copy link
Contributor

Does Tracker have this functionality right now? The PR could still be moved there

@MikeInnes
Copy link
Member Author

I don't think I'm going to have time to look at Tracker stuff. So I'll close for now, though someone could take this up if they want to.

@MikeInnes MikeInnes closed this Apr 21, 2020
@CarloLucibello CarloLucibello deleted the mji/mem branch April 7, 2022 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants