Skip to content

Commit f0a594c

Browse files
author
Yao ZHANG
authored
Merge pull request #310 from GreenWaves-Technologies/4.9_dev
4.9 dev
2 parents eb89bfe + f11eed0 commit f0a594c

File tree

885 files changed

+97933
-55445
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

885 files changed

+97933
-55445
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,19 @@ openocd.checkout:
178178
fi
179179

180180
openocd.build: openocd.checkout
181-
cd utils/openocd && ./bootstrap && ./configure --enable-jtag_dpi --prefix=$(INSTALL_DIR)/openocd && make && make install
181+
cd utils/openocd && ./bootstrap && ./configure --enable-jtag_dpi --prefix=$(INSTALL_DIR)/openocd && $(MAKE) && $(MAKE) install
182182

183183
openocd.clean:
184184
rm -rf $(INSTALL_DIR)/openocd tools/openocd
185185

186+
PROFILER_V2_DIR = $(GAP_SDK_HOME)/tools/profiler_v2
187+
PROFILER_V2_BUILD_DIR = $(GAP_SDK_HOME)/build/profiler_v2
188+
189+
profiler_v2:
190+
cmake -S $(PROFILER_V2_DIR) -B $(PROFILER_V2_BUILD_DIR)
191+
cmake --build $(PROFILER_V2_BUILD_DIR)
192+
cmake --install $(PROFILER_V2_BUILD_DIR) --prefix $(INSTALL_DIR)
193+
186194
profiler:
187195
$(MAKE) -C tools/profiler all
188196
mkdir -p $(INSTALL_DIR)/bin

configs/common.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ export NNTOOL_KERNELS_PATH=$NNTOOL_DIR/autotiler/kernels
2121
export NNTOOL_MATH_PATH=$NNTOOL_DIR/autotiler/math_funcs
2222
export NNTOOL_GENERATOR_PATH=$NNTOOL_DIR/autotiler/generators
2323
export PATH=$PATH:"$GAP_SDK_HOME"
24-
export PATH=$PATH:"$NNTOOL_DIR"
24+
export PATH="$NNTOOL_DIR":$PATH
2525

2626
# OpenMP
2727
export OPENMP_DIR="$GAP_SDK_HOME/libs/openmp"
2828

2929
# PulpOS 2
3030
export PULPOS_HOME=$GAP_SDK_HOME/rtos/pulp/pulpos-2
31-
export PULPOS_MODULES="$GAP_SDK_HOME/rtos/pulp/pulpos-2_gap8 $GAP_SDK_HOME/rtos/pulp/pulpos-2_gap9 $GAP_SDK_HOME/rtos/pmsis/pmsis_bsp $OPENMP_DIR $GAP_SDK_HOME/rtos/sfu"
31+
export PULPOS_MODULES="$GAP_SDK_HOME/rtos/pmsis/pmsis_implem $GAP_SDK_HOME/rtos/pulp/pulpos-2_gap8 $GAP_SDK_HOME/rtos/pulp/pulpos-2_gap9 $GAP_SDK_HOME/rtos/pmsis/pmsis_bsp $OPENMP_DIR $GAP_SDK_HOME/rtos/sfu"
3232
export PULPOS_GAP8_HOME=$GAP_SDK_HOME/rtos/pulp/pulpos-2_gap8
3333
export PULPOS_GAP9_HOME=$GAP_SDK_HOME/rtos/pulp/pulpos-2_gap9
3434
export GAP_PULPOS_ARCHI=$GAP_SDK_HOME/rtos/pulp/gap_archi
@@ -47,6 +47,9 @@ export RUNTIME_PATH=$GAP_SDK_HOME/pulp-os
4747
# For FreeRTOS
4848
export FREERTOS_PATH=$GAP_SDK_HOME/rtos/freeRTOS
4949

