Skip to content

Comments

Fixed large allocations cache#89

Closed
borisfom wants to merge 5 commits intoNVIDIA:caffe-0.14from
borisfom:caffe-0.14
Closed

Fixed large allocations cache#89
borisfom wants to merge 5 commits intoNVIDIA:caffe-0.14from
borisfom:caffe-0.14

Conversation

@borisfom
Copy link

@borisfom borisfom commented Dec 2, 2015

Only the first diff is non-whitespace only:
my emacs now fixes those extra spaces (flagged later by lint) automatically.
I'd rather keep those whitespace changes than 'clean up' for smaller diff.

@thatguymike
Copy link

Also now getting a crash on exit on free. Getting close. I have a local combination of your changes and my changes.

@borisfom
Copy link
Author

borisfom commented Dec 2, 2015

I am not getting a crash, so that may be a clash with your changes - how do I take a look ?
Try removing debug printouts (now stderr gets mixed with err). Also try a clean rebuild, I don't trust dependencies are 100% complete.

@borisfom
Copy link
Author

borisfom commented Dec 2, 2015

Re dev_info: no, we are using index into dev info to refer to the device so we need an indirection. The input vector may be "0,3,4" etc.

@borisfom
Copy link
Author

borisfom commented Dec 2, 2015

Re memory reuse: search for free block is done via lower_bound, and then checking for steam match and bin match. Since the growth factor is 2, then potential memory overuse is 50% for each bin (9K request will in fact always allocate 16as it's rounded to the next pow2 within the bin range (6-16 in our case). All requests larger than the last bin, marked with bin =-1 and allocated exactly (no rounding). This is good part. Bad part is that they act as a single bin, so if 2.5G is the only free block with bin==-1, any other request with bin==-1, say 3M, will take it. With this change I am setting the limit of "wasted" memory to be no more than 1/8 of the request size.

thatguymike added a commit that referenced this pull request Dec 2, 2015
Dynamically reshape and adjust pool.  Part 1 of fixing this.  @borisfom has some improvements in #89 but we have more debugging to do.
@thatguymike
Copy link

Closing in favor of #90 which cleans out whitespace changes and merges this PR and #88

@thatguymike thatguymike closed this Dec 3, 2015
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