diff --git a/GPUZIPy/example/GPUZIPy_Example.ipynb b/GPUZIPy/example/GPUZIPy_Example.ipynb index 3f57611..0e44e30 100644 --- a/GPUZIPy/example/GPUZIPy_Example.ipynb +++ b/GPUZIPy/example/GPUZIPy_Example.ipynb @@ -1,16 +1,5 @@ { "cells": [ - { - "cell_type": "markdown", - "source": [ - "Important note: GPUZIP build fails on the Google Colab's latest runtime.\n", - "\n", - "My temporary recommendation: Set runtime to use \"\"" - ], - "metadata": { - "id": "S4VMzwl4XMAp" - } - }, { "cell_type": "code", "execution_count": 1, @@ -19,21 +8,25 @@ "base_uri": "https://localhost:8080/" }, "id": "IlF2wBWpUY38", - "outputId": "daf325e4-7dc8-43a8-c16c-518bd8419e76" + "outputId": "a02704d6-1653-48c3-cf34-5850be38258c" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "Looking in links: https://github.com/LSC-Unicamp/GPUZIP/releases/expanded_assets/gpuzipy-v2.1.0\n", - "Requirement already satisfied: gpuzipy in /usr/local/lib/python3.12/dist-packages (0.0.1)\n" + "Looking in links: https://github.com/LSC-Unicamp/GPUZIP/releases/expanded_assets/2.1.0\n", + "Collecting gpuzipy\n", + " Downloading https://github.com/LSC-Unicamp/GPUZIP/releases/download/2.1.0/gpuzipy-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl (19.9 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m19.9/19.9 MB\u001b[0m \u001b[31m31.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hInstalling collected packages: gpuzipy\n", + "Successfully installed gpuzipy-2.1.0\n" ] } ], "source": [ "# Prebuilt CUDA 12 wheel (Linux x86_64, Python 3.10-3.13): no compilation needed.\n", - "!pip install gpuzipy --only-binary gpuzipy --find-links https://github.com/LSC-Unicamp/GPUZIP/releases/expanded_assets/gpuzipy-v2.1.0\n", + "!pip install gpuzipy --only-binary gpuzipy --find-links https://github.com/LSC-Unicamp/GPUZIP/releases/expanded_assets/2.1.0\n", "\n", "\n", "# Alternatively, build from source (~7 min on Colab):\n", @@ -112,13 +105,14 @@ "base_uri": "https://localhost:8080/" }, "id": "A7ZWzsxDmbHY", - "outputId": "81e13a68-6cfa-4f20-a64a-f00c6f7ff9a1" + "outputId": "0abca9c6-a56e-4497-ed93-4d9907680ac2" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ + "Downloading https://redu.unicamp.br/api/access/datafile/13547?gbrecs=true\n", "Loaded Marmousi3D: (301, 901, 351) float32\n" ] } @@ -161,7 +155,7 @@ "height": 353 }, "id": "kzIlvBjEmtDs", - "outputId": "eec582d8-796f-4bce-b030-63049b13958e" + "outputId": "2251a899-d5da-4284-82f4-c9fdc842125c" }, "outputs": [ { @@ -354,7 +348,7 @@ "height": 469 }, "id": "V1eYeZJZnQtr", - "outputId": "c59a16ef-9128-4127-c5c3-d7c89d4f6fbf" + "outputId": "0b796518-d15d-4410-cf64-e125d0071a5e" }, "outputs": [ { @@ -406,7 +400,7 @@ "height": 469 }, "id": "aV6W32mMnXf4", - "outputId": "99f3cb11-747e-4e0c-eb9a-53e74890f0f8" + "outputId": "95c4943c-ebb7-417b-b387-863b99191abb" }, "outputs": [ { @@ -442,29 +436,24 @@ }, { "cell_type": "markdown", - "source": [ - "# Compressing with cuSZ" - ], "metadata": { "id": "0m2Yn8KAS2cb" - } + }, + "source": [ + "# Compressing with cuSZ" + ] }, { "cell_type": "code", - "source": [ - "psnr_value, ssim_value, compression_rate = test_compression(\n", - " data, {'error_bound': 1e-4, 'compressor': CUSZP}, 'cuszp')\n", - "print('cuszp → psnr:', psnr_value, 'ssim:', ssim_value, 'rate:', compression_rate)" - ], + "execution_count": 10, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 469 }, "id": "RHonDV1bS5iH", - "outputId": "995c910c-bcc1-4d07-9ab9-4012fbc7483d" + "outputId": "389b2de7-9039-4eab-9eec-7ad1901166be" }, - "execution_count": 10, "outputs": [ { "output_type": "stream", @@ -490,6 +479,11 @@ "cuszp → psnr: -65.65531921386719 ssim: 0.0005506758897978791 rate: 2.310009004738681\n" ] } + ], + "source": [ + "psnr_value, ssim_value, compression_rate = test_compression(\n", + " data, {'error_bound': 1e-4, 'compressor': CUSZP}, 'cuszp')\n", + "print('cuszp → psnr:', psnr_value, 'ssim:', ssim_value, 'rate:', compression_rate)" ] } ],