Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/branch-22.02' into parquet-one…
Browse files Browse the repository at this point in the history
…-level-list
  • Loading branch information
PointKernel committed Dec 9, 2021
2 parents 81c0ae2 + 05c209f commit f626a89
Show file tree
Hide file tree
Showing 7 changed files with 167 additions and 68 deletions.
2 changes: 1 addition & 1 deletion ci/checks/style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LANG=C.UTF-8
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids

FORMAT_FILE_URL=https://raw.githubusercontent.com/rapidsai/rapids-cmake/main/cmake-format-rapids-cmake.json
FORMAT_FILE_URL=https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-21.12/cmake-format-rapids-cmake.json
export RAPIDS_CMAKE_FORMAT_FILE=/tmp/rapids_cmake_ci/cmake-formats-rapids-cmake.json
mkdir -p $(dirname ${RAPIDS_CMAKE_FORMAT_FILE})
wget -O ${RAPIDS_CMAKE_FORMAT_FILE} ${FORMAT_FILE_URL}
Expand Down
3 changes: 2 additions & 1 deletion cpp/cmake/thirdparty/get_dlpack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ function(find_and_configure_dlpack VERSION)
dlpack ${VERSION}
GIT_REPOSITORY https://github.com/dmlc/dlpack.git
GIT_TAG v${VERSION}
GIT_SHALLOW TRUE DOWNLOAD_ONLY TRUE
GIT_SHALLOW TRUE
DOWNLOAD_ONLY TRUE
OPTIONS "BUILD_MOCK OFF"
)

