Skip to content

Commit 582d966

Browse files
committed
Accelerated Python/Kernels: Update colab install instructions in solution notebooks to install ncu not nsys.
1 parent 46f8a67 commit 582d966

File tree

2 files changed

+1073
-1076
lines changed

2 files changed

+1073
-1076
lines changed

tutorials/accelerated-python/notebooks/kernels/solutions/40__kernel_authoring__copy__SOLUTION.ipynb

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
{
1919
"cell_type": "code",
20-
"execution_count": 1,
20+
"execution_count": null,
2121
"metadata": {
2222
"collapsed": true,
2323
"id": "AoHkvSPMC5Fs",
@@ -29,11 +29,16 @@
2929
"source": [
3030
"import os\n",
3131
"\n",
32-
"if os.getenv(\"COLAB_RELEASE_TAG\"): # If running in Google Colab:\n",
33-
" !curl -s -L -O https://developer.nvidia.com/downloads/assets/tools/secure/nsight-systems/2025_3/NsightSystems-linux-cli-public-2025.3.1.90-3582212.deb\n",
34-
" !sudo dpkg -i NsightSystems-linux-cli-public-2025.3.1.90-3582212.deb > /dev/null\n",
35-
" !pip install \"numba-cuda\" \"cupy-cuda12x\" \"nsightful[notebook] @ git+https://github.com/brycelelbach/nsightful.git\" > /dev/null 2>&1\n",
36-
" os.environ[\"NUMBA_CUDA_ENABLE_PYNVJITLINK\"] = \"1\""
32+
"if os.getenv(\"COLAB_RELEASE_TAG\") and not os.path.exists(\"/accelerated-computing-hub-installed\"): # If running in Google Colab:\n",
33+
" print(\"Downloading NCU package.\")\n",
34+
" !curl -s -L -O https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/nsight-compute-2025.2.1_2025.2.1.3-1_amd64.deb\n",
35+
" print(\"Installing NCU package.\")\n",
36+
" !dpkg -i nsight-compute-2025.2.1_2025.2.1.3-1_amd64.deb > /dev/null\n",
37+
" !update-alternatives --install /opt/bin/ncu ncu /opt/nvidia/nsight-compute/2025.2.1/ncu 20250201 > /dev/null\n",
38+
" print(\"Installing PIP packages.\")\n",
39+
" !pip uninstall \"cuda-python\" --yes > /dev/null\n",
40+
" !pip install \"numba-cuda\" \"cuda-cccl[test-cu12]\" \"nvtx\" \"nsightful[notebook] @ git+https://github.com/brycelelbach/nsightful.git\" > /dev/null 2>&1\n",
41+
" open(\"/accelerated-computing-hub-installed\", \"a\").close()"
3742
]
3843
},
3944
{
@@ -203,10 +208,7 @@
203208
"outputs": [
204209
{
205210
"data": {
206-
"application/javascript": [
207-
"window[\"5ecc93f0-740d-11f0-abc7-0242ac1c000c\"] = google.colab.output.setIframeHeight(-1, true, {\"interactive\": true, \"maxHeight\": 99999});\n",
208-
"//# sourceURL=js_bae5335f4f"
209-
],
211+
"application/javascript": "window[\"5ecc93f0-740d-11f0-abc7-0242ac1c000c\"] = google.colab.output.setIframeHeight(-1, true, {\"interactive\": true, \"maxHeight\": 99999});\n//# sourceURL=js_bae5335f4f",
210212
"text/plain": [
211213
"<IPython.core.display.Javascript object>"
212214
]
@@ -516,10 +518,7 @@
516518
"outputs": [
517519
{
518520
"data": {
519-
"application/javascript": [
520-
"window[\"6a0b3852-740d-11f0-abc7-0242ac1c000c\"] = google.colab.output.setIframeHeight(-1, true, {\"interactive\": true, \"maxHeight\": 99999});\n",
521-
"//# sourceURL=js_b772b58d4e"
522-
],
521+
"application/javascript": "window[\"6a0b3852-740d-11f0-abc7-0242ac1c000c\"] = google.colab.output.setIframeHeight(-1, true, {\"interactive\": true, \"maxHeight\": 99999});\n//# sourceURL=js_b772b58d4e",
523522
"text/plain": [
524523
"<IPython.core.display.Javascript object>"
525524
]
@@ -2429,16 +2428,16 @@
24292428
"_titles": {
24302429
"0": "Summary",
24312430
"1": "Speed Of Light",
2432-
"10": "Occupancy",
2433-
"11": "Source Counters",
24342431
"2": "Memory Workload",
24352432
"3": "Compute Workload",
24362433
"4": "Compute & Memory Distribution",
24372434
"5": "Scheduler",
24382435
"6": "Warp State",
24392436
"7": "Instruction",
24402437
"8": "Launch",
2441-
"9": "PM Sampling"
2438+
"9": "PM Sampling",
2439+
"10": "Occupancy",
2440+
"11": "Source Counters"
24422441
},
24432442
"_view_count": null,
24442443
"_view_module": "@jupyter-widgets/controls",
@@ -2633,16 +2632,16 @@
26332632
"_titles": {
26342633
"0": "Summary",
26352634
"1": "Speed Of Light",
2636-
"10": "Occupancy",
2637-
"11": "Source Counters",
26382635
"2": "Memory Workload",
26392636
"3": "Compute Workload",
26402637
"4": "Compute & Memory Distribution",
26412638
"5": "Scheduler",
26422639
"6": "Warp State",
26432640
"7": "Instruction",
26442641
"8": "Launch",
2645-
"9": "PM Sampling"
2642+
"9": "PM Sampling",
2643+
"10": "Occupancy",
2644+
"11": "Source Counters"
26462645
},
26472646
"_view_count": null,
26482647
"_view_module": "@jupyter-widgets/controls",

0 commit comments

Comments
 (0)