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

[WIP] Build RMM's Python bindings with PTDS #480

Closed
wants to merge 3 commits into from

Conversation

jakirkham
Copy link
Member

@jakirkham jakirkham commented Aug 11, 2020

Defines CUDA_API_PER_THREAD_DEFAULT_STREAM for Setuptools Extensions built by setup.py. This should make sure the per-thread default stream is used by these Python extensions.

Note: We still need other downstream changes as well ( rapidsai/cudf#5922 ). So we may want to hold on this a bit until those are resolved (hence marked as WIP). Based on discussions with others, it sounds like this change is fine on its own. So marking as ready.

https://docs.nvidia.com/cuda/cuda-runtime-api/stream-sync-behavior.html

cc @kkraus14 @shwina @jrhemstad

@jakirkham jakirkham requested a review from a team as a code owner August 11, 2020 17:32
@jakirkham jakirkham marked this pull request as draft August 11, 2020 17:32
@GPUtester
Copy link
Contributor

Please update the changelog in order to start CI tests.

View the gpuCI docs here.

@jakirkham jakirkham force-pushed the bld_w_ptds branch 2 times, most recently from 75f826a to 933b1a3 Compare August 20, 2020 21:58
@jakirkham jakirkham changed the title WIP: Build RMM's Python bindings with PTDS Build RMM's Python bindings with PTDS Aug 20, 2020
@jakirkham jakirkham marked this pull request as ready for review August 20, 2020 22:00
@jakirkham jakirkham added 3 - Ready for review Ready for review by team Python Related to RMM Python API labels Aug 20, 2020
Defines `CUDA_API_PER_THREAD_DEFAULT_STREAM` for Setuptools `Extensions`
built by `setup.py`. This should make sure the per-thread default stream
is used by these Python extensions.

https://docs.nvidia.com/cuda/cuda-runtime-api/stream-sync-behavior.html
@jakirkham
Copy link
Member Author

rerun tests

@kkraus14
Copy link
Contributor

We should be careful to test at least cudf with this before merging as well as doing some basic benchmarking to see if the extra synchronization caused by mixing PTDS and legacy default streams cause slowdowns.

Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking merging until I'm confident this is what you really want.

This will force all Python uses of RMM to run with PTDS enabled. Is this what we want by default?

@harrism harrism changed the title Build RMM's Python bindings with PTDS [REVIEW] Build RMM's Python bindings with PTDS Aug 21, 2020
@jakirkham jakirkham changed the base branch from branch-0.16 to branch-0.17 October 2, 2020 21:44
@jakirkham
Copy link
Member Author

cc @pentschev (for vis)

@@ -84,6 +84,10 @@ def get_cuda_version_from_header(cuda_include_dir):
except Exception:
nthreads = 0

define_macros = [
("CUDA_API_PER_THREAD_DEFAULT_STREAM", None),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So does this make this a command line option? How does this work? (Not that familiar with setup.py)

@jakirkham jakirkham changed the title [REVIEW] Build RMM's Python bindings with PTDS [WIP] Build RMM's Python bindings with PTDS Nov 20, 2020
@jakirkham jakirkham added 2 - In Progress Currently a work in progress and removed 3 - Ready for review Ready for review by team labels Nov 20, 2020
@jakirkham jakirkham marked this pull request as draft November 20, 2020 03:02
@jakirkham
Copy link
Member Author

Sorry was updating this based on feedback from Peter earlier. Have marked it as a draft.

@github-actions
Copy link

This PR has been marked stale due to no recent activity in the past 30d. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. This PR will be marked rotten if there is no activity in the next 60d.

@harrism
Copy link
Member

harrism commented Feb 16, 2021

@jakirkham can we close this?

@kkraus14
Copy link
Contributor

I think we want to keep this open as a point of reference, but no action should be taken on it.

@jakirkham
Copy link
Member Author

Ah sorry yeah we can close. I think Peter has PR ( #633 ), which is the successor to this

@harrism
Copy link
Member

harrism commented Feb 17, 2021

Neither is a great option. Closing this one.

@harrism harrism closed this Feb 17, 2021
@jakirkham jakirkham deleted the bld_w_ptds branch February 17, 2021 03:51
@jakirkham
Copy link
Member Author

What do we not like about the other one? Sounds good.

@harrism
Copy link
Member

harrism commented Feb 17, 2021

See the discussion starting here. #633 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - In Progress Currently a work in progress Python Related to RMM Python API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants