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

[REVIEW][FEA] Port nvtx.pyx to use non-legacy libcudf APIs #4235

Merged
merged 45 commits into from
Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
bc16dc8
initial commit for libcudf++ nvtx.pyx
Feb 22, 2020
3afc2a6
initial commit for libcudf++ nvtx.pyx
Feb 22, 2020
cf409c7
style fix and CHANGELOG
Feb 22, 2020
f24d6a4
initial commit for libcudf++ nvtx.pyx
Feb 22, 2020
eb2cbfb
Merge branch 'branch-0.13' of https://github.com/rapidsai/cudf into f…
Feb 26, 2020
a622c3a
Merge branch 'branch-0.13' of https://github.com/rapidsai/cudf into f…
Feb 27, 2020
031f347
Merge branch 'branch-0.13' of https://github.com/rapidsai/cudf into f…
Mar 5, 2020
92cdee2
correct enum handling for nvtx
Mar 5, 2020
eac8fcd
style check
Mar 5, 2020
9a37846
uncommenting special color references
Mar 5, 2020
fe4c688
addressing some of the comments on the PR
Mar 5, 2020
28207e2
style fix
Mar 5, 2020
3e72f38
fumblight through typecasting
Mar 10, 2020
264a45b
Merge branch 'branch-0.13' of https://github.com/rapidsai/cudf into f…
Mar 11, 2020
a0355b6
still fumbling through Enum types for nvtx
Mar 11, 2020
c508a62
More fumbling with nvtx enums
Mar 11, 2020
cad9ea1
nvtx libcudf++ solution
Mar 11, 2020
b8c275d
style fix
Mar 11, 2020
210cecb
Merge branch 'branch-0.13' of https://github.com/rapidsai/cudf into f…
Mar 11, 2020
716370e
adding custom hex support for nvtx
Mar 11, 2020
238e07f
style fix
Mar 11, 2020
a4a9540
style fix
Mar 11, 2020
39c0dcb
updated all instances of python nvtx to use libcudf++ nvtx
Mar 11, 2020
56952f1
Merge branch 'branch-0.13' of https://github.com/rapidsai/cudf into f…
Mar 11, 2020
8ee8954
style fixes
Mar 11, 2020
99e6a3c
hidden legacy nvtx.range_pop
Mar 11, 2020
b895537
Update python/cudf/cudf/_libxx/nvtx.pyx
millerhooks Mar 12, 2020
90c05eb
Update python/cudf/cudf/_libxx/cpp/nvtx.pxd
millerhooks Mar 12, 2020
4beaa06
Merge branch 'branch-0.13' of https://github.com/rapidsai/cudf into f…
Mar 12, 2020
4e3b0d1
moving nvtx utils
Mar 12, 2020
1876d6f
added utilities init.py.
Mar 12, 2020
91621b4
Merge branch 'branch-0.13' into fea-cython-nvtx
millerhooks Mar 12, 2020
b8c1b8e
Update python/cudf/cudf/_libxx/nvtx.pyx
millerhooks Mar 12, 2020
f4f0b4e
nvtx name encoding safety
Mar 12, 2020
b57ff3e
Merge branch 'fea-cython-nvtx' of github.com:millerhooks/cudf into fe…
Mar 12, 2020
52f34db
Merge branch 'branch-0.13' of https://github.com/rapidsai/cudf into f…
Mar 12, 2020
645e88c
style fix
Mar 12, 2020
d0b7f50
utilities directory nvtx file organization
Mar 12, 2020
242dbb9
copyright 2020
Mar 12, 2020
5091225
Update python/cudf/cudf/_libxx/cpp/utilities/nvtx_utils.pxd
millerhooks Mar 13, 2020
edfb90f
Merge branch 'branch-0.13' into fea-cython-nvtx
Mar 17, 2020
366ab78
fix location of underlying type definition
Mar 17, 2020
d36de09
style
Mar 17, 2020
195e544
remove unused utilities from init
Mar 17, 2020
5e7b079
fix bad imports
Mar 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 2 additions & 57 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,19 @@
## New Features

