Skip to content

Commit 7be571b

Browse files
author
georg
committed
fix linting
1 parent 7a65b7e commit 7be571b

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

neureka/hal/neureka.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ typedef struct neureka_dev_t {
3030
hwpe_dev_t hwpe_dev; /* Implements the HWPE device interface */
3131
} neureka_dev_t;
3232

33-
3433
int neureka_task_queue_tasks_in_flight(const neureka_dev_t *dev);
3534
int neureka_task_queue_empty(const neureka_dev_t *dev);
3635
int neureka_task_queue_full(const neureka_dev_t *dev);

neureka/hal/neureka_task.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,17 @@ void neureka_task_set_strides(neureka_task_t *task, const uint32_t k_in,
166166
task->data.cfg.output_stride = output_stride;
167167

168168
if (task->kernel_shape == 1) { // 1x1
169-
task->data.cfg.weights_stride.d0 = NEUREKA_WEIGHT_BANDWIDTH_BYTES_1x1;
170-
task->data.cfg.weights_stride.d1 =
171-
(NEUREKA_WEIGHT_BANDWIDTH_BYTES_1x1 / 8) * task->qw * num_k_in;
169+
task->data.cfg.weights_stride.d0 = NEUREKA_WEIGHT_BANDWIDTH_BYTES_1x1;
170+
task->data.cfg.weights_stride.d1 =
171+
(NEUREKA_WEIGHT_BANDWIDTH_BYTES_1x1 / 8) * task->qw * num_k_in;
172172
} else if (!task->depthwise) { // 3x3
173-
task->data.cfg.weights_stride.d0 = NEUREKA_WEIGHT_BANDWIDTH_BYTES_3x3;
174-
task->data.cfg.weights_stride.d1 =
175-
NEUREKA_WEIGHT_BANDWIDTH_BYTES_3x3 * task->qw * num_k_in;
173+
task->data.cfg.weights_stride.d0 = NEUREKA_WEIGHT_BANDWIDTH_BYTES_3x3;
174+
task->data.cfg.weights_stride.d1 =
175+
NEUREKA_WEIGHT_BANDWIDTH_BYTES_3x3 * task->qw * num_k_in;
176176

177177
} else { // 3x3 depthwise
178-
task->data.cfg.weights_stride.d0 = NEUREKA_WEIGHT_BANDWIDTH_BYTES_3x3;
179-
task->data.cfg.weights_stride.d1 = 0;
178+
task->data.cfg.weights_stride.d0 = NEUREKA_WEIGHT_BANDWIDTH_BYTES_3x3;
179+
task->data.cfg.weights_stride.d1 = 0;
180180
}
181181
task->data.cfg.weights_stride.d2 = 0;
182182
}

neureka/hal/neureka_task_defs.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#define __NEUREKA_DEFS_H__
2323

2424
/* ARCHITECTURE */
25-
// The definitions wrapped in #ifndefs can be overwritten with compiler flags for
26-
// different parametrizations of the Neureka architecture
25+
// The definitions wrapped in #ifndefs can be overwritten with compiler flags
26+
// for different parametrizations of the Neureka architecture
2727
#ifndef NNX_NEUREKA_PE_H
2828
#define NNX_NEUREKA_PE_H (6)
2929
#endif
@@ -36,10 +36,10 @@
3636
#define NNX_NEUREKA_BANDWIDTH_3x3 (256)
3737

3838
#define NEUREKA_SUBTILE_INPUT_HEIGHT_1x1 (NNX_NEUREKA_PE_H)
39-
#define NEUREKA_SUBTILE_INPUT_WIDTH_1x1 (NNX_NEUREKA_PE_W)
39+
#define NEUREKA_SUBTILE_INPUT_WIDTH_1x1 (NNX_NEUREKA_PE_W)
4040
#define NEUREKA_SUBTILE_INPUT_CHANNEL_1x1 (32)
4141

42-
#define NEUREKA_SUBTILE_INPUT_HEIGHT_3x3 (NNX_NEUREKA_PE_H+2)
42+
#define NEUREKA_SUBTILE_INPUT_HEIGHT_3x3 (NNX_NEUREKA_PE_H + 2)
4343
#define NEUREKA_SUBTILE_INPUT_WIDTH_3x3 (NNX_NEUREKA_PE_W + 2)
4444
#ifndef NEUREKA_SUBTILE_INPUT_CHANNEL_3x3
4545
#define NEUREKA_SUBTILE_INPUT_CHANNEL_3x3 (28)
@@ -50,8 +50,8 @@
5050
#define NEUREKA_SUBTILE_OUTPUT_CHANNEL (32)
5151

5252
#define NEUREKA_OUTPUT_BANDWIDTH_BYTES (32)
53-
#define NEUREKA_WEIGHT_BANDWIDTH_BYTES_1x1 (NNX_NEUREKA_BANDWIDTH_1x1/8)
54-
#define NEUREKA_WEIGHT_BANDWIDTH_BYTES_3x3 (NNX_NEUREKA_BANDWIDTH_3x3/8)
53+
#define NEUREKA_WEIGHT_BANDWIDTH_BYTES_1x1 (NNX_NEUREKA_BANDWIDTH_1x1 / 8)
54+
#define NEUREKA_WEIGHT_BANDWIDTH_BYTES_3x3 (NNX_NEUREKA_BANDWIDTH_3x3 / 8)
5555

5656
/* TASK REGISTERS */
5757

util/hwpe.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ inline uint32_t hwpe_reg_read(const hwpe_dev_t *dev, int reg) {
3838
return dev->base_addr[reg];
3939
}
4040

41-
inline void hwpe_task_reg_write(const hwpe_dev_t *dev, int reg, uint32_t value) {
41+
inline void hwpe_task_reg_write(const hwpe_dev_t *dev, int reg,
42+
uint32_t value) {
4243
hwpe_reg_write(dev, HWPE_TASK_REG_OFFSET + reg, value);
4344
}
4445

@@ -66,7 +67,8 @@ int hwpe_task_queue_acquire_task(const hwpe_dev_t *dev, uint8_t *id) {
6667
}
6768
}
6869

69-
void hwpe_task_queue_write_task(const hwpe_dev_t *dev, uint32_t *data, int len) {
70+
void hwpe_task_queue_write_task(const hwpe_dev_t *dev, uint32_t *data,
71+
int len) {
7072
for (int i = 0; i < len; i++) {
7173
hwpe_task_reg_write(dev, i, data[i]);
7274
}

0 commit comments

Comments
 (0)