{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from importlib import reload\n",
    "from pdfCropMargins import crop\n",
    "import draw_graph_7"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "init (%)      0.001169\n",
      "getCSC (%)    6.746122\n",
      "adjust (%)    3.187376\n",
      "dtype: float64\n",
      "init (%)      0.000000\n",
      "getCSC (%)    3.263465\n",
      "adjust (%)    1.493383\n",
      "dtype: float64\n",
      "              converged        csc     adjust\n",
      "benchmark                                    \n",
      "aes               False  10.290309  15.408181\n",
      "aes                True   7.564155  11.072547\n",
      "basicmath         False   0.068989   0.115062\n",
      "basicmath          True   0.056364   0.092738\n",
      "conv2d            False  15.076856  22.091515\n",
      "conv2d             True   1.210414   1.781241\n",
      "crc               False   3.995493   5.870876\n",
      "crc                True   2.623342   3.852102\n",
      "fft               False   0.549085   0.854441\n",
      "fft                True   0.244974   0.372439\n",
      "matmul            False  18.364941  26.594541\n",
      "matmul             True  12.959343  18.743386\n",
      "sha               False   0.808664   1.277184\n",
      "sha                True   0.151403   0.232515\n",
      "stringsearch      False   4.814637   7.256182\n",
      "stringsearch       True   1.297722   1.907812\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "('plot_expr_7_cropped.pdf', None, None, None)"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 81220 characters]",
      "text/plain": [
       "<Figure size 1200x350 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "reload(draw_graph_7)\n",
    "fig = draw_graph_7.draw_graph()\n",
    "\n",
    "output_file_name = \"plot_expr_7.pdf\"\n",
    "cropped_file_name = \"plot_expr_7_cropped.pdf\"\n",
    "fig.savefig(output_file_name, bbox_inches=\"tight\")\n",
    "crop([\"-o\", cropped_file_name, \"-p4\", \"0\", \"15\", \"15\", \"0\", output_file_name])\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "embedded",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
