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

Improve the Arena allocator to reduce memory fragmentation #916

Merged
merged 46 commits into from
Jan 12, 2022
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
b041286
add some tests for arena mr
rongou Oct 8, 2021
241816c
Merge remote-tracking branch 'upstream/branch-21.12' into arena-super…
rongou Oct 29, 2021
8bda94e
make superblocks persistent between different arenas
rongou Nov 8, 2021
69a8778
Merge remote-tracking branch 'upstream/branch-21.12' into arena-super…
rongou Nov 8, 2021
5da4b59
fix segfault
rongou Nov 9, 2021
10ed42c
add back memory dump
rongou Nov 9, 2021
104e17c
Merge remote-tracking branch 'upstream/branch-21.12' into arena-super…
rongou Nov 10, 2021
3f5bf1e
switch to map for superblocks
rongou Nov 10, 2021
d33b9a0
add some tests
rongou Nov 11, 2021
b4a1d6a
add more tests
rongou Nov 11, 2021
288a056
Merge remote-tracking branch 'upstream/branch-21.12' into arena-super…
rongou Nov 11, 2021
d86d6b1
fix clang tidy warnings in test
rongou Nov 11, 2021
f87ba63
add some logging asserts
rongou Nov 12, 2021
ce633f2
more tests for global arena
rongou Nov 12, 2021
d47d5dd
Merge remote-tracking branch 'upstream/branch-22.02' into arena-super…
rongou Nov 12, 2021
23f679c
add back defrag
rongou Nov 12, 2021
a5a4881
more tests
rongou Nov 16, 2021
f77fb7e
add tests for arena
rongou Nov 16, 2021
dd86082
remove alignment changes
rongou Nov 16, 2021
29ae23b
small fixes
rongou Nov 16, 2021
abd7226
switch back to set, fix tests
rongou Nov 17, 2021
10771f5
stream synchronize before releasing superblock
rongou Nov 18, 2021
c16f026
update docs
rongou Nov 18, 2021
f3e6875
use byte literals in tests
rongou Nov 18, 2021
cb25f74
fix overflow bug
rongou Nov 18, 2021
6eb957f
more fixes
rongou Nov 23, 2021
0f96e0a
Merge remote-tracking branch 'upstream/branch-22.02' into arena-super…
rongou Nov 23, 2021
9a2e917
clean instead of defragment individual arenas
rongou Nov 30, 2021
fb1f193
lower superblock size to 1MB
rongou Nov 30, 2021
0999300
Merge remote-tracking branch 'upstream/branch-22.02' into arena-super…
rongou Dec 2, 2021
5148c51
align to size classes
rongou Dec 4, 2021
a13e8ad
keep track of large allocations in superblocks
rongou Dec 7, 2021
7082f22
Merge remote-tracking branch 'upstream/branch-22.02' into arena-super…
rongou Dec 7, 2021
fb9ce95
log max free in superblock
rongou Dec 7, 2021
65742cb
log fragmentation percentage
rongou Dec 8, 2021
b92c9eb
minor fix
rongou Dec 8, 2021
5452b82
clang format
rongou Dec 9, 2021
c782893
address review comments
rongou Dec 9, 2021
4355984
Merge remote-tracking branch 'upstream/branch-22.02' into arena-super…
rongou Dec 15, 2021
0fd715e
clang format
rongou Dec 15, 2021
9d142c5
Merge remote-tracking branch 'upstream/branch-22.02' into arena-super…
rongou Dec 17, 2021
03696b5
Merge remote-tracking branch 'upstream/branch-22.02' into arena-super…
rongou Jan 11, 2022
c42a4d4
review feedback
rongou Jan 12, 2022
96c976b
clang format
rongou Jan 12, 2022
a97565d
increase test coverage
rongou Jan 12, 2022
5cf9360
clang format
rongou Jan 12, 2022
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
Prev Previous commit
Next Next commit
clang format
rongou committed Dec 9, 2021
commit 5452b82557ad51552b3df970682bb68ce0f2cc25
4 changes: 2 additions & 2 deletions tests/mr/device/arena_mr_tests.cpp
Original file line number Diff line number Diff line change
@@ -14,20 +14,20 @@
* limitations under the License.
*/

#include "../../byte_literals.hpp"
#include <rmm/cuda_stream.hpp>
#include <rmm/detail/aligned.hpp>
#include <rmm/detail/cuda_util.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/mr/device/arena_memory_resource.hpp>
#include <rmm/mr/device/device_memory_resource.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include "../../byte_literals.hpp"

#include <gmock/gmock.h>
#include <gtest/gtest.h>

#include <memory>
#include <sys/stat.h>
#include <memory>

namespace rmm::test {
namespace {