Expand Down
3 changes: 2 additions & 1 deletion cpp/cmake/thirdparty/get_jitify.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ function(find_and_configure_jitify)
jitify 2.0.0
GIT_REPOSITORY https://github.com/rapidsai/jitify.git
GIT_TAG cudf_0.19
GIT_SHALLOW TRUE DOWNLOAD_ONLY TRUE
GIT_SHALLOW TRUE
DOWNLOAD_ONLY TRUE
)
set(JITIFY_INCLUDE_DIR
"${jitify_SOURCE_DIR}"
Expand Down
5 changes: 3 additions & 2 deletions cpp/cmake/thirdparty/get_libcudacxx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ function(find_and_configure_libcudacxx)
include(${rapids-cmake-dir}/cpm/libcudacxx.cmake)

rapids_cpm_libcudacxx(
BUILD_EXPORT_SET cudf-exports INSTALL_EXPORT_SET cudf-exports PATCH_COMMAND patch
--reject-file=- -p1 -N < ${CUDF_SOURCE_DIR}/cmake/libcudacxx.patch || true
BUILD_EXPORT_SET cudf-exports
INSTALL_EXPORT_SET cudf-exports PATCH_COMMAND patch --reject-file=- -p1 -N <
${CUDF_SOURCE_DIR}/cmake/libcudacxx.patch || true
)

set(LIBCUDACXX_INCLUDE_DIR
Expand Down
169 changes: 115 additions & 54 deletions docs/cudf/source/user_guide/10min-cudf-cupy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,23 @@
"name": "stdout",
"output_type": "stream",
"text": [
"44.1 µs ± 689 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)\n",
"209 µs ± 2.77 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n",
"208 µs ± 3.14 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
"158 µs ± 306 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)\n",
"419 µs ± 149 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/opt/conda/envs/rapids/lib/python3.7/site-packages/cudf/core/dataframe.py:3044: FutureWarning: The as_gpu_matrix method will be removed in a future cuDF release. Consider using `to_cupy` instead.\n",
" FutureWarning,\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"339 µs ± 282 ns per loop (mean ± std. dev. of 7 runs, 1000 loops each)\n"
]
}
],
Expand Down Expand Up @@ -117,9 +131,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"22.1 µs ± 518 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)\n",
"58.3 µs ± 647 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)\n",
"80.2 µs ± 647 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)\n"
"45.4 µs ± 63.9 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)\n",
"127 µs ± 351 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)\n",
"135 µs ± 5.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)\n"
]
}
],
Expand Down Expand Up @@ -256,7 +270,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"13.1 ms ± 193 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
"15.5 ms ± 7.55 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
]
}
],
Expand Down Expand Up @@ -510,7 +524,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"4.9 ms ± 26.4 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
"7.26 ms ± 3.32 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
]
}
],
Expand All @@ -530,7 +544,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"5.1 ms ± 23.3 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
"4.87 ms ± 2.08 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
]
}
],
Expand Down Expand Up @@ -1139,135 +1153,135 @@
" <th>0</th>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>4.704433</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.00000</td>\n",
" <td>0.0</td>\n",
" <td>16.822959</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>-1.162275</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.00000</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>11.460403</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>6.618972</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>2.25678</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.407392</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.00000</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>2.715802</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>8.299425</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>4.296568</td>\n",
" <td>0.00000</td>\n",
" <td>2.096401</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>4.865495</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 \\\n",
"0 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.00000 \n",
"1 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.00000 \n",
"2 0.0 0.0 6.618972 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 2.25678 \n",
"3 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.000000 0.00000 \n",
"4 0.0 0.0 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.296568 0.00000 \n",
" a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 \\\n",
"0 0.0 0.0 0.0 0.0 0.0 4.704433 0.0 0.000000 0.0 0.0 0.0 0.000000 \n",
"1 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 \n",
"2 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 \n",
"3 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 \n",
"4 0.0 0.0 0.0 0.0 0.0 0.000000 0.0 8.299425 0.0 0.0 0.0 2.096401 \n",
"\n",
" a12 a13 a14 a15 a16 a17 a18 a19 \n",
"0 0.0 16.822959 0.0 0.000000 0.0 0.0 0.0 0.000000 \n",
"1 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 \n",
"2 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 0.000000 \n",
"3 0.0 0.000000 0.0 2.715802 0.0 0.0 0.0 0.000000 \n",
"4 0.0 0.000000 0.0 0.000000 0.0 0.0 0.0 4.865495 "
" a12 a13 a14 a15 a16 a17 a18 a19 \n",
"0 0.0 0.0 0.000000 0.0 -1.162275 0.000000 0.0 0.0 \n",
"1 0.0 0.0 11.460403 0.0 0.000000 0.000000 0.0 0.0 \n",
"2 0.0 0.0 0.000000 0.0 0.000000 0.407392 0.0 0.0 \n",
"3 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 \n",
"4 0.0 0.0 0.000000 0.0 0.000000 0.000000 0.0 0.0 "
]
},
"execution_count": 20,
Expand All @@ -1285,19 +1299,66 @@
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<cupyx.scipy.sparse.csc.csc_matrix at 0x7f25e49466a0>"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
"name": "stdout",
"output_type": "stream",
"text": [
" (41, 0)\t8.237732918475851\n",
" (49, 0)\t-4.161219849238402\n",
" (70, 0)\t-1.646588718395583\n",
" (80, 0)\t11.607048248828713\n",
" (81, 0)\t11.387095517746493\n",
" (105, 0)\t4.059008225609349\n",
" (107, 0)\t9.299030876304984\n",
" (108, 0)\t10.652087054434446\n",
" (127, 0)\t2.442578989241219\n",
" (133, 0)\t-0.7674141633646347\n",
" (135, 0)\t-6.091151515788713\n",
" (145, 0)\t2.968949150266586\n",
" (148, 0)\t5.649147779687932\n",
" (158, 0)\t7.7809955768930745\n",
" (166, 0)\t5.801884262747882\n",
" (175, 0)\t7.3205065025042\n",
" (181, 0)\t13.704683370645277\n",
" (204, 0)\t15.915619596241733\n",
" (207, 0)\t-0.2205888963107494\n",
" (209, 0)\t3.565578265020142\n",
" (215, 0)\t4.1493767841754154\n",
" (231, 0)\t3.4286524053271803\n",
" (233, 0)\t6.021200022977307\n",
" (241, 0)\t4.247163658236771\n",
" (249, 0)\t1.8502158424149273\n",
" :\t:\n",
" (9729, 19)\t7.226429647432215\n",
" (9762, 19)\t-0.6042314722021014\n",
" (9764, 19)\t-1.4827372788735615\n",
" (9769, 19)\t4.140245505599609\n",
" (9776, 19)\t-0.3441145182655059\n",
" (9781, 19)\t-0.235562982602191\n",
" (9782, 19)\t2.1458765970993223\n",
" (9791, 19)\t7.219427633840467\n",
" (9803, 19)\t6.6874487362355115\n",
" (9807, 19)\t5.1769501512294465\n",
" (9823, 19)\t-1.1040045399744103\n",
" (9828, 19)\t3.074156937033751\n",
" (9849, 19)\t0.4663962936122451\n",
" (9851, 19)\t10.302861735090476\n",
" (9862, 19)\t1.9377857550195872\n",
" (9893, 19)\t8.991541850619656\n",
" (9896, 19)\t-0.9003118390325282\n",
" (9919, 19)\t2.4984693551284587\n",
" (9934, 19)\t1.6161057487404191\n",
" (9944, 19)\t6.063387997554039\n",
" (9945, 19)\t11.038782286791717\n",
" (9954, 19)\t13.750186699958661\n",
" (9979, 19)\t0.9225731640357893\n",
" (9995, 19)\t-1.775155437069923\n",
" (9998, 19)\t12.265785237649636\n"
]
}
],
"source": [
"sparse_data = cudf_to_cupy_sparse_matrix(df)\n",
"sparse_data"
"print(sparse_data)"
]
},
{
Expand Down Expand Up @@ -1326,7 +1387,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
"version": "3.7.12"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit f626a89

Please sign in to comment.