- PR #3577 Add initial dictionary support to column classes
- PR #3917 Add dictionary add_keys function
millerhooks marked this conversation as resolved.
Show resolved Hide resolved
- PR #3777 Add support for dictionary column in gather
- PR #3693 add string support, skipna to scan operation
- PR #3662 Define and implement `shift`.
- PR #3842 ORC writer: add support for column statistics
- PR #3861 Added Series.sum feature for String
- PR #4069 Added cast of numeric columns from/to String
- PR #3681 Add cudf::experimental::boolean_mask_scatter
- PR #4088 Added asString() on ColumnVector in Java that takes a format string
- PR #4040 Add support for n-way merge of sorted tables
- PR #4053 Multi-column quantiles.
- PR #4107 Add groupby nunique aggregation
- PR #4153 Support Dask serialization protocol on cuDF objects
- PR #4164 Add Buffer "constructor-kwargs" header
- PR #4159 Add COUNT aggregation that includes null values
- PR #4190 Add libcudf++ transpose Cython implementation
- PR #4216 Add cudf.Scalar Python type
- PR #4235 Port nvtx.pyx to use non-legacy libcudf APIs

## Improvements

- PR #4187 exposed getNativeView method in Java bindings
- PR #3525 build.sh option to disable nvtx
- PR #3748 Optimize hash_partition using shared memory
- PR #3808 Optimize hash_partition using shared memory and cub block scan
Expand All @@ -38,18 +30,14 @@
- PR #3911 Adding null boolean handling for copy_if_else
- PR #4003 Drop old `to_device` utility wrapper function
- PR #4002 Adding to_frame and fix for categorical column issue
- PR #4035 Port NVText tokenize function to libcudf++
- PR #4009 build script update to enable cudf build without installing
- PR #3897 Port cuIO JSON reader to cudf::column types
- PR #4008 Eliminate extra copy in column constructor
- PR #4013 Add cython definition for io readers cudf/io/io_types.hpp
- PR #4014 ORC/Parquet: add count parameter to stripe/rowgroup-based reader API
- PR #4042 Port cudf/io/functions.hpp to Cython for use in IO bindings
- PR #3880 Add aggregation infrastructure support for reduction
- PR #3880 Add aggregation infrastructure support for cudf::reduce
- PR #4059 Add aggregation infrastructure support for cudf::scan
- PR #4059 Add aggregation infrastructure support for cudf::scan
- PR #4021 Change quantiles signature for clarity.
- PR #4058 Port hash.pyx to use libcudf++ APIs
- PR #4057 Handle offsets in cython Column class
- PR #4045 Reorganize `libxx` directory
- PR #4029 Port stream_compaction.pyx to use libcudf++ APIs
Expand All @@ -61,8 +49,6 @@
- PR #3891 Port NVStrings (r)split_record to contiguous_(r)split_record
- PR #4072 Allow round_robin_partition to single partition
- PR #4064 Add cudaGetDeviceCount to JNI layer
- PR #4087 Add support for writing large Parquet files in a chunked manner.
- PR #3716 Update cudf.to_parquet to use new GPU accelerated Parquet writer
- PR #4083 Use two partitions in test_groupby_multiindex_reset_index
- PR #4071 Add Java bindings for round robin partition
- PR #4079 Simply use `mask.size` to create the array view
Expand All @@ -72,28 +58,7 @@
- PR #4101 Redux serialize `Buffer` directly with `__cuda_array_interface__`
- PR #4098 Remove legacy calls from libcudf strings column code
- PR #4111 Use `Buffer`'s to serialize `StringColumn`
- PR #4133 Mask cleanup and fixes: use `int32` dtype, ensure 64 byte padding, handle offsets
- PR #4113 Get `len` of `StringColumn`s without `nvstrings`
- PR #4147 Remove workaround for UNKNOWN_NULL_COUNT in contiguous_split.
- PR #4130 Renames in-place `cudf::experimental::fill` to `cudf::experimental::fill_in_place`
- PR #4136 Add `Index.names` property
- PR #4139 Port rolling.pyx to new libcudf APIs
- PR #4143 Renames in-place `cudf::experimental::copy_range` to `cudf::experimental::copy_range_in_place`
- PR #4144 Release GIL when calling libcudf++ functions
- PR #4082 Rework MultiColumns in cuDF
- PR #4149 Use "type-serialized" for pickled types like Dask
- PR #4167 Port `search` to libcudf++ (support multi-column searchsorted)
- PR #4163 Assert Dask CUDA serializers have `Buffer` frames
- PR #4165 List serializable classes once
- PR #4168 IO readers: do not create null mask for non-nullable columns
- PR #4177 Use `uint8` type for host array copy of `Buffer`
- PR #4183 Update Google Test Execution
- PR #4182 Rename cuDF serialize functions to be more generic
- PR #4176 Add option to parallelize setup.py's cythonize
- PR #4191 Porting sort.pyx to use new libcudf APIs
- PR #4196 reduce CHANGELOG.md merge conflicts
- PR #4197 Added notebook testing to gpuCI gpu build
- PR #4225 Remove stale notebooks