50+
# For PMSIS
51+
export PMSIS_HOME=$GAP_SDK_HOME/rtos/pmsis
52+
5053
export PATH="$INSTALL_DIR/bin":$PATH
5154
export LD_LIBRARY_PATH="$INSTALL_DIR/lib":$LD_LIBRARY_PATH
5255
export PYTHONPATH=$INSTALL_DIR/python:$PYTHONPATH
@@ -62,7 +65,7 @@ export GVSOC_SRC_PATH=$GAP_SDK_HOME/gvsoc/gvsoc
6265
export GVSOC_GAP_SRC_PATH=$GAP_SDK_HOME/gvsoc/gvsoc_gap
6366
export GVSOC_SFU_PATH=$GAP_SDK_HOME/gvsoc/gvsoc_gap_sfu
6467
source $GAP_SDK_HOME/gvsoc/setup_gvsoc.sh
65-
if [ -e "$GAP_SDK_HOME/configs/skip_udma_build" ]; then
68+
if [ -d "$GAP_SDK_HOME/gvsoc/gvsoc_libs" ]; then
6669
export CONFIG_GVSOC_SKIP_UDMA_BUILD=1
6770
fi
6871
export PYTHONPATH=$GAP_SDK_HOME/gvsoc/gvsoc_gap/models:$PYTHONPATH
@@ -73,7 +76,8 @@ export PYTHONPATH=$GAP_SDK_HOME/gvsoc/gvsoc/engine/python:$PYTHONPATH
7376
export PATH="$GAP_SDK_HOME/utils/gaptest":$PATH
7477

7578
# Audio framework
76-
export PYTHONPATH=$GAP_SDK_HOME/tools/audio-framework/frontends/python_graph_generator:$GAP_SDK_HOME/tools/audio-framework/components:$PYTHONPATH
79+
export GAP_AUDIO_FRAMEWORK_HOME=$GAP_SDK_HOME/tools/audio-framework
80+
export PYTHONPATH=$GAP_AUDIO_FRAMEWORK_HOME/frontends/python_graph_generator:$GAP_AUDIO_FRAMEWORK_HOME/components:$PYTHONPATH
7781

7882

7983
# Autotiler

configs/gapuino_v3.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ export OPENOCD_CABLE=interface/ftdi/gapuino_ftdi.cfg
2323

2424
export GAPY_TARGET=gapuino_v3
2525

26+
export PLPTEST_DEFAULT_PROPERTIES="chip=gap8_v3 chip_family=gap8 board=gapuino_v3 duration=50 test_duration=50"
27+
2628
source $GAP_SDK_HOME/configs/common.sh

configs/openocd.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ else
99
fi
1010

1111
export PATH=$GAP_SDK_HOME/install/workstation/openocd/bin:$PATH
12+
13+
# Path to openocd scripts
14+
export OPENOCD_SCRIPTS=$GAP_SDK_HOME/utils/openocd_tools
15+

doc/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def configure_doxyfile(file_in, file_out, replace_dict):
3535
"../rtos/pmsis/pmsis_api/include/pmsis/rtos/",
3636
"../rtos/pmsis/pmsis_api/include/pmsis/cluster/",
3737
"../rtos/pmsis/pmsis_api/include/pmsis/platforms/",
38+
"../rtos/pmsis/pmsis_api/include/pmsis/",
3839
"../rtos/pmsis/pmsis_bsp/include/",
3940
"source/reference/builtins/headers/",
4041
]
@@ -86,6 +87,10 @@ def configure_doxyfile(file_in, file_out, replace_dict):
8687
html_theme = "sphinx_rtd_theme"
8788
html_logo = "_static/logo.png"
8889

90+
html_theme_options = {
91+
'navigation_depth' : -1,
92+
}
93+
8994
# Add any paths that contain custom static files (such as style sheets) here,
9095
# relative to this directory. They are copied after the builtin static files,
9196
# so a file named "default.css" will overwrite the builtin "default.css".

examples/autotiler/BilinearResize/Bilinear_Resize.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,12 @@ void run_Bilinear_Resize(void)
115115
cluster_call.ImageOut = ImageOut;
116116

117117
/* Prepare task to be offload to Cluster. */
118-
struct pi_cluster_task task = {0};
119-
task.entry = (void *) cluster_main;
120-
task.arg = &cluster_call;
118+
struct pi_cluster_task task;
119+
pi_cluster_task(&task, (void *) cluster_main, &cluster_call);
121120
task.stack_size = (uint32_t) STACK_SIZE;
122121

123122
/* Execute the function "cluster_main" on the Core 0 of cluster. */
124-
pi_cluster_send_task_to_cl(&cluster_dev, &task);
123+
pi_cluster_send_task(&cluster_dev, &task);
125124

126125
pi_l1_free(&cluster_dev, Resize_L1_Memory, _Resize_L1_Memory_SIZE);
127126

examples/autotiler/Cifar10/Cifar10.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,10 @@ void test_cifar10(void)
336336
}
337337

