From c68aca550312ff4ad21496ce249c6f51bd50d04e Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Thu, 30 Mar 2023 15:37:48 -0700 Subject: [PATCH 1/6] Add note --- .../user_guide/performance_comparisons.ipynb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/cudf/source/user_guide/performance_comparisons.ipynb b/docs/cudf/source/user_guide/performance_comparisons.ipynb index 3dd671c37cc..f07e5ce72ed 100644 --- a/docs/cudf/source/user_guide/performance_comparisons.ipynb +++ b/docs/cudf/source/user_guide/performance_comparisons.ipynb @@ -8,13 +8,16 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "This notebook compares the performance of `cuDF` and `pandas`. The comparisons performed are on identical data sizes. This notebook primarily showcases the factor\n", "of speedups users can have when the similar `pandas` APIs are run on GPUs using `cudf`.\n", "\n", - "The hardware details used to run these performance comparisons are at the end of this page." + "The hardware details used to run these performance comparisons are at the end of this page.\n", + "\n", + "**Note**: This notebook is written to measure performance on modern NVIDIA hardware, for older NVIDIA hardware with lower GPU memory please consider lowering the `num_rows` values below by a factor of 2." ] }, { @@ -576,9 +579,10 @@ }, "outputs": [], "source": [ + "num_rows = 300_000_000\n", "pd_series = pd.Series(\n", " np.random.choice(\n", - " [\"123\", \"56.234\", \"Walmart\", \"Costco\", \"rapids ai\"], size=300_000_000\n", + " [\"123\", \"56.234\", \"Walmart\", \"Costco\", \"rapids ai\"], size=num_rows\n", " )\n", ")" ] @@ -1368,10 +1372,10 @@ }, "outputs": [], "source": [ - "size = 100_000_000\n", + "num_rows = 100_000_000\n", "pdf = pd.DataFrame()\n", - "pdf[\"key\"] = np.random.randint(0, 2, size)\n", - "pdf[\"val\"] = np.random.randint(0, 7, size)\n", + "pdf[\"key\"] = np.random.randint(0, 2, num_rows)\n", + "pdf[\"val\"] = np.random.randint(0, 7, num_rows)\n", "\n", "\n", "def custom_formula_udf(df):\n", @@ -1634,7 +1638,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.9" + "version": "3.10.10" }, "vscode": { "interpreter": { From 0de30cb7fd9c4d35cc7b1a438acd00b254249da6 Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Thu, 30 Mar 2023 15:38:57 -0700 Subject: [PATCH 2/6] more updates --- docs/cudf/source/user_guide/performance_comparisons.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cudf/source/user_guide/performance_comparisons.ipynb b/docs/cudf/source/user_guide/performance_comparisons.ipynb index f07e5ce72ed..19f4eb45d71 100644 --- a/docs/cudf/source/user_guide/performance_comparisons.ipynb +++ b/docs/cudf/source/user_guide/performance_comparisons.ipynb @@ -17,7 +17,7 @@ "\n", "The hardware details used to run these performance comparisons are at the end of this page.\n", "\n", - "**Note**: This notebook is written to measure performance on modern NVIDIA hardware, for older NVIDIA hardware with lower GPU memory please consider lowering the `num_rows` values below by a factor of 2." + "**Note**: This notebook is written to measure performance on modern NVIDIA hardware, for older NVIDIA hardware with lower GPU memory please consider lowering the `num_rows` values below by a factor of 2. Results may vary by data sizes, CPU & GPU used." ] }, { From 79ab5693ee3ccc00db01006e07c6721491efe86d Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Fri, 31 Mar 2023 11:09:20 -0700 Subject: [PATCH 3/6] move --- ci/test_notebooks.sh | 2 +- docs/cudf/source/user_guide/index.md | 2 +- .../source/user_guide/performance_comparisons/index.md | 8 ++++++++ .../performance-comparisons.ipynb} | 0 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 docs/cudf/source/user_guide/performance_comparisons/index.md rename docs/cudf/source/user_guide/{performance_comparisons.ipynb => performance_comparisons/performance-comparisons.ipynb} (100%) diff --git a/ci/test_notebooks.sh b/ci/test_notebooks.sh index c9dc99733a9..348428fdef1 100755 --- a/ci/test_notebooks.sh +++ b/ci/test_notebooks.sh @@ -34,7 +34,7 @@ pushd notebooks # Add notebooks that should be skipped here # (space-separated list of filenames without paths) -SKIPNBS="performance_comparisons.ipynb" +SKIPNBS="performance-comparisons.ipynb" EXITCODE=0 trap "EXITCODE=1" ERR diff --git a/docs/cudf/source/user_guide/index.md b/docs/cudf/source/user_guide/index.md index 0d74586e7a8..e73d6f2fa6a 100644 --- a/docs/cudf/source/user_guide/index.md +++ b/docs/cudf/source/user_guide/index.md @@ -12,7 +12,7 @@ groupby guide-to-udfs cupy-interop options -performance-comparisons +performance_comparisons/index PandasCompat copy-on-write ``` diff --git a/docs/cudf/source/user_guide/performance_comparisons/index.md b/docs/cudf/source/user_guide/performance_comparisons/index.md new file mode 100644 index 00000000000..9390fa64e9c --- /dev/null +++ b/docs/cudf/source/user_guide/performance_comparisons/index.md @@ -0,0 +1,8 @@ +# Performance comparisons + +```{toctree} +:maxdepth: 2 + + +performance-comparisons +``` diff --git a/docs/cudf/source/user_guide/performance_comparisons.ipynb b/docs/cudf/source/user_guide/performance_comparisons/performance-comparisons.ipynb similarity index 100% rename from docs/cudf/source/user_guide/performance_comparisons.ipynb rename to docs/cudf/source/user_guide/performance_comparisons/performance-comparisons.ipynb From 9baf74f10a1c549daff846e8043f1713d778d5ee Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Fri, 31 Mar 2023 11:11:10 -0700 Subject: [PATCH 4/6] update symlink --- notebooks/performance_comparisons | 1 + notebooks/performance_comparisons.ipynb | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 120000 notebooks/performance_comparisons delete mode 120000 notebooks/performance_comparisons.ipynb diff --git a/notebooks/performance_comparisons b/notebooks/performance_comparisons new file mode 120000 index 00000000000..6c78f38c8d4 --- /dev/null +++ b/notebooks/performance_comparisons @@ -0,0 +1 @@ +../docs/cudf/source/user_guide/performance_comparisons/ \ No newline at end of file diff --git a/notebooks/performance_comparisons.ipynb b/notebooks/performance_comparisons.ipynb deleted file mode 120000 index 68c8aa19eee..00000000000 --- a/notebooks/performance_comparisons.ipynb +++ /dev/null @@ -1 +0,0 @@ -../docs/cudf/source/user_guide/performance_comparisons.ipynb \ No newline at end of file From ac91c7caf206ae652d7547bfe19c4b18fd8043ad Mon Sep 17 00:00:00 2001 From: GALI PREM SAGAR Date: Fri, 31 Mar 2023 13:19:55 -0500 Subject: [PATCH 5/6] Update docs/cudf/source/user_guide/performance_comparisons/performance-comparisons.ipynb Co-authored-by: Bradley Dice --- .../performance_comparisons/performance-comparisons.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cudf/source/user_guide/performance_comparisons/performance-comparisons.ipynb b/docs/cudf/source/user_guide/performance_comparisons/performance-comparisons.ipynb index 19f4eb45d71..d06c720494e 100644 --- a/docs/cudf/source/user_guide/performance_comparisons/performance-comparisons.ipynb +++ b/docs/cudf/source/user_guide/performance_comparisons/performance-comparisons.ipynb @@ -17,7 +17,7 @@ "\n", "The hardware details used to run these performance comparisons are at the end of this page.\n", "\n", - "**Note**: This notebook is written to measure performance on modern NVIDIA hardware, for older NVIDIA hardware with lower GPU memory please consider lowering the `num_rows` values below by a factor of 2. Results may vary by data sizes, CPU & GPU used." + "**Note**: This notebook is written to measure performance on NVIDIA GPUs with large memory. If running on hardware with lower memory, please consider lowering the `num_rows` values. Performance results may vary by data size, as well as the CPU and GPU used." ] }, { From 1e29ce3a5296da944d5574ed695350cb8f6660e9 Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Fri, 31 Mar 2023 11:29:12 -0700 Subject: [PATCH 6/6] update typo --- docs/cudf/source/user_guide/index.md | 2 +- .../index.md | 0 .../performance-comparisons.ipynb | 0 notebooks/performance-comparisons | 1 + notebooks/performance_comparisons | 1 - 5 files changed, 2 insertions(+), 2 deletions(-) rename docs/cudf/source/user_guide/{performance_comparisons => performance-comparisons}/index.md (100%) rename docs/cudf/source/user_guide/{performance_comparisons => performance-comparisons}/performance-comparisons.ipynb (100%) create mode 120000 notebooks/performance-comparisons delete mode 120000 notebooks/performance_comparisons diff --git a/docs/cudf/source/user_guide/index.md b/docs/cudf/source/user_guide/index.md index e73d6f2fa6a..58b1b4eed81 100644 --- a/docs/cudf/source/user_guide/index.md +++ b/docs/cudf/source/user_guide/index.md @@ -12,7 +12,7 @@ groupby guide-to-udfs cupy-interop options -performance_comparisons/index +performance-comparisons/index PandasCompat copy-on-write ``` diff --git a/docs/cudf/source/user_guide/performance_comparisons/index.md b/docs/cudf/source/user_guide/performance-comparisons/index.md similarity index 100% rename from docs/cudf/source/user_guide/performance_comparisons/index.md rename to docs/cudf/source/user_guide/performance-comparisons/index.md diff --git a/docs/cudf/source/user_guide/performance_comparisons/performance-comparisons.ipynb b/docs/cudf/source/user_guide/performance-comparisons/performance-comparisons.ipynb similarity index 100% rename from docs/cudf/source/user_guide/performance_comparisons/performance-comparisons.ipynb rename to docs/cudf/source/user_guide/performance-comparisons/performance-comparisons.ipynb diff --git a/notebooks/performance-comparisons b/notebooks/performance-comparisons new file mode 120000 index 00000000000..10be3bcf983 --- /dev/null +++ b/notebooks/performance-comparisons @@ -0,0 +1 @@ +../docs/cudf/source/user_guide/performance-comparisons/ \ No newline at end of file diff --git a/notebooks/performance_comparisons b/notebooks/performance_comparisons deleted file mode 120000 index 6c78f38c8d4..00000000000 --- a/notebooks/performance_comparisons +++ /dev/null @@ -1 +0,0 @@ -../docs/cudf/source/user_guide/performance_comparisons/ \ No newline at end of file