## Bug Fixes

Expand Down Expand Up @@ -124,30 +89,10 @@
- PR #4089 Fix dask groupby mutliindex test case issues in join
- PR #4097 Fix strings concatenate logic with column offsets
- PR #4076 All null string entries should have null data buffer
- PR #4145 Support empty index case in DataFrame._from_table
- PR #4109 Use rmm::device_vector instead of thrust::device_vector
- PR #4113 Use `.nvstrings` in `StringColumn.sum(...)`
- PR #4116 Fix a bug in contiguous_split() where tables with mixed column types could corrupt string output
- PR #4108 Fix dtype bugs in dask_cudf metadata (metadata_nonempty overhaul)
- PR #4138 Really fix strings concatenate logic with column offsets
- PR #4119 Fix binary ops slowdown using jitify -remove-unused-globals
- PR #4125 Fix type enum to account for added Dictionary type in `types.hpp`
- PR #4132 Fix `hash_partition` null mask allocation
- PR #4137 Update Java for mutating fill and rolling window changes
- PR #4184 Add missing except+ to Cython bindings
- PR #4141 Fix NVStrings test_convert failure in 10.2 build
- PR #4158 Fix merge issue with empty table return if one of the two tables are empty
- PR #4162 Properly handle no index metadata generation for to_parquet
- PR #4175 Fix `__sizeof__` calculation in `StringColumn`
- PR #4155 Update groupby group_offsets size and fix unnecessary device dispatch.
- PR #4186 Fix from_timestamps 12-hour specifiers support
- PR #4198 Fix constructing `RangeIndex` from `range`
- PR #4192 Parquet writer: fix OOB read when computing string hash
- PR #4201 Fix java window tests
- PR #4199 Fix potential race condition in memcpy_block
- PR #4218 Fix `get_aggreagtion` definition with `except *`
- PR #4215 Fix performance regression in strings::detail::concatenate
- PR #4214 Alter ValueError exception for GPU accelerated Parquet writer to properly report `categorical` columns are not supported.


# cuDF 0.12.0 (04 Feb 2020)
Expand Down
38 changes: 38 additions & 0 deletions python/cudf/cudf/_libxx/nvtx.pyx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright (c) 2020, NVIDIA CORPORATION.

# cython: profile=False
# distutils: language = c++
# cython: embedsignature = True
# cython: language_level = 3

from cudf._libxx.lib cimport *
from cudf._libxx.lib import *


def range_push(name, color='green'):
millerhooks marked this conversation as resolved.
Show resolved Hide resolved
"""
Demarcate the beginning of a user-defined NVTX range.

Parameters
----------
name : str
The name of the NVTX range
color : str
The color to use for the range.
Can be named color or hex RGB string.
"""
name = name.encode('ascii')
millerhooks marked this conversation as resolved.
Show resolved Hide resolved
try:
color = int(color, 16)
result = range_push_hex(name, color)
millerhooks marked this conversation as resolved.
Show resolved Hide resolved
except ValueError:
result = range_push(name, color)
millerhooks marked this conversation as resolved.
Show resolved Hide resolved
check_gdf_error(result)
millerhooks marked this conversation as resolved.
Show resolved Hide resolved


def range_pop():
"""
Demarcate the end of a user-defined NVTX range.
"""
result = range_pop()
millerhooks marked this conversation as resolved.
Show resolved Hide resolved
check_gdf_error(result)
millerhooks marked this conversation as resolved.
Show resolved Hide resolved