File tree 5 files changed +50
-29
lines changed
5 files changed +50
-29
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,11 @@ ifeq ($(INTEL_FPGA),1)
69
69
EXTRA_CONFIG := $(EXTRA_CONFIG)_nocache
70
70
endif
71
71
72
+ ifdef DEPTH
73
+ KERNEL_FLAGS += -DDEPTH $(DEPTH)
74
+ EXTRA_CONFIG := $(EXTRA_CONFIG)_depth$(DEPTH)
75
+ endif
76
+
72
77
ifdef TFMAX
73
78
KERNEL_FLAGS += $(DASH)fmax$(SPACE)$(TFMAX)
74
79
EXTRA_CONFIG := $(EXTRA_CONFIG)_tfmax$(TFMAX)
Original file line number Diff line number Diff line change 13
13
#define write_channel write_channel_intel
14
14
#endif
15
15
16
+ #ifndef DEPTH
17
+ #define DEPTH 16
18
+ #endif
19
+
16
20
typedef struct
17
21
{
18
22
float data [VEC ];
19
23
} CHAN_WIDTH ;
20
24
21
- channel CHAN_WIDTH ch_R1W1 __attribute__((depth (16 ))) ;
22
- channel CHAN_WIDTH ch_R2W1_a __attribute__((depth (16 ))) ;
23
- channel CHAN_WIDTH ch_R2W1_b __attribute__((depth (16 ))) ;
24
- channel CHAN_WIDTH ch_R3W1_a __attribute__((depth (16 ))) ;
25
- channel CHAN_WIDTH ch_R3W1_b __attribute__((depth (16 ))) ;
26
- channel CHAN_WIDTH ch_R3W1_c __attribute__((depth (16 ))) ;
27
- channel CHAN_WIDTH ch_R2W2_a __attribute__((depth (16 ))) ;
28
- channel CHAN_WIDTH ch_R2W2_b __attribute__((depth (16 ))) ;
25
+ channel CHAN_WIDTH ch_R1W1 __attribute__((depth (DEPTH ))) ;
26
+ channel CHAN_WIDTH ch_R2W1_a __attribute__((depth (DEPTH ))) ;
27
+ channel CHAN_WIDTH ch_R2W1_b __attribute__((depth (DEPTH ))) ;
28
+ channel CHAN_WIDTH ch_R3W1_a __attribute__((depth (DEPTH ))) ;
29
+ channel CHAN_WIDTH ch_R3W1_b __attribute__((depth (DEPTH ))) ;
30
+ channel CHAN_WIDTH ch_R3W1_c __attribute__((depth (DEPTH ))) ;
31
+ channel CHAN_WIDTH ch_R2W2_a __attribute__((depth (DEPTH ))) ;
32
+ channel CHAN_WIDTH ch_R2W2_b __attribute__((depth (DEPTH ))) ;
29
33
30
34
//=====================================================================
31
35
// NDRange Kernels
Original file line number Diff line number Diff line change 13
13
#define write_channel write_channel_intel
14
14
#endif
15
15
16
+ #ifndef DEPTH
17
+ #define DEPTH 16
18
+ #endif
19
+
16
20
typedef struct
17
21
{
18
22
float data [VEC ];
19
23
} CHAN_WIDTH ;
20
24
21
- channel CHAN_WIDTH ch_R1W1 __attribute__((depth (16 ))) ;
22
- channel CHAN_WIDTH ch_R2W1_a __attribute__((depth (16 ))) ;
23
- channel CHAN_WIDTH ch_R2W1_b __attribute__((depth (16 ))) ;
24
- channel CHAN_WIDTH ch_R3W1_a __attribute__((depth (16 ))) ;
25
- channel CHAN_WIDTH ch_R3W1_b __attribute__((depth (16 ))) ;
26
- channel CHAN_WIDTH ch_R3W1_c __attribute__((depth (16 ))) ;
27
- channel CHAN_WIDTH ch_R2W2_a __attribute__((depth (16 ))) ;
28
- channel CHAN_WIDTH ch_R2W2_b __attribute__((depth (16 ))) ;
25
+ channel CHAN_WIDTH ch_R1W1 __attribute__((depth (DEPTH ))) ;
26
+ channel CHAN_WIDTH ch_R2W1_a __attribute__((depth (DEPTH ))) ;
27
+ channel CHAN_WIDTH ch_R2W1_b __attribute__((depth (DEPTH ))) ;
28
+ channel CHAN_WIDTH ch_R3W1_a __attribute__((depth (DEPTH ))) ;
29
+ channel CHAN_WIDTH ch_R3W1_b __attribute__((depth (DEPTH ))) ;
30
+ channel CHAN_WIDTH ch_R3W1_c __attribute__((depth (DEPTH ))) ;
31
+ channel CHAN_WIDTH ch_R2W2_a __attribute__((depth (DEPTH ))) ;
32
+ channel CHAN_WIDTH ch_R2W2_b __attribute__((depth (DEPTH ))) ;
29
33
30
34
//=====================================================================
31
35
// NDRange Kernels
Original file line number Diff line number Diff line change 13
13
#define write_channel write_channel_intel
14
14
#endif
15
15
16
+ #ifndef DEPTH
17
+ #define DEPTH 16
18
+ #endif
19
+
16
20
typedef struct
17
21
{
18
22
float data [VEC ];
19
23
} CHAN_WIDTH ;
20
24
21
- channel CHAN_WIDTH ch_R1W0 __attribute__((depth (16 ))) ;
22
- channel CHAN_WIDTH ch_R1W1 __attribute__((depth (16 ))) ;
23
- channel CHAN_WIDTH ch_R2W1_a __attribute__((depth (16 ))) ;
24
- channel CHAN_WIDTH ch_R2W1_b __attribute__((depth (16 ))) ;
25
- channel CHAN_WIDTH ch_R3W1_a __attribute__((depth (16 ))) ;
26
- channel CHAN_WIDTH ch_R3W1_b __attribute__((depth (16 ))) ;
27
- channel CHAN_WIDTH ch_R3W1_c __attribute__((depth (16 ))) ;
28
- channel CHAN_WIDTH ch_R2W2_a __attribute__((depth (16 ))) ;
29
- channel CHAN_WIDTH ch_R2W2_b __attribute__((depth (16 ))) ;
25
+ channel CHAN_WIDTH ch_R1W0 __attribute__((depth (DEPTH ))) ;
26
+ channel CHAN_WIDTH ch_R1W1 __attribute__((depth (DEPTH ))) ;
27
+ channel CHAN_WIDTH ch_R2W1_a __attribute__((depth (DEPTH ))) ;
28
+ channel CHAN_WIDTH ch_R2W1_b __attribute__((depth (DEPTH ))) ;
29
+ channel CHAN_WIDTH ch_R3W1_a __attribute__((depth (DEPTH ))) ;
30
+ channel CHAN_WIDTH ch_R3W1_b __attribute__((depth (DEPTH ))) ;
31
+ channel CHAN_WIDTH ch_R3W1_c __attribute__((depth (DEPTH ))) ;
32
+ channel CHAN_WIDTH ch_R2W2_a __attribute__((depth (DEPTH ))) ;
33
+ channel CHAN_WIDTH ch_R2W2_b __attribute__((depth (DEPTH ))) ;
30
34
31
35
//=====================================================================
32
36
// NDRange Kernels
Original file line number Diff line number Diff line change 13
13
#define write_channel write_channel_intel
14
14
#endif
15
15
16
+ #ifndef DEPTH
17
+ #define DEPTH 16
18
+ #endif
19
+
16
20
#define HALF_VEC VEC/2
17
21
#define WGS 64
18
22
@@ -22,11 +26,11 @@ typedef struct
22
26
} CHAN_WIDTH ;
23
27
24
28
#ifdef FPGA_1
25
- channel CHAN_WIDTH sch_copy_out0 __attribute__((depth (16 ))) __attribute__((io ("kernel_output_ch0" ))) ;
26
- channel CHAN_WIDTH sch_copy_out1 __attribute__((depth (16 ))) __attribute__((io ("kernel_output_ch1" ))) ;
29
+ channel CHAN_WIDTH sch_copy_out0 __attribute__((depth (DEPTH ))) __attribute__((io ("kernel_output_ch0" ))) ;
30
+ channel CHAN_WIDTH sch_copy_out1 __attribute__((depth (DEPTH ))) __attribute__((io ("kernel_output_ch1" ))) ;
27
31
#else
28
- channel CHAN_WIDTH sch_copy_in0 __attribute__((depth (16 ))) __attribute__((io ("kernel_input_ch0" ))) ;
29
- channel CHAN_WIDTH sch_copy_in1 __attribute__((depth (16 ))) __attribute__((io ("kernel_input_ch1" ))) ;
32
+ channel CHAN_WIDTH sch_copy_in0 __attribute__((depth (DEPTH ))) __attribute__((io ("kernel_input_ch0" ))) ;
33
+ channel CHAN_WIDTH sch_copy_in1 __attribute__((depth (DEPTH ))) __attribute__((io ("kernel_input_ch1" ))) ;
30
34
#endif
31
35
32
36
#ifdef NDR //NDRange kernels
You can’t perform that action at this time.
0 commit comments