Skip to content

Commit

Permalink
Build RMM's Python bindings with PTDS
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jakirkham committed Aug 20, 2020
1 parent ba8fad5 commit e2ee35f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## Improvements

- PR #477 Just use `None` for `strides` in `DeviceBuffer`
- PR #480 Build RMM's Python bindings with PTDS

## Bug Fixes

Expand Down
6 changes: 6 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ def get_cuda_version_from_header(cuda_include_dir):
except Exception:
nthreads = 0

define_macros = [
("CUDA_API_PER_THREAD_DEFAULT_STREAM", None),
]

include_dirs = [
"../include/rmm",
"../include",
Expand Down Expand Up @@ -125,6 +129,7 @@ def get_cuda_version_from_header(cuda_include_dir):
],
libraries=["cuda", "rmm"],
language="c++",
define_macros=define_macros,
extra_compile_args=["-std=c++14"],
)
],
Expand All @@ -148,6 +153,7 @@ def get_cuda_version_from_header(cuda_include_dir):
],
libraries=["cuda", "rmm"],
language="c++",
define_macros=define_macros,
extra_compile_args=["-std=c++14"],
)
],
Expand Down

0 comments on commit e2ee35f

Please sign in to comment.