338338
struct pi_cluster_task *task = pmsis_l2_malloc(sizeof(struct pi_cluster_task));
339-
memset(task, 0, sizeof(struct pi_cluster_task));
340-
task->entry = RunCifar10;
341-
task->arg = NULL;
339+
pi_cluster_task(task, RunCifar10, NULL);
342340
// task->stack_size = 2048*2;
343341

344-
pi_cluster_send_task_to_cl(&cluster_dev, task);
342+
pi_cluster_send_task(&cluster_dev, task);
345343

346344
pmsis_l1_malloc_free(Cifar10_L1_Memory, _Cifar10_L1_Memory_SIZE);
347345

examples/autotiler/FFT2DModel/TestFFT2D.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,10 @@ void fft_2d(void)
103103
}
104104

105105
struct pi_cluster_task *task = pmsis_l2_malloc(sizeof(struct pi_cluster_task));
106-
memset(task, 0, sizeof(struct pi_cluster_task));
107-
task->entry = (void *)Process;
108-
task->arg = (void *) NULL;
106+
pi_cluster_task(task, (void *)Process, (void *) NULL);
109107
task->stack_size = (uint32_t) STACK_SIZE;
110108

111-
pi_cluster_send_task_to_cl(&cluster_dev, task);
109+
pi_cluster_send_task(&cluster_dev, task);
112110

113111
// Close the cluster
114112
pi_cluster_close(&cluster_dev);

examples/autotiler/FFTL1/FFTRunTest.c

Lines changed: 65 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
#define pmsis_exit(a) exit(a)
55
#endif
66

7+
#ifndef SILENT
8+
#define PRINTF printf
9+
#else
10+
#define PRINTF(...) ((void) 0)
11+
#endif
12+
713
#define __XSTR(__s) __STR(__s)
814
#define __STR(__s) #__s
915
#include <stdlib.h>
@@ -21,7 +27,8 @@
2127
#endif
2228
#define STACK_SIZE 2048
2329
typedef void (*FFTFun_T )(void *Data, void *Twiddles, signed char *shift, unsigned int Nfft, unsigned int Inverse);
24-
30+
PI_L2 int PERF_ARR[6][3][2];
31+
PI_L2 float MSE_ARR[6][2];
2532

