Giter Site home page Giter Site logo

allocarrays.jl's People

Contributors

ericphanson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

allocarrays.jl's Issues

Possible memory safety features

We could include a mutable field in each AllocArray tracking whether it is active, and a vector in the bumper allocator object collecting all of the allocated arrays. Then when we reset the bump, we loop through and mark each array as inactive (which would cause eg getindex to error if called on it), and empty the list.

I think this would prevent “use after free” errors pretty comprehensively (in the serial case), possibly at the cost of some performance. It could be done as secondary types though, allowing debugging/testing with the safe version, then switching to the unchecked one for speed.

For concurrency safety, maybe some mechanism could be used for the resetting function to get exclusive access to each of the arrays in order to flip their activity bits. Eg if each array holds a lock? Or something where operations on the array don’t contest each other, but do contest with the resetter. Then we could empty the buffer once every array has been toggled inactive.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Questions

Hi,

It's an intriguing approach. I see you take over similar, basically "malloc" for Julia... and you reduce allocations, but the timing is still worse. Is that maybe not in general, since that's the whole point?

I like Bumper, since there are no allocations, basically, so I'm confused why you have any at all? Probably for the output array.

Taking over similar seems clever, should it ideally be done too for zeros, ones (and fill?) or does it in fact happen implicitly? I'm thinking though, should it happen in all cases, and what you do is I think so-called type-piracy, so it's all or nothing?

I suppose this does not work for GPUs despite me seeing something Flux related. And neither Bumper.jl... but do you think it would be plausible?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.