From b0d510e6574a4975d5ef2a53642dda15cccee696 Mon Sep 17 00:00:00 2001 From: PhilippvK Date: Tue, 6 Feb 2024 10:19:49 +0000 Subject: [PATCH] Update Notebook Outputs for Examples/TVM-UMA on 2024-02-06T10:19:48 --- ipynb/Examples/TVM-UMA/TVM-UMA.ipynb | 835 +++++++++++++++++---------- 1 file changed, 533 insertions(+), 302 deletions(-) diff --git a/ipynb/Examples/TVM-UMA/TVM-UMA.ipynb b/ipynb/Examples/TVM-UMA/TVM-UMA.ipynb index 1802faf33..548283445 100644 --- a/ipynb/Examples/TVM-UMA/TVM-UMA.ipynb +++ b/ipynb/Examples/TVM-UMA/TVM-UMA.ipynb @@ -2,9 +2,24 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "id": "cd15d552", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2024-02-06T10:19:21.259689Z", + "iopub.status.busy": "2024-02-06T10:19:21.259315Z", + "iopub.status.idle": "2024-02-06T10:19:21.265582Z", + "shell.execute_reply": "2024-02-06T10:19:21.265066Z" + }, + "papermill": { + "duration": 0.011888, + "end_time": "2024-02-06T10:19:21.266946", + "exception": false, + "start_time": "2024-02-06T10:19:21.255058", + "status": "completed" + }, + "tags": [] + }, "outputs": [], "source": [ "from IPython.display import Code" @@ -15,10 +30,10 @@ "id": "67a623c3", "metadata": { "papermill": { - "duration": 0.003582, - "end_time": "2024-01-08T10:22:14.924780", + "duration": 0.002512, + "end_time": "2024-02-06T10:19:21.272350", "exception": false, - "start_time": "2024-01-08T10:22:14.921198", + "start_time": "2024-02-06T10:19:21.269838", "status": "completed" }, "tags": [] @@ -32,10 +47,10 @@ "id": "1025ee11", "metadata": { "papermill": { - "duration": 0.002392, - "end_time": "2024-01-08T10:22:14.929883", + "duration": 0.002456, + "end_time": "2024-02-06T10:19:21.277364", "exception": false, - "start_time": "2024-01-08T10:22:14.927491", + "start_time": "2024-02-06T10:19:21.274908", "status": "completed" }, "tags": [] @@ -49,10 +64,10 @@ "id": "87fd1387", "metadata": { "papermill": { - "duration": 0.002312, - "end_time": "2024-01-08T10:22:14.939305", + "duration": 0.002577, + "end_time": "2024-02-06T10:19:21.283509", "exception": false, - "start_time": "2024-01-08T10:22:14.936993", + "start_time": "2024-02-06T10:19:21.280932", "status": "completed" }, "tags": [] @@ -66,10 +81,10 @@ "id": "584a911d", "metadata": { "papermill": { - "duration": 0.002349, - "end_time": "2024-01-08T10:22:14.944011", + "duration": 0.002451, + "end_time": "2024-02-06T10:19:21.288488", "exception": false, - "start_time": "2024-01-08T10:22:14.941662", + "start_time": "2024-02-06T10:19:21.286037", "status": "completed" }, "tags": [] @@ -91,10 +106,10 @@ "id": "74ce776e", "metadata": { "papermill": { - "duration": 0.002309, - "end_time": "2024-01-08T10:22:14.948717", + "duration": 0.002437, + "end_time": "2024-02-06T10:19:21.293491", "exception": false, - "start_time": "2024-01-08T10:22:14.946408", + "start_time": "2024-02-06T10:19:21.291054", "status": "completed" }, "tags": [] @@ -108,10 +123,10 @@ "id": "18955525", "metadata": { "papermill": { - "duration": 0.002317, - "end_time": "2024-01-08T10:22:14.953417", + "duration": 0.002473, + "end_time": "2024-02-06T10:19:21.298505", "exception": false, - "start_time": "2024-01-08T10:22:14.951100", + "start_time": "2024-02-06T10:19:21.296032", "status": "completed" }, "tags": [] @@ -126,9 +141,24 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "d7dcc6a4", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2024-02-06T10:19:21.304698Z", + "iopub.status.busy": "2024-02-06T10:19:21.304213Z", + "iopub.status.idle": "2024-02-06T10:19:21.410618Z", + "shell.execute_reply": "2024-02-06T10:19:21.409909Z" + }, + "papermill": { + "duration": 0.111112, + "end_time": "2024-02-06T10:19:21.412144", + "exception": false, + "start_time": "2024-02-06T10:19:21.301032", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "data": { @@ -152,6 +182,7 @@ ".output_html .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */\n", ".output_html .gd { color: #A00000 } /* Generic.Deleted */\n", ".output_html .ge { font-style: italic } /* Generic.Emph */\n", + ".output_html .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */\n", ".output_html .gr { color: #E40000 } /* Generic.Error */\n", ".output_html .gh { color: #000080; font-weight: bold } /* Generic.Heading */\n", ".output_html .gi { color: #008400 } /* Generic.Inserted */\n", @@ -602,7 +633,7 @@ "flags: []" ] }, - "execution_count": 3, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -616,10 +647,10 @@ "id": "4d140308", "metadata": { "papermill": { - "duration": 0.002309, - "end_time": "2024-01-08T10:22:14.962791", + "duration": 0.003197, + "end_time": "2024-02-06T10:19:21.418740", "exception": false, - "start_time": "2024-01-08T10:22:14.960482", + "start_time": "2024-02-06T10:19:21.415543", "status": "completed" }, "tags": [] @@ -633,10 +664,10 @@ "id": "a3bac781", "metadata": { "papermill": { - "duration": 0.003198, - "end_time": "2024-01-08T10:22:14.968348", + "duration": 0.003003, + "end_time": "2024-02-06T10:19:21.424915", "exception": false, - "start_time": "2024-01-08T10:22:14.965150", + "start_time": "2024-02-06T10:19:21.421912", "status": "completed" }, "tags": [] @@ -648,7 +679,16 @@ { "cell_type": "markdown", "id": "d709a12b", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003077, + "end_time": "2024-02-06T10:19:21.431092", + "exception": false, + "start_time": "2024-02-06T10:19:21.428015", + "status": "completed" + }, + "tags": [] + }, "source": [ "The UMA backends for Vanilla and QVanilla have been added into MLonMCU resources (mlonmcu/resources/frameworks/tvm/tvmc_extension). So you can easily use them as the TVM backends in MLonMCU. This directory and the defined name for each backend should be passed as `uma_dir` and `uma_target` attributes of `uma_backends` feature. \n", "\n", @@ -662,10 +702,10 @@ "id": "2b333851", "metadata": { "papermill": { - "duration": 0.002312, - "end_time": "2024-01-08T10:22:14.982519", + "duration": 0.00302, + "end_time": "2024-02-06T10:19:21.437273", "exception": false, - "start_time": "2024-01-08T10:22:14.980207", + "start_time": "2024-02-06T10:19:21.434253", "status": "completed" }, "tags": [] @@ -677,7 +717,16 @@ { "cell_type": "markdown", "id": "0263ee6a", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003043, + "end_time": "2024-02-06T10:19:21.443407", + "exception": false, + "start_time": "2024-02-06T10:19:21.440364", + "status": "completed" + }, + "tags": [] + }, "source": [ "You can take umatest.tflite model as a float model for testing Vanilla accelerator.\n", "\n", @@ -688,20 +737,20 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 3, "id": "43576c35", "metadata": { "execution": { - "iopub.execute_input": "2024-01-08T10:22:14.988782Z", - "iopub.status.busy": "2024-01-08T10:22:14.988320Z", - "iopub.status.idle": "2024-01-08T10:28:51.903255Z", - "shell.execute_reply": "2024-01-08T10:28:51.902459Z" + "iopub.execute_input": "2024-02-06T10:19:21.450855Z", + "iopub.status.busy": "2024-02-06T10:19:21.450340Z", + "iopub.status.idle": "2024-02-06T10:19:27.728999Z", + "shell.execute_reply": "2024-02-06T10:19:27.728254Z" }, "papermill": { - "duration": 396.920147, - "end_time": "2024-01-08T10:28:51.905075", + "duration": 6.284038, + "end_time": "2024-02-06T10:19:27.730571", "exception": false, - "start_time": "2024-01-08T10:22:14.984928", + "start_time": "2024-02-06T10:19:21.446533", "status": "completed" }, "tags": [] @@ -711,18 +760,48 @@ "name": "stdout", "output_type": "stream", "text": [ - "INFO - Loading environment cache from file\n", - "INFO - Successfully initialized cache\n", - "INFO - [session-61] Processing stage LOAD\n", - "INFO - [session-61] Processing stage BUILD\n", - "INFO - [session-61] Processing stage COMPILE\n", - "INFO - [session-61] Processing stage RUN\n", - "INFO - All runs completed successfuly!\n", - "INFO - Postprocessing session report\n", - "INFO - [session-61] Done processing runs\n", - "INFO - Report:\n", - " Session Run Model Frontend Framework Backend Platform Target Total Cycles Total Instructions Total CPI Total ROM Total RAM ROM read-only ROM code ROM misc RAM data RAM zero-init data Validation Features Config Postprocesses Comment\n", - "0 61 0 umatest tflite tvm tvmaotplus mlif etiss 4055888 4055888 1.0 281524 223556 237960 43552 12 1728 221828 True [uma_backends] {'umatest.metadata_path': 'definition.yml', 'u... [] -\n" + "INFO - Loading environment cache from file\r\n", + "INFO - Successfully initialized cache\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - Processing stage LOAD\r\n", + "INFO - Processing stage BUILD\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - Processing stage COMPILE\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - Processing stage RUN\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - All runs completed successfuly!\r\n", + "INFO - Postprocessing session report\r\n", + "INFO - Done processing runs\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - Report:\r\n", + " Session Run Model Frontend Framework Backend Platform Target Total Cycles Total Instructions Total CPI Total ROM Total RAM ROM read-only ROM code ROM misc RAM data RAM zero-init data Validation Features Config Postprocesses Comment\r\n", + "0 0 0 umatest tflite tvm tvmaotplus mlif etiss 4055888 4055888 1.0 281524 223556 237960 43552 12 1728 221828 True [uma_backends] {'umatest.metadata_path': 'definition.yml', 'u... [] -\r\n" ] } ], @@ -733,7 +812,16 @@ { "cell_type": "markdown", "id": "b11b34dc", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003521, + "end_time": "2024-02-06T10:19:27.737942", + "exception": false, + "start_time": "2024-02-06T10:19:27.734421", + "status": "completed" + }, + "tags": [] + }, "source": [ "### B) Vanilla as an ETISS plugin." ] @@ -741,7 +829,16 @@ { "cell_type": "markdown", "id": "60574ac4", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003467, + "end_time": "2024-02-06T10:19:27.744825", + "exception": false, + "start_time": "2024-02-06T10:19:27.741358", + "status": "completed" + }, + "tags": [] + }, "source": [ "The file named `conv2dnchw.cc` in the UMA backend structure for each accelerator is the accelerator interface, which can be a hardcoded implementation of the supported operators (like the previous example) or for instance a dirver for configuration of the plugin's register interface. You can find both interface types (conv2dnchw.cc & conv2dnchw1.cc) in the directory, so please make sure which one is called (simply interchange the names, if needed).\n", "\n", @@ -756,20 +853,20 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 4, "id": "53c89e22", "metadata": { "execution": { - "iopub.execute_input": "2024-01-08T10:28:51.917731Z", - "iopub.status.busy": "2024-01-08T10:28:51.917280Z", - "iopub.status.idle": "2024-01-08T10:35:27.650692Z", - "shell.execute_reply": "2024-01-08T10:35:27.649786Z" + "iopub.execute_input": "2024-02-06T10:19:27.753220Z", + "iopub.status.busy": "2024-02-06T10:19:27.752653Z", + "iopub.status.idle": "2024-02-06T10:19:32.516904Z", + "shell.execute_reply": "2024-02-06T10:19:32.516226Z" }, "papermill": { - "duration": 395.738905, - "end_time": "2024-01-08T10:35:27.652599", + "duration": 4.770655, + "end_time": "2024-02-06T10:19:32.518876", "exception": false, - "start_time": "2024-01-08T10:28:51.913694", + "start_time": "2024-02-06T10:19:27.748221", "status": "completed" }, "tags": [] @@ -779,119 +876,167 @@ "name": "stdout", "output_type": "stream", "text": [ - "INFO - Loading environment cache from file\n", - "INFO - Successfully initialized cache\n", - "INFO - [session-62] Processing stage LOAD\n", - "INFO - [session-62] Processing stage BUILD\n", - "INFO - [session-62] Processing stage COMPILE\n", - "INFO - [session-62] Processing stage RUN\n", - "=== Setting up configurations ===\n", - "Initializer::loadIni(): Ini sucessfully loaded /nas/ei/share/TUEIEDAscratch/ge74mos/MLonMCU/mlonmcu/workspace_uma/deps/install/etiss/examples/base.ini\n", - "Initializer::loadIni(): Ini sucessfully loaded /tmp/etiss_dynamic_glpWR2y0LE.ini\n", - "Initializer::loadIni(): Ini sucessfully loaded /tmp/tmp7ge3__gj/custom.ini\n", - " Load Configs from .ini files:\n", - "ETISS: Info: Created new config container: global\n", - "ETISS: Info: [BoolConfigurations]\n", - "ETISS: Info: arch.enable_semihosting=true,\n", - "ETISS: Info: arch.or1k.ignore_sr_iee=false,\n", - "ETISS: Info: etiss.enable_dmi=true,\n", - "ETISS: Info: etiss.load_integrated_libraries=true,\n", - "ETISS: Info: etiss.log_pc=false,\n", - "ETISS: Info: jit.debug=false,\n", - "ETISS: Info: jit.gcc.cleanup=true,\n", - "ETISS: Info: jit.verify=false,\n", - "ETISS: Info: testing=false,\n", - "ETISS: Info: [IntConfigurations]\n", - "ETISS: Warning: arch.cpu_cycle_time_ps=31250,31250, Multi values. Take only LAST one!\n", - "ETISS: Info: arch.or1k.if_stall_cycles=0,\n", - "ETISS: Info: arch.rv32imacfdpv.mstatus_fs=1,\n", - "ETISS: Info: etiss.max_block_size=100,\n", - "ETISS: Info: ETISS::CPU_quantum_ps=100000,\n", - "ETISS: Info: ETISS::sim_mode=0,\n", - "ETISS: Info: ETISS::write_pc_trace_from_time_us=0,\n", - "ETISS: Info: ETISS::write_pc_trace_until_time_us=3000000,\n", - "ETISS: Warning: simple_mem_system.memseg_length_00=0x00080000,8388608, Multi values. Take only LAST one!\n", - "ETISS: Warning: simple_mem_system.memseg_length_01=0x00080000,67108864, Multi values. Take only LAST one!\n", - "ETISS: Warning: simple_mem_system.memseg_origin_00=0x00000000,0, Multi values. Take only LAST one!\n", - "ETISS: Warning: simple_mem_system.memseg_origin_01=0x00080000,8388608, Multi values. Take only LAST one!\n", - "ETISS: Info: vp::simulation_time_us=20000000,\n", - "ETISS: Info: [StringConfigurations]\n", - "ETISS: Info: arch.cpu=RV32IMACFD,\n", - "ETISS: Info: etiss.output_path_prefix=,\n", - "ETISS: Info: jit.type=TCCJIT,\n", - "ETISS: Info: vp.elf_file=/nas/ei/share/TUEIEDAscratch/ge74mos/MLonMCU/mlonmcu/workspace_uma/temp/sessions/62/runs/0/generic_mlonmcu,\n", - "=== Finished setting up configurations ===\n", - "\n", - "=== Setting up test system ===\n", - " Setting up Memory\n", - "ETISS: Info: New Memory segment added: 1 - [0x00000000007fffff - 0x0000000000000000]\n", - "ETISS: Info: New Memory segment added: 2 - [0x00000000047fffff - 0x0000000000800000]\n", - "ETISS: Info: Assuming CPU architecture RV32IMACFD as set in configuration file. ELF architecture field will be ignored\n", - "ETISS: Info: Initialized the memory segment 1 - RWX[0x0000000000000000 - 0x0000000000044bab] from ELF-file\n", - "ETISS: Info: Initialized the memory segment 2 - RW[0x0000000000800000 - 0x000000000083695f] from ELF-file\n", - " Setting up CPUCore\n", - " CPU start address: 0xb8\n", - "=== Finished Setting up test system ===\n", - "\n", - "=== Setting up plug-ins ===\n", - "ETISS: Info: Adding Plugin VanillaAccelerator\n", - "\n", - "ETISS: Info: Plugin \"VanillaAccelerator\" loaded via library interface \"VanillaAccelerator\"\n", - "\n", - "ETISS: Info: Adding Plugin Logger\n", - "\n", - "ETISS: Info: plugin.logger.logaddr not set on the command line. Checking in .ini file.\n", - "ETISS: Info: options[plugin.logger.logaddr] = 0x80000000\n", - "\n", - "\n", - "ETISS: Info: plugin.logger.logmask not set on the command line. Checking in .ini file.\n", - "ETISS: Info: options[plugin.logger.logmask] = 0x80000000\n", - "\n", - "\n", - "ETISS: Info: Plugin \"Logger\" loaded via library interface \"ETISSINCLUDED\"\n", - "\n", - "ETISS: Info: Adding JIT \"TCCJIT\"\n", - "=== Setting up plug-ins ===\n", - "\n", - "\n", - "=== Simulation start ===\n", - "ETISS: Info: Init Plugin InterruptHandler{COROUTINE}\n", - "ETISS: Info: Init Plugin VanillaAccelerator{SYSTEMWRAPPER}\n", - "ETISS: Info: Init Plugin Logger{SYSTEMWRAPPER}\n", - "Program start.\n", - "# Setup Cycles: 42\n", - "# Setup Instructions: 42\n", - "# Run Cycles: 4055654\n", - "# Run Instructions: 4055654\n", - "# Total Cycles: 4055888\n", - "# Total Instructions: 4055888\n", - "Program finish.\n", - "MLONMCU EXIT: 0\n", - "CPU Time: 0.129764s Simulation Time: 0.586517s\n", - "CPU Cycles (estimated): 4.15245e+06\n", - "MIPS (estimated): 7.07985\n", - "=== Simulation end ===\n", - "\n", - "CPU0 exited with exception: 0x80000000: Finished cpu execution. This is the proper way to exit from etiss::CPUCore::execute.\n", - "warning: ignored: .eh_frame / size: 4\n", - "warning: ignored: .fini_array / size: 4\n", - "heap starts at: 0x836960\n", - "=== Results ===\n", - "ROM usage: 281.5 kB (0x44bb4)\n", - " read-only data: 238.0 kB (0x3a188)\n", - " code: 43.6 kB (0xaa20)\n", - " other required: 12 Bytes (0xc)\n", - "RAM usage: 223.6 kB (0x36944) [stack and heap usage not included]\n", - " data: 1.7 kB (0x6c0)\n", - " zero-init data: 221.8 kB (0x36284)\n", - " stack: unknown [missing trace file]\n", - " heap: unknown [missing trace file]\n", - "INFO - All runs completed successfuly!\n", - "INFO - Postprocessing session report\n", - "INFO - [session-62] Done processing runs\n", - "INFO - Report:\n", - " Session Run Model Frontend Framework Backend Platform Target Total Cycles Total Instructions Total CPI Total ROM Total RAM ROM read-only ROM code ROM misc RAM data RAM zero-init data Validation Features Config Postprocesses Comment\n", - "0 62 0 umatest tflite tvm tvmaotplus mlif etiss 4055888 4055888 1.0 281524 223556 237960 43552 12 1728 221828 True [vanilla_accelerator, uma_backends] {'umatest.metadata_path': 'definition.yml', 'u... [] -\n" + "INFO - Loading environment cache from file\r\n", + "INFO - Successfully initialized cache\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - [session-1] Processing stage LOAD\r\n", + "INFO - [session-1] Processing stage BUILD\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - [session-1] Processing stage COMPILE\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - [session-1] Processing stage RUN\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "=== Setting up configurations ===\r\n", + "Initializer::loadIni(): Ini sucessfully loaded /tmp/TVM-UMA-IfkK/workspace/deps/install/etiss/examples/base.ini\r\n", + "Initializer::loadIni(): Ini sucessfully loaded /tmp/etiss_dynamic_5TPkyAMzRN.ini\r\n", + "Initializer::loadIni(): Ini sucessfully loaded /tmp/tmp743vde_b/custom.ini\r\n", + " Load Configs from .ini files:\r\n", + "ETISS: Info: Created new config container: global\r\n", + "ETISS: Info: [BoolConfigurations]\r\n", + "ETISS: Info: arch.enable_semihosting=true,\r\n", + "ETISS: Info: arch.or1k.ignore_sr_iee=false,\r\n", + "ETISS: Info: etiss.enable_dmi=true,\r\n", + "ETISS: Info: etiss.load_integrated_libraries=true,\r\n", + "ETISS: Info: etiss.log_pc=false,\r\n", + "ETISS: Info: jit.debug=false,\r\n", + "ETISS: Info: jit.gcc.cleanup=true,\r\n", + "ETISS: Info: jit.verify=false,\r\n", + "ETISS: Info: testing=false,\r\n", + "ETISS: Info: [IntConfigurations]\r\n", + "ETISS: Warning: arch.cpu_cycle_time_ps=31250,31250, Multi values. Take only LAST one!\r\n", + "ETISS: Info: arch.or1k.if_stall_cycles=0,\r\n", + "ETISS: Info: arch.rv32imacfdpv.mstatus_fs=1,\r\n", + "ETISS: Info: etiss.max_block_size=100,\r\n", + "ETISS: Info: ETISS::CPU_quantum_ps=100000,\r\n", + "ETISS: Info: ETISS::sim_mode=0,\r\n", + "ETISS: Info: ETISS::write_pc_trace_from_time_us=0,\r\n", + "ETISS: Info: ETISS::write_pc_trace_until_time_us=3000000,\r\n", + "ETISS: Warning: simple_mem_system.memseg_length_00=0x00080000,8388608, Multi values. Take only LAST one!\r\n", + "ETISS: Warning: simple_mem_system.memseg_length_01=0x00080000,67108864, Multi values. Take only LAST one!\r\n", + "ETISS: Warning: simple_mem_system.memseg_origin_00=0x00000000,0, Multi values. Take only LAST one!\r\n", + "ETISS: Warning: simple_mem_system.memseg_origin_01=0x00080000,8388608, Multi values. Take only LAST one!\r\n", + "ETISS: Info: vp::simulation_time_us=20000000,\r\n", + "ETISS: Info: [StringConfigurations]\r\n", + "ETISS: Info: arch.cpu=RV32IMACFD,\r\n", + "ETISS: Info: etiss.output_path_prefix=,\r\n", + "ETISS: Info: jit.type=TCCJIT,\r\n", + "ETISS: Info: vp.elf_file=/tmp/TVM-UMA-IfkK/workspace/temp/sessions/1/runs/0/generic_mlonmcu,\r\n", + "=== Finished setting up configurations ===\r\n", + "\r\n", + "=== Setting up test system ===\r\n", + " Setting up Memory\r\n", + "ETISS: Info: New Memory segment added: 1 - [0x00000000007fffff - 0x0000000000000000]\r\n", + "ETISS: Info: New Memory segment added: 2 - [0x00000000047fffff - 0x0000000000800000]\r\n", + "ETISS: Info: Assuming CPU architecture RV32IMACFD as set in configuration file. ELF architecture field will be ignored\r\n", + "ETISS: Info: Initialized the memory segment 1 - RWX[0x0000000000000000 - 0x0000000000044bab] from ELF-file\r\n", + "ETISS: Info: Initialized the memory segment 2 - RW[0x0000000000800000 - 0x000000000083695f] from ELF-file\r\n", + " Setting up CPUCore\r\n", + " CPU start address: 0xb8\r\n", + "=== Finished Setting up test system ===\r\n", + "\r\n", + "=== Setting up plug-ins ===\r\n", + "ETISS: Info: Adding Plugin VanillaAccelerator\r\n", + "\r\n", + "ETISS: Info: Plugin \"VanillaAccelerator\" loaded via library interface \"VanillaAccelerator\"\r\n", + "\r\n", + "ETISS: Info: Adding Plugin Logger\r\n", + "\r\n", + "ETISS: Info: plugin.logger.logaddr not set on the command line. Checking in .ini file.\r\n", + "ETISS: Info: options[plugin.logger.logaddr] = 0x80000000\r\n", + "\r\n", + "\r\n", + "ETISS: Info: plugin.logger.logmask not set on the command line. Checking in .ini file.\r\n", + "ETISS: Info: options[plugin.logger.logmask] = 0x80000000\r\n", + "\r\n", + "\r\n", + "ETISS: Info: Plugin \"Logger\" loaded via library interface \"ETISSINCLUDED\"\r\n", + "\r\n", + "ETISS: Info: Adding JIT \"TCCJIT\"\r\n", + "=== Setting up plug-ins ===\r\n", + "\r\n", + "\r\n", + "=== Simulation start ===\r\n", + "ETISS: Info: Init Plugin InterruptHandler{COROUTINE}\r\n", + "ETISS: Info: Init Plugin VanillaAccelerator{SYSTEMWRAPPER}\r\n", + "ETISS: Info: Init Plugin Logger{SYSTEMWRAPPER}\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Program start.\r\n", + "# Setup Cycles: 42\r\n", + "# Setup Instructions: 42\r\n", + "# Run Cycles: 4055654\r\n", + "# Run Instructions: 4055654\r\n", + "# Total Cycles: 4055888\r\n", + "# Total Instructions: 4055888\r\n", + "Program finish.\r\n", + "MLONMCU EXIT: 0\r\n", + "CPU Time: 0.129764s Simulation Time: 0.477722s\r\n", + "CPU Cycles (estimated): 4.15245e+06\r\n", + "MIPS (estimated): 8.69219\r\n", + "=== Simulation end ===\r\n", + "\r\n", + "CPU0 exited with exception: 0x80000000: Finished cpu execution. This is the proper way to exit from etiss::CPUCore::execute.\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "warning: ignored: .eh_frame / size: 4\r\n", + "warning: ignored: .fini_array / size: 4\r\n", + "heap starts at: 0x836960\r\n", + "=== Results ===\r\n", + "ROM usage: 281.5 kB (0x44bb4)\r\n", + " read-only data: 238.0 kB (0x3a188)\r\n", + " code: 43.6 kB (0xaa20)\r\n", + " other required: 12 Bytes (0xc)\r\n", + "RAM usage: 223.6 kB (0x36944) [stack and heap usage not included]\r\n", + " data: 1.7 kB (0x6c0)\r\n", + " zero-init data: 221.8 kB (0x36284)\r\n", + " stack: unknown [missing trace file]\r\n", + " heap: unknown [missing trace file]\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - All runs completed successfuly!\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - Postprocessing session report\r\n", + "INFO - [session-1] Done processing runs\r\n", + "INFO - Report:\r\n", + " Session Run Model Frontend Framework Backend Platform Target Total Cycles Total Instructions Total CPI Total ROM Total RAM ROM read-only ROM code ROM misc RAM data RAM zero-init data Validation Features Config Postprocesses Comment\r\n", + "0 1 0 umatest tflite tvm tvmaotplus mlif etiss 4055888 4055888 1.0 281524 223556 237960 43552 12 1728 221828 True [uma_backends, vanilla_accelerator] {'umatest.metadata_path': 'definition.yml', 'u... [] -\r\n" ] } ], @@ -902,7 +1047,16 @@ { "cell_type": "markdown", "id": "3ce078e8", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.004026, + "end_time": "2024-02-06T10:19:32.527245", + "exception": false, + "start_time": "2024-02-06T10:19:32.523219", + "status": "completed" + }, + "tags": [] + }, "source": [ "Now you can see that the simulation starts with initializing VanillaAccelerator." ] @@ -910,7 +1064,16 @@ { "cell_type": "markdown", "id": "cf38ca13", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003796, + "end_time": "2024-02-06T10:19:32.535079", + "exception": false, + "start_time": "2024-02-06T10:19:32.531283", + "status": "completed" + }, + "tags": [] + }, "source": [ "### C) QVanilla as an ETISS plugin." ] @@ -918,7 +1081,16 @@ { "cell_type": "markdown", "id": "fb05548e", - "metadata": {}, + "metadata": { + "papermill": { + "duration": 0.003808, + "end_time": "2024-02-06T10:19:32.542749", + "exception": false, + "start_time": "2024-02-06T10:19:32.538941", + "status": "completed" + }, + "tags": [] + }, "source": [ "As stated before, QVanilla is a quantized version of Vanilla that can perform the quantized conv2d and bias addition. Similar to Vanilla, the convoluation needs to have stride one and same padding features. This accelerator has been implemented in ETISS as a zero-cycle model (QVanillaAccelerator) and a model with timing considerations (QVanillaAcceleratorT). \n", "\n", @@ -935,127 +1107,186 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 5, "id": "f55bf357", - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2024-02-06T10:19:32.551826Z", + "iopub.status.busy": "2024-02-06T10:19:32.551375Z", + "iopub.status.idle": "2024-02-06T10:19:37.505575Z", + "shell.execute_reply": "2024-02-06T10:19:37.504895Z" + }, + "papermill": { + "duration": 4.96093, + "end_time": "2024-02-06T10:19:37.507564", + "exception": false, + "start_time": "2024-02-06T10:19:32.546634", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "INFO - Loading environment cache from file\n", - "INFO - Successfully initialized cache\n", - "INFO - [session-55] Processing stage LOAD\n", - "INFO - [session-55] Processing stage BUILD\n", - "INFO - [session-55] Processing stage COMPILE\n", - "INFO - [session-55] Processing stage RUN\n", - "=== Setting up configurations ===\n", - "Initializer::loadIni(): Ini sucessfully loaded /nas/ei/share/TUEIEDAscratch/ge74mos/MLonMCU/mlonmcu/workspace_uma/deps/install/etiss/examples/base.ini\n", - "Initializer::loadIni(): Ini sucessfully loaded /tmp/etiss_dynamic_39fdzzdyFx.ini\n", - "Initializer::loadIni(): Ini sucessfully loaded /tmp/tmplitwtfoq/custom.ini\n", - " Load Configs from .ini files:\n", - "ETISS: Info: Created new config container: global\n", - "ETISS: Info: [BoolConfigurations]\n", - "ETISS: Info: arch.enable_semihosting=true,\n", - "ETISS: Info: arch.or1k.ignore_sr_iee=false,\n", - "ETISS: Info: etiss.enable_dmi=true,\n", - "ETISS: Info: etiss.load_integrated_libraries=true,\n", - "ETISS: Info: etiss.log_pc=false,\n", - "ETISS: Info: jit.debug=false,\n", - "ETISS: Info: jit.gcc.cleanup=true,\n", - "ETISS: Info: jit.verify=false,\n", - "ETISS: Info: testing=false,\n", - "ETISS: Info: [IntConfigurations]\n", - "ETISS: Warning: arch.cpu_cycle_time_ps=31250,31250, Multi values. Take only LAST one!\n", - "ETISS: Info: arch.or1k.if_stall_cycles=0,\n", - "ETISS: Info: arch.rv32imacfdpv.mstatus_fs=1,\n", - "ETISS: Info: etiss.max_block_size=100,\n", - "ETISS: Info: ETISS::CPU_quantum_ps=100000,\n", - "ETISS: Info: ETISS::sim_mode=0,\n", - "ETISS: Info: ETISS::write_pc_trace_from_time_us=0,\n", - "ETISS: Info: ETISS::write_pc_trace_until_time_us=3000000,\n", - "ETISS: Warning: simple_mem_system.memseg_length_00=0x00080000,8388608, Multi values. Take only LAST one!\n", - "ETISS: Warning: simple_mem_system.memseg_length_01=0x00080000,67108864, Multi values. Take only LAST one!\n", - "ETISS: Warning: simple_mem_system.memseg_origin_00=0x00000000,0, Multi values. Take only LAST one!\n", - "ETISS: Warning: simple_mem_system.memseg_origin_01=0x00080000,8388608, Multi values. Take only LAST one!\n", - "ETISS: Info: vp::simulation_time_us=20000000,\n", - "ETISS: Info: [StringConfigurations]\n", - "ETISS: Info: arch.cpu=RV32IMACFD,\n", - "ETISS: Info: etiss.output_path_prefix=,\n", - "ETISS: Info: jit.type=TCCJIT,\n", - "ETISS: Info: vp.elf_file=/nas/ei/share/TUEIEDAscratch/ge74mos/MLonMCU/mlonmcu/workspace_uma/temp/sessions/55/runs/0/generic_mlonmcu,\n", - "=== Finished setting up configurations ===\n", - "\n", - "=== Setting up test system ===\n", - " Setting up Memory\n", - "ETISS: Info: New Memory segment added: 1 - [0x00000000007fffff - 0x0000000000000000]\n", - "ETISS: Info: New Memory segment added: 2 - [0x00000000047fffff - 0x0000000000800000]\n", - "ETISS: Info: Assuming CPU architecture RV32IMACFD as set in configuration file. ELF architecture field will be ignored\n", - "ETISS: Info: Initialized the memory segment 1 - RWX[0x0000000000000000 - 0x000000000003d1d3] from ELF-file\n", - "ETISS: Info: Initialized the memory segment 2 - RW[0x0000000000800000 - 0x000000000080329f] from ELF-file\n", - " Setting up CPUCore\n", - " CPU start address: 0xb8\n", - "=== Finished Setting up test system ===\n", - "\n", - "=== Setting up plug-ins ===\n", - "ETISS: Info: Adding Plugin QVanillaAcceleratorT\n", - "\n", - "ETISS: Info: Plugin \"QVanillaAcceleratorT\" loaded via library interface \"QVanillaAcceleratorT\"\n", - "\n", - "ETISS: Info: Adding Plugin Logger\n", - "\n", - "ETISS: Info: plugin.logger.logaddr not set on the command line. Checking in .ini file.\n", - "ETISS: Info: options[plugin.logger.logaddr] = 0x80000000\n", - "\n", - "\n", - "ETISS: Info: plugin.logger.logmask not set on the command line. Checking in .ini file.\n", - "ETISS: Info: options[plugin.logger.logmask] = 0x80000000\n", - "\n", - "\n", - "ETISS: Info: Plugin \"Logger\" loaded via library interface \"ETISSINCLUDED\"\n", - "\n", - "ETISS: Info: Adding JIT \"TCCJIT\"\n", - "=== Setting up plug-ins ===\n", - "\n", - "\n", - "=== Simulation start ===\n", - "ETISS: Info: Init Plugin InterruptHandler{COROUTINE}\n", - "ETISS: Info: Init Plugin QVanillaAcceleratorT{COROUTINE,SYSTEMWRAPPER}\n", - "ETISS: Info: Init Plugin Logger{SYSTEMWRAPPER}\n", - "Program start.\n", - "# Setup Cycles: 42\n", - "# Setup Instructions: 42\n", - "# Run Cycles: 602870\n", - "# Run Instructions: 602870\n", - "# Total Cycles: 603103\n", - "# Total Instructions: 603103\n", - "Program finish.\n", - "MLONMCU EXIT: 0\n", - "CPU Time: 0.0193895s Simulation Time: 0.55283s\n", - "CPU Cycles (estimated): 620463\n", - "MIPS (estimated): 1.12234\n", - "=== Simulation end ===\n", - "\n", - "CPU0 exited with exception: 0x80000000: Finished cpu execution. This is the proper way to exit from etiss::CPUCore::execute.\n", - "warning: ignored: .eh_frame / size: 4\n", - "warning: ignored: .fini_array / size: 4\n", - "heap starts at: 0x8032a0\n", - "=== Results ===\n", - "ROM usage: 250.3 kB (0x3d1dc)\n", - " read-only data: 204.3 kB (0x31df0)\n", - " code: 46.0 kB (0xb3e0)\n", - " other required: 12 Bytes (0xc)\n", - "RAM usage: 12.9 kB (0x3284) [stack and heap usage not included]\n", - " data: 1.7 kB (0x6c0)\n", - " zero-init data: 11.2 kB (0x2bc4)\n", - " stack: unknown [missing trace file]\n", - " heap: unknown [missing trace file]\n", - "INFO - All runs completed successfuly!\n", - "INFO - Postprocessing session report\n", - "INFO - [session-55] Done processing runs\n", - "INFO - Report:\n", - " Session Run Model Frontend Framework Backend Platform Target Total Cycles Total Instructions Total CPI Total ROM Total RAM ROM read-only ROM code ROM misc RAM data RAM zero-init data Validation Features Config Postprocesses Comment\n", - "0 55 0 qnn_model tflite tvm tvmaotplus mlif etiss 603103 603103 1.0 250332 12932 204272 46048 12 1728 11204 True [vanilla_accelerator, uma_backends] {'qnn_model.metadata_path': 'definition.yml', ... [] -\n" + "INFO - Loading environment cache from file\r\n", + "INFO - Successfully initialized cache\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - [session-2] Processing stage LOAD\r\n", + "INFO - [session-2] Processing stage BUILD\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - [session-2] Processing stage COMPILE\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "INFO - [session-2] Processing stage RUN\r\n", + "=== Setting up configurations ===\r\n", + "Initializer::loadIni(): Ini sucessfully loaded /tmp/TVM-UMA-IfkK/workspace/deps/install/etiss/examples/base.ini\r\n", + "Initializer::loadIni(): Ini sucessfully loaded /tmp/etiss_dynamic_z55P0ayTsd.ini\r\n", + "Initializer::loadIni(): Ini sucessfully loaded /tmp/tmpe9ocuare/custom.ini\r\n", + " Load Configs from .ini files:\r\n", + "ETISS: Info: Created new config container: global\r\n", + "ETISS: Info: [BoolConfigurations]\r\n", + "ETISS: Info: arch.enable_semihosting=true,\r\n", + "ETISS: Info: arch.or1k.ignore_sr_iee=false,\r\n", + "ETISS: Info: etiss.enable_dmi=true,\r\n", + "ETISS: Info: etiss.load_integrated_libraries=true,\r\n", + "ETISS: Info: etiss.log_pc=false,\r\n", + "ETISS: Info: jit.debug=false,\r\n", + "ETISS: Info: jit.gcc.cleanup=true,\r\n", + "ETISS: Info: jit.verify=false,\r\n", + "ETISS: Info: testing=false,\r\n", + "ETISS: Info: [IntConfigurations]\r\n", + "ETISS: Warning: arch.cpu_cycle_time_ps=31250,31250, Multi values. Take only LAST one!\r\n", + "ETISS: Info: arch.or1k.if_stall_cycles=0,\r\n", + "ETISS: Info: arch.rv32imacfdpv.mstatus_fs=1,\r\n", + "ETISS: Info: etiss.max_block_size=100,\r\n", + "ETISS: Info: ETISS::CPU_quantum_ps=100000,\r\n", + "ETISS: Info: ETISS::sim_mode=0,\r\n", + "ETISS: Info: ETISS::write_pc_trace_from_time_us=0,\r\n", + "ETISS: Info: ETISS::write_pc_trace_until_time_us=3000000,\r\n", + "ETISS: Warning: simple_mem_system.memseg_length_00=0x00080000,8388608, Multi values. Take only LAST one!\r\n", + "ETISS: Warning: simple_mem_system.memseg_length_01=0x00080000,67108864, Multi values. Take only LAST one!\r\n", + "ETISS: Warning: simple_mem_system.memseg_origin_00=0x00000000,0, Multi values. Take only LAST one!\r\n", + "ETISS: Warning: simple_mem_system.memseg_origin_01=0x00080000,8388608, Multi values. Take only LAST one!\r\n", + "ETISS: Info: vp::simulation_time_us=20000000,\r\n", + "ETISS: Info: [StringConfigurations]\r\n", + "ETISS: Info: arch.cpu=RV32IMACFD,\r\n", + "ETISS: Info: etiss.output_path_prefix=,\r\n", + "ETISS: Info: jit.type=TCCJIT,\r\n", + "ETISS: Info: vp.elf_file=/tmp/TVM-UMA-IfkK/workspace/temp/sessions/2/runs/0/generic_mlonmcu,\r\n", + "=== Finished setting up configurations ===\r\n", + "\r\n", + "=== Setting up test system ===\r\n", + " Setting up Memory\r\n", + "ETISS: Info: New Memory segment added: 1 - [0x00000000007fffff - 0x0000000000000000]\r\n", + "ETISS: Info: New Memory segment added: 2 - [0x00000000047fffff - 0x0000000000800000]\r\n", + "ETISS: Info: Assuming CPU architecture RV32IMACFD as set in configuration file. ELF architecture field will be ignored\r\n", + "ETISS: Info: Initialized the memory segment 1 - RWX[0x0000000000000000 - 0x000000000003c503] from ELF-file\r\n", + "ETISS: Info: Initialized the memory segment 2 - RW[0x0000000000800000 - 0x000000000080575f] from ELF-file\r\n", + " Setting up CPUCore\r\n", + " CPU start address: 0xb8\r\n", + "=== Finished Setting up test system ===\r\n", + "\r\n", + "=== Setting up plug-ins ===\r\n", + "ETISS: Info: Adding Plugin QVanillaAcceleratorT\r\n", + "\r\n", + "ETISS: Info: Plugin \"QVanillaAcceleratorT\" loaded via library interface \"QVanillaAcceleratorT\"\r\n", + "\r\n", + "ETISS: Info: Adding Plugin Logger\r\n", + "\r\n", + "ETISS: Info: plugin.logger.logaddr not set on the command line. Checking in .ini file.\r\n", + "ETISS: Info: options[plugin.logger.logaddr] = 0x80000000\r\n", + "\r\n", + "\r\n", + "ETISS: Info: plugin.logger.logmask not set on the command line. Checking in .ini file.\r\n", + "ETISS: Info: options[plugin.logger.logmask] = 0x80000000\r\n", + "\r\n", + "\r\n", + "ETISS: Info: Plugin \"Logger\" loaded via library interface \"ETISSINCLUDED\"\r\n", + "\r\n", + "ETISS: Info: Adding JIT \"TCCJIT\"\r\n", + "=== Setting up plug-ins ===\r\n", + "\r\n", + "\r\n", + "=== Simulation start ===\r\n", + "ETISS: Info: Init Plugin InterruptHandler{COROUTINE}\r\n", + "ETISS: Info: Init Plugin QVanillaAcceleratorT{COROUTINE,SYSTEMWRAPPER}\r\n", + "ETISS: Info: Init Plugin Logger{SYSTEMWRAPPER}\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Program start.\r\n", + "start time= 311593750\r\n", + "start cpu cycle= 9971\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "# Setup Cycles: 42\r\n", + "# Setup Instructions: 42\r\n", + "# Run Cycles: 527029\r\n", + "# Run Instructions: 527029\r\n", + "# Total Cycles: 527262\r\n", + "# Total Instructions: 527262\r\n", + "Program finish.\r\n", + "MLONMCU EXIT: 0\r\n", + "CPU Time: 0.0171297s Simulation Time: 0.367881s\r\n", + "CPU Cycles (estimated): 548150\r\n", + "MIPS (estimated): 1.49002\r\n", + "=== Simulation end ===\r\n", + "\r\n", + "CPU0 exited with exception: 0x80000000: Finished cpu execution. This is the proper way to exit from etiss::CPUCore::execute.\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "warning: ignored: .eh_frame / size: 4\r\n", + "warning: ignored: .fini_array / size: 4\r\n", + "heap starts at: 0x805760\r\n", + "=== Results ===\r\n", + "ROM usage: 247.1 kB (0x3c50c)\r\n", + " read-only data: 204.2 kB (0x31dd0)\r\n", + " code: 42.8 kB (0xa730)\r\n", + " other required: 12 Bytes (0xc)\r\n", + "RAM usage: 22.3 kB (0x5744) [stack and heap usage not included]\r\n", + " data: 1.7 kB (0x6c0)\r\n", + " zero-init data: 20.6 kB (0x5084)\r\n", + " stack: unknown [missing trace file]\r\n", + " heap: unknown [missing trace file]\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "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", + " Session Run Model Frontend Framework Backend Platform Target Total Cycles Total Instructions Total CPI Total ROM Total RAM ROM read-only ROM code ROM misc RAM data RAM zero-init data Validation Features Config Postprocesses Comment\r\n", + "0 2 0 qnn_model tflite tvm tvmaotplus mlif etiss 527262 527262 1.0 247052 22340 204240 42800 12 1728 20612 True [vanilla_accelerator, uma_backends] {'qnn_model.metadata_path': 'definition.yml', ... [] -\r\n" ] } ], @@ -1080,21 +1311,21 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.8.18" }, "papermill": { "default_parameters": {}, - "duration": 817.548275, - "end_time": "2024-01-08T10:35:51.576179", + "duration": 18.111786, + "end_time": "2024-02-06T10:19:37.628707", "environment_variables": {}, "exception": null, - "input_path": "/home/runner/work/mlonmcu/mlonmcu/ipynb/Examples/ValidateOutputs/ValidateOutputs.ipynb", - "output_path": "/home/runner/work/mlonmcu/mlonmcu/ipynb/Examples/ValidateOutputs/ValidateOutputs.ipynb", + "input_path": "/home/runner/work/mlonmcu/mlonmcu/ipynb/Examples/TVM-UMA/TVM-UMA.ipynb", + "output_path": "/home/runner/work/mlonmcu/mlonmcu/ipynb/Examples/TVM-UMA/TVM-UMA.ipynb", "parameters": {}, - "start_time": "2024-01-08T10:22:14.027904", + "start_time": "2024-02-06T10:19:19.516921", "version": "2.5.0" } }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file