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

Develop #24

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file not shown.
66 changes: 53 additions & 13 deletions examples/strong_scaling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 122,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -54,16 +54,16 @@
},
{
"cell_type": "code",
"execution_count": 126,
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/System/Library/Fonts/Avenir.ttc\n",
"/System/Library/Fonts/Avenir Next.ttc\n",
"/System/Library/Fonts/Avenir Next Condensed.ttc\n",
"/System/Library/Fonts/Avenir.ttc\n"
"/System/Library/Fonts/Avenir Next Condensed.ttc\n"
]
}
],
Expand All @@ -85,6 +85,14 @@
" # font_manager.fontManager.ttflist.extend(fontpath)\n",
" plt.rcParams[\"font.family\"] = \"Avenir\"\n",
"\n",
"# Set font sizes globally\n",
"plt.rcParams[\"font.size\"] = 24\n",
"plt.rcParams[\"axes.titlesize\"] = 24\n",
"plt.rcParams[\"axes.labelsize\"] = 18\n",
"plt.rcParams[\"xtick.labelsize\"] = 16\n",
"plt.rcParams[\"ytick.labelsize\"] = 16\n",
"plt.rcParams[\"legend.fontsize\"] = 16\n",
"\n",
"\n",
"def ideal_scaling(x_values: list[Any], y0: float) -> list[Any]:\n",
" \"\"\"\n",
Expand All @@ -111,7 +119,12 @@
" # plt.rcParams[\"font.family\"] = \"Avenir Regular\"\n",
" plt.rcParams[\"font.size\"] = 14\n",
" markers = [\"o\", \"s\", \"d\", \"p\", \"*\", \"v\", \"^\", \"<\"]\n",
" colors = [\"mediumpurple\", \"cornflowerblue\", \"mediumaquamarine\", \"lightcoral\"]\n",
" colors = [\n",
" \"mediumpurple\",\n",
" \"cornflowerblue\",\n",
" \"mediumaquamarine\",\n",
" \"lightcoral\",\n",
" ]\n",
" fig, ax = plt.subplots(figsize=(8, 6))\n",
" for x, y, label, marker, color in zip(x_values, y_values, labels, markers, colors):\n",
" ax.plot(x, y, label=label, marker=marker, color=color)\n",
Expand Down Expand Up @@ -494,18 +507,27 @@
"sunspot_ngpus = [1 * 12, 4 * 12, 16 * 12, 32 * 12, 96 * 12]\n",
"\n",
"x_values = [polaris_ngpus, sunspot_ngpus]\n",
"y_values = [polaris_semantic_chunking_throughput, sunspot_semantic_chunking_throughput]\n",
"y_values = [\n",
" polaris_semantic_chunking_throughput,\n",
" sunspot_semantic_chunking_throughput,\n",
"]\n",
"labels = [\"Polaris Semantic Chunking\", \"Sunspot Semantic Chunking\"]\n",
"image_name = \"scaling_relations_semantic_chunking.pdf\"\n",
"plot_scaling_relations(x_values, y_values, labels, image_name)\n",
"\n",
"print(\"Polaris Semantic Chunking Throughput:\", polaris_semantic_chunking_throughput)\n",
"print(\"Sunspot Semantic Chunking Throughput:\", sunspot_semantic_chunking_throughput)"
"print(\n",
" \"Polaris Semantic Chunking Throughput:\",\n",
" polaris_semantic_chunking_throughput,\n",
")\n",
"print(\n",
" \"Sunspot Semantic Chunking Throughput:\",\n",
" sunspot_semantic_chunking_throughput,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 128,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1061,7 +1083,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/var/folders/74/4jdnr7zn79q0h8cj7fy26vjm0000gn/T/ipykernel_47408/3899384454.py:66: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown\n",
"/var/folders/74/4jdnr7zn79q0h8cj7fy26vjm0000gn/T/ipykernel_62422/4207717623.py:83: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown\n",
" plt.show()\n"
]
}
Expand Down Expand Up @@ -1120,7 +1142,16 @@
"\n",
"polaris_oreo_ngpus = [2 * 4, 32 * 4, 64 * 4, 128 * 4, 256 * 4]\n",
"polaris_nougat_ngpus = [2 * 4, 32 * 4, 64 * 4, 128 * 4, 256 * 4]\n",
"sunspot_ngpus = [1 * 12, 2 * 12, 4 * 12, 8 * 12, 16 * 12, 32 * 12, 64 * 12, 96 * 12]\n",
"sunspot_ngpus = [\n",
" 1 * 12,\n",
" 2 * 12,\n",
" 4 * 12,\n",
" 8 * 12,\n",
" 16 * 12,\n",
" 32 * 12,\n",
" 64 * 12,\n",
" 96 * 12,\n",
"]\n",
"\n",
"x_values = [polaris_oreo_ngpus, polaris_nougat_ngpus, sunspot_ngpus]\n",
"y_values = [\n",
Expand All @@ -1129,7 +1160,7 @@
" sunspot_nougat_throughput,\n",
"]\n",
"labels = [\"Polaris Oreo\", \"Polaris Nougat\", \"Sunspot Nougat\"]\n",
"image_name = \"scaling_relations_pdfparsing.pdf\"\n",
"image_name = \"scaling_relations_pdfparsing-big-font.pdf\"\n",
"plot_scaling_relations(x_values, y_values, labels, image_name)\n",
"\n",
"print(\"Polaris Oreo Throughout: \", polaris_oreo_throughput)\n",
Expand Down Expand Up @@ -1304,7 +1335,16 @@
],
"source": [
"polaris_nougat_ngpus = [2 * 4, 32 * 4, 64 * 4, 128 * 4, 256 * 4]\n",
"sunspot_ngpus = [1 * 12, 2 * 12, 4 * 12, 8 * 12, 16 * 12, 32 * 12, 64 * 12, 96 * 12]\n",
"sunspot_ngpus = [\n",
" 1 * 12,\n",
" 2 * 12,\n",
" 4 * 12,\n",
" 8 * 12,\n",
" 16 * 12,\n",
" 32 * 12,\n",
" 64 * 12,\n",
" 96 * 12,\n",
"]\n",
"\n",
"print(\"Polaris Accelerators\", polaris_nougat_ngpus)\n",
"print(\"Sunspot Accelerators\", sunspot_ngpus)"
Expand Down