Skip to content

Commit

Permalink
misc: Update CI to apply patches to Ethos driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
iabdalkader committed Jul 7, 2024
1 parent 7f0b69c commit 635dac6
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/tflm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ jobs:
repository: tensorflow/tflite-micro
ref: 8c458fc48ee972ea4fc56ddc08849823b9af7ea8

- name: '⏳ Checkout Ethos Driver'
uses: actions/checkout@v4
with:
submodules: false
path: tflite-micro/tensorflow/lite/micro/tools/make/downloads/ethos_u_core_driver
repository: mlplatform/ethos-u/ethos-u-core-driver
ref: 23.05

- name: '⏳ Apply Patches'
run: |
cd tflite-micro
git apply ../patches/ethosu_driver.patch --directory=tensorflow/lite/micro/tools/make/downloads/ethos_u_core_driver/
- name: '♻ Caching dependencies'
uses: actions/cache@v4.0.2
id: cache
Expand Down
74 changes: 74 additions & 0 deletions patches/ethosu_driver.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
diff --git a/src/ethosu_config_u55.h b/src/ethosu_config_u55.h
index 9330bb1..c1ce4a1 100644
--- a/src/ethosu_config_u55.h
+++ b/src/ethosu_config_u55.h
@@ -22,11 +22,11 @@
/* Set default values if not manually overriden */

#ifndef NPU_QCONFIG
-#define NPU_QCONFIG 2
+#define NPU_QCONFIG 0
#endif

#ifndef NPU_REGIONCFG_0
-#define NPU_REGIONCFG_0 3
+#define NPU_REGIONCFG_0 0
#endif

#ifndef NPU_REGIONCFG_1
@@ -58,11 +58,11 @@
#endif

#ifndef AXI_LIMIT0_MAX_BEATS_BYTES
-#define AXI_LIMIT0_MAX_BEATS_BYTES 0x0
+#define AXI_LIMIT0_MAX_BEATS_BYTES 0x1
#endif

#ifndef AXI_LIMIT0_MEM_TYPE
-#define AXI_LIMIT0_MEM_TYPE 0x0
+#define AXI_LIMIT0_MEM_TYPE 0x2
#endif

#ifndef AXI_LIMIT0_MAX_OUTSTANDING_READS
@@ -74,11 +74,11 @@
#endif

#ifndef AXI_LIMIT1_MAX_BEATS_BYTES
-#define AXI_LIMIT1_MAX_BEATS_BYTES 0x0
+#define AXI_LIMIT1_MAX_BEATS_BYTES 0x1
#endif

#ifndef AXI_LIMIT1_MEM_TYPE
-#define AXI_LIMIT1_MEM_TYPE 0x0
+#define AXI_LIMIT1_MEM_TYPE 0x2
#endif

#ifndef AXI_LIMIT1_MAX_OUTSTANDING_READS
@@ -90,11 +90,11 @@
#endif

#ifndef AXI_LIMIT2_MAX_BEATS_BYTES
-#define AXI_LIMIT2_MAX_BEATS_BYTES 0x0
+#define AXI_LIMIT2_MAX_BEATS_BYTES 0x1
#endif

#ifndef AXI_LIMIT2_MEM_TYPE
-#define AXI_LIMIT2_MEM_TYPE 0x0
+#define AXI_LIMIT2_MEM_TYPE 0x2
#endif

#ifndef AXI_LIMIT2_MAX_OUTSTANDING_READS
@@ -106,11 +106,11 @@
#endif

#ifndef AXI_LIMIT3_MAX_BEATS_BYTES
-#define AXI_LIMIT3_MAX_BEATS_BYTES 0x0
+#define AXI_LIMIT3_MAX_BEATS_BYTES 0x1
#endif

#ifndef AXI_LIMIT3_MEM_TYPE
-#define AXI_LIMIT3_MEM_TYPE 0x0
+#define AXI_LIMIT3_MEM_TYPE 0x2
#endif

#ifndef AXI_LIMIT3_MAX_OUTSTANDING_READS

0 comments on commit 635dac6

Please sign in to comment.