-
Notifications
You must be signed in to change notification settings - Fork 902
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
Deleting DataFrames does not free up GPU memory #177
Comments
@ayushdg since Numba is the allocator / deallocator of the memory, it follows Numba's CUDA memory management rules. In this case by default Numba won't try to deallocate memory until you hit 20% of the device memory (~2.4GB in your case). Can you try creating a larger dataframe and then calling the See http://numba.pydata.org/numba-doc/latest/cuda/memory.html#deallocation-behavior for more information. |
Yeah. Testing on larger dataframes confirmed that when data in the deallocation queue exeeded 20% of the gpu memory it automatically deallocated the memory based on the deallocation behvaiour specified by Numba. |
[REVIEW] Make gdf_is_valid inline rather than static (Fix #176)
Compile warning introduced with merge of PR #10802 ``` 10 warnings like this: 12:43:23 $SRC_DIR/cpp/src/search/search.cu(108): warning #177-D: parameter "args" was declared but never referenced 12:43:23 detected during instantiation of function "lambda [](auto &&...)->auto [with <auto-1>=<rmm::exec_policy, const thrust::counting_iterator<cudf::size_type, thrust::use_default, thrust::use_default, thrust::use_default> &, thrust::counting_iterator<cudf::size_type, thrust::use_default, thrust::use_default, thrust::use_default>, const thrust::counting_iterator<cudf::size_type, thrust::use_default, thrust::use_default, thrust::use_default> &, thrust::counting_iterator<cudf::size_type, thrust::use_default, thrust::use_default, thrust::use_default>, cudf::size_type *const &, const cudf::row_lexicographic_comparator<cudf::nullate::DYNAMIC> &>]" 12:43:23 (121): here ``` Line 108 has a lambda refactoring that seems to confuse the compiler. ``` auto const do_search = [find_first](auto&&... args) { if (find_first) { thrust::lower_bound(std::forward<decltype(args)>(args)...); } else { thrust::upper_bound(std::forward<decltype(args)>(args)...); } }; do_search(rmm::exec_policy(stream), count_it, count_it + haystack.num_rows(), count_it, count_it + needles.num_rows(), out_it, comp); ``` The warning is wrong and the compiler generates the correct code so this is likely a compiler bug. This PR fixes the warning by replacing the lambda with an if statement. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Nghia Truong (https://github.com/ttnghia) - Yunsong Wang (https://github.com/PointKernel) URL: #10827
Fixes compile warning introduced in #11534 ``` /cudf/cpp/src/io/json/nested_json_gpu.cu(970): warning #177-D: variable "single_item_count" was declared but never referenced ``` Removed unreferenced variable declaration. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Nghia Truong (https://github.com/ttnghia) - Bradley Dice (https://github.com/bdice) URL: #11607
Compile warning was introduced in #11652 in `bgzip_data_chunk_source.cu`. The warning can be seen here https://gpuci.gpuopenanalytics.com/job/rapidsai/job/gpuci/job/cudf/job/prb/job/cudf-cpu-cuda-build/CUDA=11.5/12417/consoleFull (search for `177-D`) ``` /cudf/cpp/src/io/text/bgzip_data_chunk_source.cu(362): warning #177-D: variable "nvtx3_range__" was declared but never referenced ``` The `nvtx3_range__` is part of the `CUDF_FUNC_RANGE()` macro. The warning is incorrect and likely a compiler bug. The workaround in this PR is to add `[[maybe_unused]]` to the variable declaration. I was not able to create a small reproducer for compile bug filing. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Tobias Ribizel (https://github.com/upsj) - MithunR (https://github.com/mythrocks) URL: #11798
Fixes a minor compile error/warnings for unused variables in the `cpp/src/io/parquet/page_data.cu` source file. ``` cudf/cpp/src/io/parquet/page_data.cu -o CMakeFiles/cudf.dir/src/io/parquet/page_data.cu.o /cudf/cpp/src/io/parquet/page_data.cu(636): error #177-D: parameter "s" was declared but never referenced /cudf/cpp/src/io/parquet/page_data.cu(343): error #177-D: parameter "sb" was declared but never referenced detected during instantiation of "cuda::std::__4::pair<int, int> cudf::io::parquet::gpu::<unnamed>::gpuDecodeDictionaryIndices<sizes_only>(volatile cudf::io::parquet::gpu::<unnamed>::page_state_s *, volatile cudf::io::parquet::gpu::<unnamed>::page_state_buffers_s *, int, int) [with sizes_only=true]" (1720): here /cudf/cpp/src/io/parquet/page_data.cu(527): error #177-D: parameter "sb" was declared but never referenced detected during instantiation of "cudf::size_type cudf::io::parquet::gpu::<unnamed>::gpuInitStringDescriptors<sizes_only>(volatile cudf::io::parquet::gpu::<unnamed>::page_state_s *, volatile cudf::io::parquet::gpu::<unnamed>::page_state_buffers_s *, int, int) [with sizes_only=true]" (1724): here 3 errors detected in the compilation of "/cudf/cpp/src/io/parquet/page_data.cu". ``` Found these with a Debug build using nvcc 11.5 and gcc 9.5. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Nghia Truong (https://github.com/ttnghia) - Divye Gala (https://github.com/divyegala) - Vukasin Milovanovic (https://github.com/vuule) - Karthikeyan (https://github.com/karthikeyann) URL: #13093
Fixes unused parameter warning/error introduced by #13143 in `grouped_rolling.cu` ``` CMakeFiles/cudf.dir/src/rolling/grouped_rolling.cu.o /cudf/cpp/src/rolling/grouped_rolling.cu(280): error #177-D: parameter "delta" was declared but never referenced ``` This was found when building with nvcc 11.5. I was hoping there would be some clever partial specialization or function overloading that could be done here but none were as clean as the current implementation. Solution was to just add `[[maybe_unused]]` to offending parameter declaration. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Nghia Truong (https://github.com/ttnghia) - Bradley Dice (https://github.com/bdice) URL: #13192
Fix some unused variables/parameters warnings introduced by #13076. My old nvcc 11.5 compiler found these. Removing some of these found functions that could be removed as well. Some variables/parameters are now declared with `[[maybe_unused]]` ``` /cudf/cpp/src/io/parquet/writer_impl.cu(575): error #177-D: variable "data_col_type" was declared but never referenced /cudf/cpp/src/io/parquet/writer_impl.cu(906): error #177-D: parameter "stream" was declared but never referenced /cudf/cpp/src/io/parquet/writer_impl.cu(908): error #177-D: variable "col" was declared but never referenced /cudf/cpp/src/io/parquet/writer_impl.cu(1290): error #177-D: parameter "max_page_uncomp_data_size" was declared but never referenced /cudf/cpp/src/io/parquet/writer_impl.cu(1411): error #177-D: parameter "input" was declared but never referenced /cudf/cpp/src/io/parquet/writer_impl.cu(1712): error #177-D: variable "dict_info_owner" was declared but never referenced ``` Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Nghia Truong (https://github.com/ttnghia) - Karthikeyan (https://github.com/karthikeyann) URL: #13263
Fixed unused parameters warning/error in the `parquet/page_data.cu`: ``` /cudf/cpp/src/io/parquet/page_data.cu(171): error #177-D: parameter "is_decode_step" was declared but never referenced detected during: instantiation of "__nv_bool cudf::io::parquet::gpu::<unnamed>::setupLocalPageInfo(cudf::io::parquet::gpu::<unnamed>::page_state_s *, const cudf::io::parquet::gpu::PageInfo *, cudf::device_span<const cudf::io::parquet::gpu::ColumnChunkDesc, 18446744073709551615UL>, size_t, size_t, __nv_bool, cudf::io::parquet::gpu::rle_stream<level_t> *) [with level_t=uint8_t]" (1825): here instantiation of "void cudf::io::parquet::gpu::<unnamed>::gpuComputePageSizes<lvl_buf_size,level_t>(cudf::io::parquet::gpu::PageInfo *, cudf::device_span<const cudf::io::parquet::gpu::ColumnChunkDesc, 18446744073709551615UL>, size_t, size_t, __nv_bool, __nv_bool) [with lvl_buf_size=2048, level_t=uint8_t]" (2197): here /cudf/cpp/src/io/parquet/page_data.cu(172): error #177-D: parameter "decoders" was declared but never referenced detected during: instantiation of "__nv_bool cudf::io::parquet::gpu::<unnamed>::setupLocalPageInfo(cudf::io::parquet::gpu::<unnamed>::page_state_s *, const cudf::io::parquet::gpu::PageInfo *, cudf::device_span<const cudf::io::parquet::gpu::ColumnChunkDesc, 18446744073709551615UL>, size_t, size_t, __nv_bool, cudf::io::parquet::gpu::rle_stream<level_t> *) [with level_t=uint8_t]" (1825): here instantiation of "void cudf::io::parquet::gpu::<unnamed>::gpuComputePageSizes<lvl_buf_size,level_t>(cudf::io::parquet::gpu::PageInfo *, cudf::device_span<const cudf::io::parquet::gpu::ColumnChunkDesc, 18446744073709551615UL>, size_t, size_t, __nv_bool, __nv_bool) [with lvl_buf_size=2048, level_t=uint8_t]" (2197): here 2 errors detected in the compilation of "/cudf/cpp/src/io/parquet/page_data.cu". ``` Removing the parameters seemed to work and gtests are passing. This was found by building with nvcc 11.5. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Nghia Truong (https://github.com/ttnghia) - Divye Gala (https://github.com/divyegala) - Bradley Dice (https://github.com/bdice) - https://github.com/nvdbaranec URL: #13367
Fixes compile warning found in `cpp/src/strings/split/split_re.cu` for unused declared variable ``` /cudf/cpp/src/strings/split/split_re.cu(83): error #177-D: structured binding "end_pos" was declared but never referenced ``` Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Nghia Truong (https://github.com/ttnghia) - Bradley Dice (https://github.com/bdice) - Mike Wilson (https://github.com/hyperbolic2346) URL: #13621
Expected: Gpu memory taken up by the dataframe will be freed.
Actual:
It's not a major issue during data exploration and basic analysis, but when working with multiple dataframes, not having the ability to manually delete the ones which are not needed anymore is resulting in CUDA OOM errors.
The text was updated successfully, but these errors were encountered: