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

Support of stream ordered device memory allocations (async mallocs) #181

Merged
merged 5 commits into from
Mar 10, 2023

Conversation

madsbk
Copy link
Member

@madsbk madsbk commented Mar 6, 2023

Currently, we call cuPointerGetAttribute(..., CU_POINTER_ATTRIBUTE_CONTEXT) to set the CUDA context for each IO task. However, this doesn't work for stream ordered device memory allocations so we now get the current cuda context instead.

Closes rapidsai/cudf#12865

@madsbk madsbk added bug Something isn't working non-breaking Introduces a non-breaking change labels Mar 6, 2023
@madsbk madsbk marked this pull request as draft March 6, 2023 16:43
@madsbk madsbk force-pushed the use_current_context branch from 11f78c1 to a0c75eb Compare March 6, 2023 16:46
@madsbk madsbk marked this pull request as ready for review March 7, 2023 07:36
@madsbk madsbk requested a review from quasiben March 7, 2023 07:36
@quasiben
Copy link
Member

quasiben commented Mar 9, 2023

I'm still seeing the same error with this PR as reported in rapidsai/cudf#12865 . Do you think I need to rebuild cuDF as well ?

@madsbk
Copy link
Member Author

madsbk commented Mar 9, 2023

I'm still seeing the same error with this PR as reported in rapidsai/cudf#12865 . Do you think I need to rebuild cuDF as well ?

Yes, sorry should have made that clear. You have to build cudf with this PR, which can be done by setting the kvikio source cudf's build.sh script like:

diff --git a/build.sh b/build.sh
index bee66d819b..b6bcf5ce75 100755
--- a/build.sh
+++ b/build.sh
@@ -288,6 +288,7 @@ if buildAll || hasArg libcudf; then
           -DDISABLE_DEPRECATION_WARNINGS=${BUILD_DISABLE_DEPRECATION_WARNINGS} \
           -DCUDF_USE_PER_THREAD_DEFAULT_STREAM=${BUILD_PER_THREAD_DEFAULT_STREAM} \
           -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
+          -DCPM_KvikIO_SOURCE=/home/mkristensen/repos/kvikio \
           ${EXTRA_CMAKE_ARGS}
 
     cd ${LIB_BUILD_DIR}

@quasiben
Copy link
Member

Thanks so much @madsbk !

@quasiben
Copy link
Member

/merge

@rapids-bot rapids-bot bot merged commit efa6a62 into rapidsai:branch-23.04 Mar 10, 2023
@madsbk madsbk deleted the use_current_context branch March 21, 2023 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] CUDA_ERROR_INVALID_VALUE When using reading-parquet files + async RMM + kvikIO
2 participants