Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rongou committed Jan 12, 2022
1 parent d058a2b commit aaa735e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions java/src/main/native/src/RmmJni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,12 @@ JNIEXPORT void JNICALL Java_ai_rapids_cudf_Rmm_initializeInternal(JNIEnv *env, j
std::make_shared<rmm::mr::cuda_memory_resource>(), pool_size, pool_size);
}
} else if (use_arena_alloc) {
auto const dump_log_on_failure = log_to != 0;
if (use_managed_mem) {
Initialized_resource = rmm::mr::make_owning_wrapper<rmm::mr::arena_memory_resource>(
std::make_shared<rmm::mr::managed_memory_resource>(), pool_size, dump_log_on_failure);
std::make_shared<rmm::mr::managed_memory_resource>(), pool_size);
} else {
Initialized_resource = rmm::mr::make_owning_wrapper<rmm::mr::arena_memory_resource>(
std::make_shared<rmm::mr::cuda_memory_resource>(), pool_size, dump_log_on_failure);
std::make_shared<rmm::mr::cuda_memory_resource>(), pool_size);
}
} else if (use_cuda_async_alloc) {
// Use `limiting_resource_adaptor` to set a hard limit on the max pool size since
Expand Down
2 changes: 1 addition & 1 deletion java/src/test/java/ai/rapids/cudf/RmmTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ public void testCudaAsyncIsIncompatibleWithManaged() {

@Test
public void testCudaMemoryBuffer() {
Rmm.initialize(RmmAllocationMode.ARENA, Rmm.logToStderr(), 1024);
Rmm.initialize(RmmAllocationMode.ARENA, Rmm.logToStderr(), 8 * 1024 * 1024);
try (CudaMemoryBuffer one = CudaMemoryBuffer.allocate(512);
CudaMemoryBuffer two = CudaMemoryBuffer.allocate(1024)) {
assertEquals(512, one.length);
Expand Down

0 comments on commit aaa735e

Please sign in to comment.