diff --git a/rfcs/0060_UMA_Unified_Modular_Accelerator_Interface.md b/rfcs/0060_UMA_Unified_Modular_Accelerator_Interface.md index 6b402a52..91cbcd25 100644 --- a/rfcs/0060_UMA_Unified_Modular_Accelerator_Interface.md +++ b/rfcs/0060_UMA_Unified_Modular_Accelerator_Interface.md @@ -388,3 +388,100 @@ Below is a list of currently planned configuration parameters for the initial ve |Parameter|Type|Description| |---------|----|-----------| |merge_compiler_regions|bool (default: True)|Enables/disables the `MergeCompilerRegions` pass during partitioning.| + + +## TVMC integration + +Proposals: + - Add uma_cli functionality that is currently only used for the tutorial + - possibility to compile with tvmc + - integrate the UMA targets with the tvmc run command + +## Tutorial + +Three mock-accelerators: see $TVM_HOME/gallery/tutorial/uma.py for details + +### Vanilla + See tutorial + +### Strawberry + +differences to Vanilla: + - show how a TIR pass is implemented and used in UMA + +Propose hardware architecture: + +![](assets/0060/uma_strawberry.png) + + +Pseudo-code of run.py example: + +``` +main(){ + layer1(); + layer2(); + layer3-conv2d-uma(); + layer4(); +} + +layer3-conv2d-uma(){ + dma_copy(ifmap); + dma_copy(weights); + strawberry_calculate(); + dma_copy(ofmap); +} +``` + + + +### UMA chocolate + +Proposed topics to be covered in Chocolate part of tutorial: + - tiling + - tuning + - configuration (via configure_stub) + - irq handling / polling + +Propose hardware architecture: + +TDB + +Pseudo-code of run.py example: +``` +main{ + layer1(); + layer2(); + layer3-conv2-uma(); + layer4(); +} + +layer3-conv2d-uma(){ + for (tilex){ + for (tiley){ + dma_copy(ifmap); + dma_copy(weights); + strawberry_conv2d_calculate(); + dma_copy(ofmap); + } + } +} + +strawberry_conv2d_calculate(*ifmap,*weight,*ofmap, kx, ky, ci, ...){ + configure_stub(); + exeucute_stub(**args); + irq_stub(); +} + +exucute_stub(){ + //c implementation of conv2d +} + +configure_stub(){ + //empty for first shot +} + +irq_stub(){ + //empty for first shot +} +``` + diff --git a/rfcs/assets/0060/uma_strawberry.drawio b/rfcs/assets/0060/uma_strawberry.drawio new file mode 100644 index 00000000..98225c95 --- /dev/null +++ b/rfcs/assets/0060/uma_strawberry.drawio @@ -0,0 +1 @@ +5VjbcpswEP0aHusRV8Njgp2kM/U0LdMmfVSQAswAokI2uF9fqQhzkR07GdtxW48fVmd13XPYFWimn9W3FBbxgiCcagZAtWbONMPQLcPQxB+gdYNMbQlENEGyUwcEyS8sQSDRZYJwOejICElZUgzBkOQ5DtkAg5SSatjtmaTDVQsYYQUIQpiq6EOCWNygrg06/A4nUdyurAPpyWDbWQJlDBGpepA510yfEsIaK6t9nIrgtXFpxt3s8G42RnHODhkw979k6OdddZVnnz775c1376vzQZdsrGC6lCeWu2XrNgR844Uwn1NcX4mQauY1zpE0Z2EKyzIJOVgySJkKxyxLOaBzk5JljrDYEOAt9QTyUBgNSJHnucUkw4yueYeqo2IT8LhPQwtSnEKWrIZkQqmJaDPhZo17kvC9GEDq13TsZohUr9uS2U5RkiUNsRzVD/6eiSx3NBEPXYSZMhE3egfvoD/cvoZnU+HZv/+mUN3xI9iq4oThoICh8Fb8+R6SuZO+FaYM1y8S2Ho9MAiLDWSY+gQbWwh2wG4qB7F7daCsLQ+Ek/Jlr1Gy4mYkzIBRWD1hKhZsnHyxnn/LkBZ6omPkMoZemBKcluF9StBPJwVnf248Sh7kUaPrx37jh2hM7LY5q/vO2fqY+dPeElP7SNlzOuLU8iZe//e2XGpZo2ntM+fS6bl0USfsUXqE3VMFb3WiEI29mmiie0CJuBDxWGDEsmu/tfSOaoxpvaTCU4vH/TfFY/0f4pla5801hlqDgpjzgzi2wBmRZe49K/c4HdsHV+7xHfholdtQM/RscfXukVJuu+6BkTrZFcf4K7PRhSQZUx8lGeBNpkfKM44OJsZorlOnGk/RwsecYZrDVH2LCEIKWRgXEKm+C8lLBhin7i3vlts+Hoyvkwc8bbzZfchpCOk+h5nz3w== \ No newline at end of file diff --git a/rfcs/assets/0060/uma_strawberry.png b/rfcs/assets/0060/uma_strawberry.png new file mode 100644 index 00000000..ec2dce43 Binary files /dev/null and b/rfcs/assets/0060/uma_strawberry.png differ diff --git a/rfcs/assets/0060/uma_vanilla.drawio b/rfcs/assets/0060/uma_vanilla.drawio new file mode 100644 index 00000000..ee685b27 --- /dev/null +++ b/rfcs/assets/0060/uma_vanilla.drawio @@ -0,0 +1 @@ +5VdNc5swEP01HNsBCez4mGInOTTTtJ6myVGDNkYzAlEhG+ivryjCIIiLncnXtDM+7D5JK+m9x2IcHCblpSRZfC0ocAe5tHTw0kHI8xFy6p9LqwaZBwbYSEbNpA5Ys19gQNegW0YhtyYqIbhimQ1GIk0hUhZGpBSFPe1BcHvXjGxgBKwjwsfoD0ZV3KBngdvhV8A2cbuz55qRhLSTDZDHhIqiB+GVg0MphGqipAyB1+S1vDTrLg6M7g8mIVXHLFiFXxP686o4T5PPX8L84nbxbfbBVNkRvjUXNodVVcuAPndWhw8cyvOaUQd/gpSacBlxkucs0mCuiFRjOFYJ14CnQym2KYX6PK7OxhcwpwFqaWKucwkiASUrPaHolNjzHfdVaEEJnCi2s7UkxhKbfcH9HjeC6bMg19gXz4JmiTGvjwK7RC62MgKzqs/9RCHkDQpp6jagRoV00Lt4B/2R9gSZ0Ujm8Ob7SOlOnlqsImYK1hmJ6tFCP922lgfV24FUUP5Vv3Z04dqs+Cbv64se0XfmHlbSou5UnvCIp1uSMs7Ju+MKB2/NlT/iah3rG1KNXUMizA5vyZnvD/yFj+TMO3sp0ubT/fZZeqsmTVZ3/eS+Tj4Gbbos+4PLaqonNw1q2g6n9O7gEeqDZ+rc88HjggaKHtu5/WBQaD4o9MKde/FahimZujMjddyzi846t9TJpFkacqffR+/ELL5ra+w/1Sx4Nmg4r2yW9k/zP+YW/H+4BQ/fOk92i06774pmevd1hle/AQ== \ No newline at end of file diff --git a/rfcs/assets/0060/uma_vanilla.png b/rfcs/assets/0060/uma_vanilla.png new file mode 100644 index 00000000..b3487c0d Binary files /dev/null and b/rfcs/assets/0060/uma_vanilla.png differ