2633
short int *InBuff_q16;
2734
float *InBuff_f32, *InBuff_f32R4, *OutBuff_f32;
@@ -58,14 +65,14 @@ float MSE_f32(float* real, float* calc, int Size){
5865
void CallFFT(int Nfft, int Type){
5966

6067
// FFT: reset buffers, run and check mse
61-
int start, elapsed, elapsedFFT, Q;
68+
int start, elapsed, elapsedFFT, Q = 0;
6269
FFT_InstallArg_T ArgIns;
6370
FFT_Arg_T FFTArg;
6471
AT_L2_EVENT DmaR_Evt1;
65-
void (*FFTFun)(FFT_Arg_T*);
66-
void (*SwapFun)(SwapSamples_Arg_T*);
72+
void (*FFTFun)(FFT_Arg_T*) = 0;
73+
void (*SwapFun)(SwapSamples_Arg_T*) = 0;
6774
char *FFTDataType = 0;
68-
void *InBuff;
75+
void *InBuff = 0;
6976

7077
ArgIns.Nfft = Nfft;
7178
ArgIns.Radix = ((Nfft)==64 || (Nfft)==256 || (Nfft)==1024)?4:2;
@@ -96,11 +103,11 @@ void CallFFT(int Nfft, int Type){
96103
FFTDataType = "Q16";
97104
switch (Nfft) {
98105
case 64: ArgIns.Twiddles = R4_Twiddles_fix_64; ArgIns.SwapLUT = R4_SwapTable_fix_64; Q = 10; break;
99-
case 128: ArgIns.Twiddles = R2_Twiddles_fix_128; ArgIns.SwapLUT = R2_SwapTable_fix_128; Q = 8; break;
100-
case 256: ArgIns.Twiddles = R4_Twiddles_fix_256; ArgIns.SwapLUT = R4_SwapTable_fix_256; Q = 8; break;
101-
case 512: ArgIns.Twiddles = R2_Twiddles_fix_512; ArgIns.SwapLUT = R2_SwapTable_fix_512; Q = 6; break;
102-
case 1024: ArgIns.Twiddles = R4_Twiddles_fix_1024; ArgIns.SwapLUT = R4_SwapTable_fix_1024; Q = 6; break;
103-
case 2048: ArgIns.Twiddles = R2_Twiddles_fix_2048; ArgIns.SwapLUT = R2_SwapTable_fix_2048; Q = 4; break;
106+
case 128: ArgIns.Twiddles = R2_Twiddles_fix_128; ArgIns.SwapLUT = R2_SwapTable_fix_128; Q = 7; break;
107+
case 256: ArgIns.Twiddles = R4_Twiddles_fix_256; ArgIns.SwapLUT = R4_SwapTable_fix_256; Q = 6; break;
108+
case 512: ArgIns.Twiddles = R2_Twiddles_fix_512; ArgIns.SwapLUT = R2_SwapTable_fix_512; Q = 5; break;
109+
case 1024: ArgIns.Twiddles = R4_Twiddles_fix_1024; ArgIns.SwapLUT = R4_SwapTable_fix_1024; Q = 4; break;
110+
case 2048: ArgIns.Twiddles = R2_Twiddles_fix_2048; ArgIns.SwapLUT = R2_SwapTable_fix_2048; Q = 3; break;
104111
}
105112
if (ArgIns.Radix == 2) FFTFun = &Radix2FFT_DIF_Par_Fix16;
106113
else FFTFun = &Radix4FFT_DIF_Par_Fix16;
@@ -139,24 +146,32 @@ void CallFFT(int Nfft, int Type){
139146
__CALL((*FFTFun), &FFTArg);
140147
AT_FORK(gap_ncore(), (void *) (*SwapFun), (void *) &SwapArg);
141148
__CALL((*SwapFun), &SwapArg);
142-
elapsed = gap_cl_readhwtimer() - start; printf("| %4d | %3s %6s | %6d | %5d | %6d", Nfft, FFTDataType, ArgIns.Radix==2?"Radix2":"Radix4", elapsedFFT, elapsed, elapsed+elapsedFFT);
149+
elapsed = gap_cl_readhwtimer() - start;
150+
151+
PERF_ARR[Nfft/128][Type][0] = elapsedFFT;
152+
PERF_ARR[Nfft/128][Type][1] = elapsed;
153+
154+
155+
PRINTF("| %4d | %3s %6s | %6d | %5d | %6d", Nfft, FFTDataType, ArgIns.Radix==2?"Radix2":"Radix4", elapsedFFT, elapsed, elapsed+elapsedFFT);
143156
#if !defined(__EMUL__) && defined(PERF_ALL)
144-
printf(" | %7d | %7d | %7d | %8d | %7d |", pi_perf_read(PI_PERF_INSTR), pi_perf_read(PI_PERF_ACTIVE_CYCLES), pi_perf_read(PI_PERF_TCDM_CONT), pi_perf_read(PI_PERF_LD_STALL), pi_perf_read(PI_PERF_IMISS));
157+
PRINTF(" | %7d | %7d | %7d | %8d | %7d |", pi_perf_read(PI_PERF_INSTR), pi_perf_read(PI_PERF_ACTIVE_CYCLES), pi_perf_read(PI_PERF_TCDM_CONT), pi_perf_read(PI_PERF_LD_STALL), pi_perf_read(PI_PERF_IMISS));
145158
#else
146-
printf(" | | | | | |");
159+
PRINTF(" | | | | | |");
147160
#endif
148161
if (Type == 0) {
149-
printf(" |\n");
150-
// printf("\nOutFFT%d_f32 = np.array([\n", Nfft); for(int i=0;i<(Nfft); i++) printf("%f%+fj, ", InBuff_f32[2*i], InBuff_f32[2*i+1]); printf("])\n");
162+
PRINTF(" |\n");
163+
// PRINTF("\nOutFFT%d_f32 = np.array([\n", Nfft); for(int i=0;i<(Nfft); i++) PRINTF("%f%+fj, ", InBuff_f32[2*i], InBuff_f32[2*i+1]); PRINTF("])\n");
151164
} else if (Type == 1) {
152-
// printf("\nOutFFT%d_q16 = np.array([\n", Nfft); for(int i=0;i<(Nfft); i++) printf("%d%+dj, ", ((short int*)InBuff_q16)[2*i], ((short int*)InBuff_q16)[2*i+1]); printf("])\n");
153-
printf(" %f |\n", MSE_16(InBuff_f32, (short int*) InBuff_q16, Nfft, Q));
165+
// PRINTF("\nOutFFT%d_q16 = np.array([\n", Nfft); for(int i=0;i<(Nfft); i++) PRINTF("%d%+dj, ", ((short int*)InBuff_q16)[2*i], ((short int*)InBuff_q16)[2*i+1]); PRINTF("])\n");
166+
MSE_ARR[Nfft/128][0] = MSE_16(InBuff_f32, (short int*) InBuff_q16, Nfft, Q);
167+
PRINTF(" %f |\n", MSE_ARR[Nfft/128][0]);
154168
} else if (Type == 2) {
155169
#ifdef __gap9__
156-
// printf("\nOutFFT%d_f16 = np.array([\n", Nfft); for(int i=0;i<(Nfft); i++) printf("%f%+fj, ", ((f16*)OutBuff)[2*i], ((f16*)OutBuff)[2*i+1]); printf("])\n");
157-
printf(" %f |\n", MSE_f16(InBuff_f32, (f16 *) InBuff_f16, Nfft));
170+
// PRINTF("\nOutFFT%d_f16 = np.array([\n", Nfft); for(int i=0;i<(Nfft); i++) PRINTF("%f%+fj, ", ((f16*)OutBuff)[2*i], ((f16*)OutBuff)[2*i+1]); PRINTF("])\n");
171+
MSE_ARR[Nfft/128][1] = MSE_f16(InBuff_f32, (f16 *) InBuff_f16, Nfft);
172+
PRINTF(" %f |\n", MSE_ARR[Nfft/128][1]);
158173
#else
159-
printf("\n");
174+
PRINTF("\n");
160175
#endif
161176
}
162177
}
@@ -171,31 +186,31 @@ static void RunFFT()
171186
#endif
172187
gap_cl_resethwtimer();
173188
int start, elapsed, timef32;
174-
printf("Initializing inputs....\n");
189+
PRINTF("Initializing inputs....\n");
175190
//InitData4 (InDataQ16, MAXDIM, 37, 15, 23, 73, 0.1, 0.5, 0.6, 0.8);
176191
//InitData4_float(InDataf32, MAXDIM, 37, 15, 23, 73, 0.1, 0.5, 0.6, 0.8);
177192
#ifdef __gap9__
178193
for (int i=0; i<MAXDIM; i++) InDataf16[i] = (f16) InDataf32[i];
179194
#endif
180-
printf("Done!\n");
195+
PRINTF("Done!\n");
181196

182197
gap_cl_resethwtimer();
183198

184199
int FFTBins = 64;
185-
printf("|----------+------------+--------+-------+--------+---------+---------+---------+----------+---------+----------|\n");
186-
printf("| FFT BINS | Type | FFT | Swap | Tot | Instr | Act Cyc | TCDM Co | LD Stall | Imiss | MSE Err |\n");
187-
printf("|----------+------------+--------+-------+--------+---------+---------+---------+----------+---------+----------|\n");
200+
PRINTF("|----------+------------+--------+-------+--------+---------+---------+---------+----------+---------+----------|\n");
201+
PRINTF("| FFT BINS | Type | FFT | Swap | Tot | Instr | Act Cyc | TCDM Co | LD Stall | Imiss | MSE Err |\n");
202+
PRINTF("|----------+------------+--------+-------+--------+---------+---------+---------+----------+---------+----------|\n");
188203
while (FFTBins < MAXDIM){
189-
//printf("FFT: %4d\n", FFTBins);
204+
//PRINTF("FFT: %4d\n", FFTBins);
190205
CallFFT(FFTBins, 0);
191206
CallFFT(FFTBins, 1);
192207
#ifdef __gap9__
193208
CallFFT(FFTBins, 2);
194209
#endif
195210
FFTBins *= 2;
196-
printf("|----------+------------+--------+-------+--------+---------+---------+---------+----------+---------+----------|\n");
211+
PRINTF("|----------+------------+--------+-------+--------+---------+---------+---------+----------+---------+----------|\n");
197212
}
198-
printf("Finished\n");
213+
PRINTF("Finished\n");
199214
}
200215

201216
void test_kickoff(void *arg)
@@ -231,14 +246,31 @@ void test_kickoff(void *arg)
231246
#ifdef __EMUL__
232247
RunFFT();
233248
#else
234-
struct pi_cluster_task task = {0};
235-
task.entry = RunFFT;
236-
task.arg = NULL;
249+
struct pi_cluster_task task;
250+
pi_cluster_task(&task, RunFFT, NULL);
237251
task.stack_size = (unsigned int) STACK_SIZE;
238252
task.slave_stack_size = (unsigned int) 1048;
239-
pi_cluster_send_task_to_cl(&cluster_dev, &task);
253+
pi_cluster_send_task(&cluster_dev, &task);
240254
#endif
241-
printf("Exiting\n");
255+
256+
int FFTBins = 64;
257+
while (FFTBins < MAXDIM){
258+
if (MSE_ARR[FFTBins/128][0] > 0.016) {
259+
printf("Error: MSE too large for %d FFT Q16\n", FFTBins);
260+
printf("Test FAILED\n");
261+
pmsis_exit(-1);
262+
}
263+
#ifdef __gap9__
264+
if (MSE_ARR[FFTBins/128][1] > 0.000048) {
265+
printf("Error: MSE too large for %d FFT F16\n", FFTBins);
266+
printf("Test FAILED\n");
267+
pmsis_exit(-1);
268+
}
269+
#endif
270+
FFTBins *= 2;
271+
}
272+
273+
printf("Test PASSED\n");
242274
pmsis_exit(0);
243275
}
244276

examples/autotiler/FFTL1/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# User Test
22
#------------------------------------
33

4-
PMSIS_OS?=pulpos
4+
#PMSIS_OS?=pulpos
55
APP = test
66
APP_SRCS += FFTRunTest.c $(AT_HOME)/DSP_Libraries/FFT_Library.c $(AT_HOME)/DSP_Libraries/LUT_Tables/TwiddlesDef.c $(AT_HOME)/DSP_Libraries/LUT_Tables/SwapTablesDef.c
77
APP_INC +=

examples/autotiler/Fir/main.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,10 @@ void test_fir()
194194

195195
printf ("Call cluster\n");
196196
struct pi_cluster_task *task = pmsis_l2_malloc(sizeof(struct pi_cluster_task));
197-
memset(task, 0, sizeof(struct pi_cluster_task));
198-
task->entry = cluster_main;
199-
task->arg = (void *) NULL;
197+
pi_cluster_task(task, cluster_main, NULL);
200198
task->stack_size = (uint32_t) STACK_SIZE;
201199

202-
pi_cluster_send_task_to_cl(&cluster_dev, task);
200+
pi_cluster_send_task(&cluster_dev, task);
203201

204202
pi_cluster_close(&cluster_dev);
205203

examples/autotiler/IRFFT2D/FFTRunTest.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,10 @@ void test_kickoff(void *arg)
102102
#ifdef __EMUL__
103103
RunFFT();
104104
#else
105-
struct pi_cluster_task task = {0};
106-
task.entry = RunFFT;
107-
task.arg = NULL;
105+
struct pi_cluster_task task;
106+
pi_cluster_task(&task, RunFFT, NULL);
108107
task.stack_size = (unsigned int) STACK_SIZE;
109-
pi_cluster_send_task_to_cl(&cluster_dev, &task);
108+
pi_cluster_send_task(&cluster_dev, &task);
110109
#endif
111110

112111

examples/autotiler/IntegralImage/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void integral_image(int argc, char *argv[])
126126

127127
pi_cluster_task(task, (void (*)(void *))cluster_main, (void *) &ClusterCall);
128128

129-
pi_cluster_send_task_to_cl(&cluster_dev, task);
129+
pi_cluster_send_task(&cluster_dev, task);
130130

131131
//Enable Debug to print to stdout the result image
132132
if(DEBUG){

examples/autotiler/MatMult/MatMult.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,12 @@ void run_MatMult(void)
107107
}
108108

109109
/* Prepare cluster task and send it to cluster. */
110-
struct pi_cluster_task task = {0};
111-
task.entry = cluster_main;
112-
task.arg = NULL;
110+
struct pi_cluster_task task;
111+
pi_cluster_task(&task, cluster_main, NULL);
113112
task.stack_size = (uint32_t) STACK_SIZE;
114113

115114
/* Offloading Task to cluster. */
116-
pi_cluster_send_task_to_cl(&cluster_dev, &task);
115+
pi_cluster_send_task(&cluster_dev, &task);
117116

118117
pi_l1_free(&cluster_dev, L1_Memory, _L1_Memory_SIZE);
119118

0 commit comments

Comments
 (0)