Skip to content

Commit

Permalink
hero: Patch to remove snrt_global_reduction_dma from snRuntime
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilKoe committed Feb 22, 2024
1 parent 32a87ab commit 68e3d75
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
31 changes: 31 additions & 0 deletions vendor/patches/snitch/00_remove_snrt_global_reduction_dma.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/sw/snRuntime/src/sync.c b/sw/snRuntime/src/sync.c
index 10d6bd6..79bf9e2 100644
--- a/sw/snRuntime/src/sync.c
+++ b/sw/snRuntime/src/sync.c
@@ -28,5 +28,7 @@ extern void snrt_global_barrier();

extern void snrt_partial_barrier(snrt_barrier_t *barr, uint32_t n);

+/*
extern void snrt_global_reduction_dma(double *dst_buffer, double *src_buffer,
size_t len);
+*/
\ No newline at end of file
diff --git a/sw/snRuntime/src/sync.h b/sw/snRuntime/src/sync.h
index 433289b..4019931 100644
--- a/sw/snRuntime/src/sync.h
+++ b/sw/snRuntime/src/sync.h
@@ -122,6 +122,7 @@ inline void snrt_partial_barrier(snrt_barrier_t *barr, uint32_t n) {

// Assumes the dst and src buffers are at the same offset in the TCDM of every
// cluster
+/*
inline void snrt_global_reduction_dma(double *dst_buffer, double *src_buffer,
size_t len) {
// If we have a single cluster the reduction degenerates to a memcpy
@@ -176,3 +177,4 @@ inline void snrt_global_reduction_dma(double *dst_buffer, double *src_buffer,
}
}
}
+*/
\ No newline at end of file
2 changes: 1 addition & 1 deletion vendor/snitch.lock.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
upstream:
{
url: https://github.com/pulp-platform/snitch_cluster.git
rev: 6e72f08eaa56959637aa3450b8ac84d1ef84710c
rev: 4b3f76e5ad6bdde7af15559401c47d3a64262db9
}
}
2 changes: 1 addition & 1 deletion vendor/snitch.vendor.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/pulp-platform/snitch_cluster.git",
"rev": "main"
},
"patch_dir": "",
"patch_dir": "patches/snitch",
"exclude_from_upstream": [
".github",
"docs",
Expand Down
2 changes: 2 additions & 0 deletions vendor/snitch/sw/snRuntime/src/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ extern void snrt_global_barrier();

extern void snrt_partial_barrier(snrt_barrier_t *barr, uint32_t n);

/*
extern void snrt_global_reduction_dma(double *dst_buffer, double *src_buffer,
size_t len);
*/
2 changes: 2 additions & 0 deletions vendor/snitch/sw/snRuntime/src/sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ inline void snrt_partial_barrier(snrt_barrier_t *barr, uint32_t n) {

// Assumes the dst and src buffers are at the same offset in the TCDM of every
// cluster
/*
inline void snrt_global_reduction_dma(double *dst_buffer, double *src_buffer,
size_t len) {
// If we have a single cluster the reduction degenerates to a memcpy
Expand Down Expand Up @@ -176,3 +177,4 @@ inline void snrt_global_reduction_dma(double *dst_buffer, double *src_buffer,
}
}
}
*/

0 comments on commit 68e3d75

Please sign in to comment.