diff --git a/ipynb/Examples/CodeSizeComparison/CodeSizeComparison.ipynb b/ipynb/Examples/CodeSizeComparison/CodeSizeComparison.ipynb index 5f60e7ec8..2dceded33 100644 --- a/ipynb/Examples/CodeSizeComparison/CodeSizeComparison.ipynb +++ b/ipynb/Examples/CodeSizeComparison/CodeSizeComparison.ipynb @@ -4,7 +4,14 @@ "cell_type": "code", "execution_count": 1, "id": "5aa9b7aa-5bf6-4435-981f-bcb91132020a", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2023-12-30T23:42:10.695559Z", + "iopub.status.busy": "2023-12-30T23:42:10.695354Z", + "iopub.status.idle": "2023-12-30T23:42:10.701599Z", + "shell.execute_reply": "2023-12-30T23:42:10.701062Z" + } + }, "outputs": [], "source": [ "from IPython.display import Code" @@ -70,7 +77,14 @@ "cell_type": "code", "execution_count": 2, "id": "a969b1c7-26b1-47d5-91d4-d94397bf7c08", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2023-12-30T23:42:10.704566Z", + "iopub.status.busy": "2023-12-30T23:42:10.704185Z", + "iopub.status.idle": "2023-12-30T23:42:10.786034Z", + "shell.execute_reply": "2023-12-30T23:42:10.785391Z" + } + }, "outputs": [ { "data": { @@ -182,7 +196,14 @@ "cell_type": "code", "execution_count": 3, "id": "ab05b643-f644-4c38-8768-04a3e488ddc4", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2023-12-30T23:42:10.788730Z", + "iopub.status.busy": "2023-12-30T23:42:10.788362Z", + "iopub.status.idle": "2023-12-30T23:42:10.832424Z", + "shell.execute_reply": "2023-12-30T23:42:10.831657Z" + } + }, "outputs": [ { "data": { @@ -592,29 +613,36 @@ "cell_type": "code", "execution_count": 4, "id": "43576c35", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2023-12-30T23:42:10.835670Z", + "iopub.status.busy": "2023-12-30T23:42:10.835442Z", + "iopub.status.idle": "2023-12-30T23:52:42.738843Z", + "shell.execute_reply": "2023-12-30T23:52:42.738149Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "INFO - Loading environment cache from file\n", - "INFO - Successfully initialized cache\n", - "INFO - [session-4] Processing stage LOAD\n", - "INFO - [session-4] Processing stage BUILD\n", - "INFO - [session-4] Processing stage COMPILE\n", - "INFO - [session-4] Processing stage RUN\n", - "INFO - All runs completed successfuly!\n", - "INFO - Postprocessing session report\n", - "INFO - [session-4] Done processing runs\n", - "INFO - Report:\n", - " Session Run Model Frontend Framework Backend Platform Target Total Cycles Total Instructions Total CPI Validation Total ROM Total RAM ROM read-only ROM code ROM misc RAM data RAM zero-init data Features Config Postprocesses Comment\n", - "0 4 0 aww tflite tflm tflmi mlif spike 45594676 45594676 1.0 True 153225 36168 63557 89652 16 2800 33368 [] {'aww.output_shapes': {'Identity': [1, 12]}, '... [] -\n", - "1 4 1 aww tflite tflm tflmi mlif spike 15248124 15248124 1.0 True 179322 36176 63560 115746 16 2808 33368 [muriscvnn] {'aww.output_shapes': {'Identity': [1, 12]}, '... [] -\n", - "2 4 2 aww tflite tflm tflmi mlif spike 16597146 16597146 1.0 True 179525 36176 63557 115952 16 2808 33368 [cmsisnn] {'aww.output_shapes': {'Identity': [1, 12]}, '... [] -\n", - "3 4 3 resnet tflite tflm tflmi mlif spike 145098497 145098497 1.0 True 200371 68940 102405 97950 16 2804 66136 [] {'resnet.output_shapes': {'Identity_int8': [1,... [] -\n", - "4 4 4 resnet tflite tflm tflmi mlif spike 54977756 54977756 1.0 True 217830 68932 102408 115406 16 2796 66136 [muriscvnn] {'resnet.output_shapes': {'Identity_int8': [1,... [] -\n", - "5 4 5 resnet tflite tflm tflmi mlif spike 63907632 63907632 1.0 True 218937 68932 102405 116516 16 2796 66136 [cmsisnn] {'resnet.output_shapes': {'Identity_int8': [1,... [] -\n" + "INFO - Loading environment cache from file\r\n", + "INFO - Successfully initialized cache\r\n", + "INFO - Processing stage LOAD\r\n", + "INFO - Processing stage BUILD\r\n", + "INFO - Processing stage COMPILE\r\n", + "INFO - Processing stage RUN\r\n", + "INFO - All runs completed successfuly!\r\n", + "INFO - Postprocessing session report\r\n", + "INFO - Done processing runs\r\n", + "INFO - Report:\r\n", + " Session Run Model Frontend Framework Backend Platform Target Total Cycles Total Instructions Total CPI Validation Total ROM Total RAM ROM read-only ROM code ROM misc RAM data RAM zero-init data Features Config Postprocesses Comment\r\n", + "0 0 0 aww tflite tflm tflmi mlif spike 45594676 45594676 1.0 True 153225 36168 63557 89652 16 2800 33368 [] {'aww.output_shapes': {'Identity': [1, 12]}, '... [] -\r\n", + "1 0 1 aww tflite tflm tflmi mlif spike 15248124 15248124 1.0 True 179322 36176 63560 115746 16 2808 33368 [muriscvnn] {'aww.output_shapes': {'Identity': [1, 12]}, '... [] -\r\n", + "2 0 2 aww tflite tflm tflmi mlif spike 16597146 16597146 1.0 True 179525 36176 63557 115952 16 2808 33368 [cmsisnn] {'aww.output_shapes': {'Identity': [1, 12]}, '... [] -\r\n", + "3 0 3 resnet tflite tflm tflmi mlif spike 145098497 145098497 1.0 True 200371 68940 102405 97950 16 2804 66136 [] {'resnet.output_shapes': {'Identity_int8': [1,... [] -\r\n", + "4 0 4 resnet tflite tflm tflmi mlif spike 54977756 54977756 1.0 True 217830 68932 102408 115406 16 2796 66136 [muriscvnn] {'resnet.output_shapes': {'Identity_int8': [1,... [] -\r\n", + "5 0 5 resnet tflite tflm tflmi mlif spike 63907632 63907632 1.0 True 218937 68932 102405 116516 16 2796 66136 [cmsisnn] {'resnet.output_shapes': {'Identity_int8': [1,... [] -\r\n" ] } ], @@ -635,30 +663,37 @@ "cell_type": "code", "execution_count": 5, "id": "53c89e22", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2023-12-30T23:52:42.742190Z", + "iopub.status.busy": "2023-12-30T23:52:42.741740Z", + "iopub.status.idle": "2023-12-31T00:03:12.544136Z", + "shell.execute_reply": "2023-12-31T00:03:12.543463Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "INFO - Loading environment cache from file\n", - "INFO - Successfully initialized cache\n", - "INFO - [session-5] Processing stage LOAD\n", - "INFO - [session-5] Processing stage BUILD\n", - "INFO - [session-5] Processing stage COMPILE\n", - "INFO - [session-5] Processing stage RUN\n", - "INFO - [session-5] Processing stage POSTPROCESS\n", - "INFO - All runs completed successfuly!\n", - "INFO - Postprocessing session report\n", - "INFO - [session-5] Done processing runs\n", - "INFO - Report:\n", - " Model Total ROM ROM read-only ROM code Features\n", - "0 aww 153225 63557 89652 []\n", - "1 aww 179322 63560 115746 [muriscvnn]\n", - "2 aww 179525 63557 115952 [cmsisnn]\n", - "3 resnet 200371 102405 97950 []\n", - "4 resnet 217830 102408 115406 [muriscvnn]\n", - "5 resnet 218937 102405 116516 [cmsisnn]\n" + "INFO - Loading environment cache from file\r\n", + "INFO - Successfully initialized cache\r\n", + "INFO - [session-1] Processing stage LOAD\r\n", + "INFO - [session-1] Processing stage BUILD\r\n", + "INFO - [session-1] Processing stage COMPILE\r\n", + "INFO - [session-1] Processing stage RUN\r\n", + "INFO - [session-1] Processing stage POSTPROCESS\r\n", + "INFO - All runs completed successfuly!\r\n", + "INFO - Postprocessing session report\r\n", + "INFO - [session-1] Done processing runs\r\n", + "INFO - Report:\r\n", + " Model Total Cycles Total ROM ROM read-only ROM code Features\r\n", + "0 aww 45594676 153225 63557 89652 []\r\n", + "1 aww 15248124 179322 63560 115746 [muriscvnn]\r\n", + "2 aww 16597146 179525 63557 115952 [cmsisnn]\r\n", + "3 resnet 145098497 200371 102405 97950 []\r\n", + "4 resnet 54977756 217830 102408 115406 [muriscvnn]\r\n", + "5 resnet 63907632 218937 102405 116516 [cmsisnn]\r\n" ] } ], @@ -681,30 +716,37 @@ "cell_type": "code", "execution_count": 6, "id": "230211f7", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2023-12-31T00:03:12.547189Z", + "iopub.status.busy": "2023-12-31T00:03:12.546982Z", + "iopub.status.idle": "2023-12-31T00:13:30.469633Z", + "shell.execute_reply": "2023-12-31T00:13:30.468823Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "INFO - Loading environment cache from file\n", - "INFO - Successfully initialized cache\n", - "INFO - [session-6] Processing stage LOAD\n", - "INFO - [session-6] Processing stage BUILD\n", - "INFO - [session-6] Processing stage COMPILE\n", - "INFO - [session-6] Processing stage RUN\n", - "INFO - [session-6] Processing stage POSTPROCESS\n", - "INFO - All runs completed successfuly!\n", - "INFO - Postprocessing session report\n", - "INFO - [session-6] Done processing runs\n", - "INFO - Report:\n", - " Model Total ROM ROM read-only ROM code Features\n", - "0 aww 142627 63521 79090 []\n", - "1 aww 161266 63524 97726 [muriscvnn]\n", - "2 aww 172819 63521 109282 [cmsisnn]\n", - "3 resnet 183107 102369 80722 []\n", - "4 resnet 195608 102372 93220 [muriscvnn]\n", - "5 resnet 205073 102369 102688 [cmsisnn]\n" + "INFO - Loading environment cache from file\r\n", + "INFO - Successfully initialized cache\r\n", + "INFO - [session-2] Processing stage LOAD\r\n", + "INFO - [session-2] Processing stage BUILD\r\n", + "INFO - [session-2] Processing stage COMPILE\r\n", + "INFO - [session-2] Processing stage RUN\r\n", + "INFO - [session-2] Processing stage POSTPROCESS\r\n", + "INFO - All runs completed successfuly!\r\n", + "INFO - Postprocessing session report\r\n", + "INFO - [session-2] Done processing runs\r\n", + "INFO - Report:\r\n", + " Model Total Cycles Total ROM ROM read-only ROM code Features\r\n", + "0 aww 172565059 142627 63521 79090 []\r\n", + "1 aww 17175092 161266 63524 97726 [muriscvnn]\r\n", + "2 aww 16711296 172819 63521 109282 [cmsisnn]\r\n", + "3 resnet 769033691 183107 102369 80722 []\r\n", + "4 resnet 81588051 195608 102372 93220 [muriscvnn]\r\n", + "5 resnet 63995913 205073 102369 102688 [cmsisnn]\r\n" ] } ], @@ -742,7 +784,14 @@ "cell_type": "code", "execution_count": 7, "id": "78c53970", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2023-12-31T00:13:30.472958Z", + "iopub.status.busy": "2023-12-31T00:13:30.472762Z", + "iopub.status.idle": "2023-12-31T00:13:30.857902Z", + "shell.execute_reply": "2023-12-31T00:13:30.857139Z" + } + }, "outputs": [], "source": [ "from tempfile import TemporaryDirectory\n", @@ -762,9 +811,16 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 8, "id": "2f6c5e5a", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2023-12-31T00:13:30.861284Z", + "iopub.status.busy": "2023-12-31T00:13:30.860798Z", + "iopub.status.idle": "2023-12-31T00:13:30.864892Z", + "shell.execute_reply": "2023-12-31T00:13:30.864341Z" + } + }, "outputs": [], "source": [ "FRONTEND = \"tflite\"\n", @@ -790,9 +846,16 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 9, "id": "ebe63369", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2023-12-31T00:13:30.867414Z", + "iopub.status.busy": "2023-12-31T00:13:30.867006Z", + "iopub.status.idle": "2023-12-31T00:23:45.267721Z", + "shell.execute_reply": "2023-12-31T00:23:45.267088Z" + } + }, "outputs": [ { "name": "stdout", @@ -800,10 +863,10 @@ "text": [ "INFO - Loading environment cache from file\n", "INFO - Successfully initialized cache\n", - "INFO - [session-8] Processing all stages\n", + "INFO - [session-3] Processing all stages\n", "INFO - All runs completed successfuly!\n", "INFO - Postprocessing session report\n", - "INFO - [session-8] Done processing runs\n" + "INFO - [session-3] Done processing runs\n" ] }, { @@ -855,18 +918,42 @@ "