-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rapidsai/import-rmm
Import RMM from cuDF
- Loading branch information
Showing
31 changed files
with
2,466 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: Bug report | ||
about: Create a bug report to help us improve RMM | ||
title: "[BUG]" | ||
labels: "? - Needs Triage, bug" | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**Steps/Code to reproduce bug** | ||
Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly. | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Environment details (please complete the following information):** | ||
- Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)] | ||
- Method of RMM install: [conda, Docker, or from source] | ||
- If method of install is [Docker], provide `docker pull` & `docker run` commands used | ||
- Please run and attach the output of the `rmm/print_env.sh` script to gather relevant environment details | ||
|
||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Documentation request | ||
about: Report incorrect or needed documentation | ||
title: "[DOC]" | ||
labels: "? - Needs Triage, doc" | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Report incorrect documentation | ||
|
||
**Location of incorrect documentation** | ||
Provide links and line numbers if applicable. | ||
|
||
**Describe the problems or issues found in the documentation** | ||
A clear and concise description of what you found to be incorrect. | ||
|
||
**Steps taken to verify documentation is incorrect** | ||
List any steps you have taken. | ||
|
||
**Suggested fix for documentation** | ||
Detail proposed changes to fix the documentation if you have any. | ||
|
||
--- | ||
|
||
## Report needed documentation | ||
|
||
**Report needed documentation** | ||
A clear and concise description of what documentation is needed and why. | ||
|
||
**Steps taken to search for needed documentation** | ||
List any steps you have taken. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for RMM | ||
title: "[FEA]" | ||
labels: "? - Needs Triage, doc" | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I wish I could use RMM to do [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context, code examples, or references to existing implementations about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
name: Submit question | ||
about: Ask a general question about RMM | ||
title: "[QST]" | ||
labels: "? - Needs Triage, question" | ||
assignees: '' | ||
|
||
--- | ||
|
||
**What is your question?** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!-- | ||
Thanks for wanting to contribute to RMM :) Please read these instructions and | ||
replace them with your description. | ||
First, if you need some help or want to chat to the core developers, please | ||
visit https://rapids.ai/community.html for links to our Google Group and other | ||
communication channels. | ||
Here's some guidelines to help the review process go smoothly. | ||
0. Please write a description in this text box of the changes that are being | ||
made. | ||
1. Please ensure that you have written units tests for the changes made and/or | ||
features added. | ||
2. If you are closing an issue please use one of the automatic closing words as | ||
noted here: https://help.github.com/articles/closing-issues-using-keywords/ | ||
3. If your pull request is not ready for review but you want to make use of the | ||
continuous integration testing facilities please label it with `[WIP]`. | ||
4. If your pull request is ready to be reviewed without requiring additional | ||
work on top of it, then remove the `[WIP]` label (if present) and replace | ||
it with `[REVIEW]`. If assistance is required to complete the functionality, | ||
for example when the C/C++ code of a feature is complete but Python bindings | ||
are still required, then add the label `[HELP-REQ]` so that others can triage | ||
and assist. The additional changes then can be implemented on top of the | ||
same PR. If the assistance is done by members of the rapidsAI team, then no | ||
additional actions are required by the creator of the original PR for this, | ||
otherwise the original author of the PR needs to give permission to the | ||
person(s) assisting to commit to their personal fork of the project. If that | ||
doesn't happen then a new PR based on the code of the original PR can be | ||
opened by the person assisting, which then will be the PR that will be | ||
merged. | ||
5. Once all work has been done and review has taken place please do not add | ||
features or make changes out of the scope of those requested by the reviewer | ||
(doing this just adds delays as already reviewed code ends up having to be | ||
re-reviewed/it is hard to tell what is new etc!). Further, please do not | ||
rebase your branch on master/force push/rewrite history, doing any of these | ||
causes the context of any comments made by reviewers to be lost. If | ||
conflicts occur against the release or master branch they should be resolved | ||
by merging master into the branch used for making the pull request. | ||
Many thanks in advance for your cooperation! | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,36 @@ | ||
*.i | ||
*.ii | ||
*.gpu | ||
*.ptx | ||
*.cubin | ||
*.fatbin | ||
## common | ||
__pycache__ | ||
*.pyc | ||
*.a | ||
*.o | ||
*.so | ||
*.dylib | ||
.cache | ||
.coverage | ||
.vscode | ||
*.swp | ||
*.pytest_cache | ||
DartConfiguration.tcl | ||
.DS_Store | ||
|
||
##build | ||
htmlcov | ||
dist/ | ||
cudf.egg-info/ | ||
python/build | ||
python/bindings/*.cpp | ||
|
||
## Patching | ||
*.diff | ||
*.orig | ||
*.rej | ||
|
||
CMakeFiles/ | ||
Debug | ||
build/ | ||
python/librmm_cffi/librmm_cffi.py | ||
|
||
## Eclipse IDE | ||
.project | ||
.cproject | ||
.settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "thirdparty/cnmem"] | ||
path = thirdparty/cnmem | ||
url = [email protected]:NVIDIA/cnmem.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# RMM 0.5.0 (Date TBD) | ||
|
||
## New Features | ||
|
||
- PR #1: Spun off RMM from cuDF into its own repository. | ||
|
||
## Improvements | ||
|
||
- CUDF PR #472 RMM: Created centralized rmm::device_vector alias and rmm::exec_policy | ||
- CUDF PR #465 Added templated C++ API for RMM to avoid explicit cast to `void**` | ||
|
||
RMM was initially implemented as part of cuDF, so we include the relevant changelog history below. | ||
|
||
# cuDF 0.4.0 (05 Dec 2018) | ||
|
||
## New Features | ||
|
||
## Improvements | ||
|
||
## Bug Fixes | ||
|
||
|
||
# cuDF 0.3.0 (23 Nov 2018) | ||
|
||
## New Features | ||
|
||
- PR #336 CSV Reader string support | ||
|
||
## Improvements | ||
|
||
- CUDF PR #333 Add Rapids Memory Manager documentation | ||
- CUDF PR #321 Rapids Memory Manager adds file/line location logging and convenience macros | ||
|
||
## Bug Fixes | ||
|
||
|
||
# cuDF 0.2.0 and cuDF 0.1.0 | ||
|
||
These were initial releases of cuDF based on previously separate pyGDF and libGDF libraries. RMM was initially implemented as part of libGDF. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
#============================================================================= | ||
# Copyright (c) 2018, NVIDIA CORPORATION. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
#============================================================================= | ||
cmake_minimum_required(VERSION 3.12 FATAL_ERROR) | ||
|
||
project(RMM VERSION 0.4.0 LANGUAGES C CXX CUDA) | ||
|
||
################################################################################################### | ||
# - compiler options ------------------------------------------------------------------------------ | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_C_COMPILER $ENV{CC}) | ||
set(CMAKE_CXX_COMPILER $ENV{CXX}) | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") | ||
endif(CMAKE_COMPILER_IS_GNUCXX) | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0") | ||
|
||
# set default build type | ||
set(CMAKE_BUILD_TYPE "Release") | ||
|
||
option(BUILD_TESTS "Configure CMake to build tests" | ||
ON) | ||
|
||
################################################################################################### | ||
# - cmake modules --------------------------------------------------------------------------------- | ||
|
||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH}) | ||
|
||
include(FeatureSummary) | ||
include(CheckIncludeFiles) | ||
include(CheckLibraryExists) | ||
|
||
################################################################################################### | ||
# - add gtest ------------------------------------------------------------------------------------- | ||
|
||
if(BUILD_TESTS) | ||
include(CTest) | ||
include(ConfigureGoogleTest) | ||
|
||
if(GTEST_FOUND) | ||
message(STATUS "Google C++ Testing Framework (Google Test) found in ${GTEST_ROOT}") | ||
include_directories(${GTEST_INCLUDE_DIR}) | ||
add_subdirectory(${CMAKE_SOURCE_DIR}/tests) | ||
else() | ||
message(AUTHOR_WARNING "Google C++ Testing Framework (Google Test) not found: automated tests are disabled.") | ||
endif(GTEST_FOUND) | ||
endif(BUILD_TESTS) | ||
|
||
################################################################################################### | ||
# - include paths --------------------------------------------------------------------------------- | ||
|
||
include_directories("${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}" | ||
"${CMAKE_SOURCE_DIR}/include" | ||
"${CMAKE_SOURCE_DIR}/src" | ||
"${CMAKE_SOURCE_DIR}/thirdparty/cnmem/include") | ||
|
||
################################################################################################### | ||
# - library paths --------------------------------------------------------------------------------- | ||
|
||
link_directories("${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}" # CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES is an undocumented/unsupported variable containing the link directories for nvcc | ||
"${CMAKE_BINARY_DIR}/lib" | ||
"${GTEST_LIBRARY_DIR}") | ||
|
||
################################################################################################### | ||
# - library targets ------------------------------------------------------------------------------- | ||
|
||
add_library(rmm SHARED | ||
src/memory.cpp | ||
src/memory_manager.cpp | ||
thirdparty/cnmem/src/cnmem.cpp) | ||
|
||
################################################################################################### | ||
# - build options --------------------------------------------------------------------------------- | ||
|
||
option(USE_NVTX "Build with NVTX support" ON) | ||
if(USE_NVTX) | ||
message(STATUS "Using Nvidia Tools Extension") | ||
find_library(NVTX_LIBRARY nvToolsExt PATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}) | ||
target_link_libraries(rmm ${NVTX_LIBRARY}) | ||
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --define-macro USE_NVTX") | ||
endif(USE_NVTX) | ||
|
||
################################################################################################### | ||
# - link libraries -------------------------------------------------------------------------------- | ||
|
||
target_link_libraries(rmm cudart cuda) | ||
|
||
################################################################################################### | ||
# - python cffi bindings -------------------------------------------------------------------------- | ||
|
||
add_custom_command(OUTPUT PYTHON_CFFI | ||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/../python ${CMAKE_BINARY_DIR}/python | ||
COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/python python setup.py build_ext --inplace | ||
VERBATIM) | ||
|
||
add_custom_target(python_cffi DEPENDS rmm PYTHON_CFFI) | ||
|
||
################################################################################################### | ||
# - install targets ------------------------------------------------------------------------------- | ||
|
||
install(TARGETS rmm | ||
DESTINATION lib) | ||
|
||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include | ||
DESTINATION include) | ||
|
||
add_custom_command(OUTPUT INSTALL_PYTHON_CFFI | ||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/python python setup.py install --single-version-externally-managed --record=record.txt | ||
VERBATIM) | ||
|
||
add_custom_target(install_python DEPENDS rmm PYTHON_CFFI INSTALL_PYTHON_CFFI) | ||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.