Skip to content

Commit

Permalink
conv2d: Remove register array declarations for LLVM 15
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Oct 24, 2023
1 parent 42ae792 commit 44d89bb
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions sw/dnn/src/conv2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ void bn_relu(const float *pBuffer, const uint16_t dim_x, const uint16_t dim_y,
volatile register v2s current_kappa = ((v2s *)kappa)[co];
volatile register v2s zero = (v2s)0.0;

volatile register v2s tmp[n_unroll];
volatile v2s tmp[n_unroll];

snrt_ssr_enable();

Expand Down Expand Up @@ -418,7 +418,7 @@ void bn_relu(const float *pBuffer, const uint16_t dim_x, const uint16_t dim_y,
volatile register v2s current_kappa = ((v2s *)kappa)[co];
volatile register v2s zero = (v2s)0.0;

volatile register v2s tmp[n_unroll];
volatile v2s tmp[n_unroll];

snrt_ssr_enable();

Expand Down Expand Up @@ -649,7 +649,7 @@ static inline void conv2d_fp64(kernel_fp64 *k) {
// Output width dimension `k->dim_out_x`
for (uint32_t w = 0; w < k->dim_out_x; w++) {
// TODO: check if initialization needs to be unrolled by hand
volatile register double sum[max_unroll];
volatile double sum[max_unroll];
if (k->flag_y_accumulate_start) {
for (uint32_t i = 0; i < max_unroll; i++) {
sum[i] = 0.0;
Expand Down Expand Up @@ -714,7 +714,7 @@ static inline void conv2d_fp64(kernel_fp64 *k) {

// Output width dimension `k->dim_out_x`
for (uint32_t w = 0; w < k->dim_out_x; w++) {
volatile register double sum[max_unroll];
volatile double sum[max_unroll];
if (k->flag_y_accumulate_start) {
for (uint32_t i = 0; i < cleanup_unroll; i++) {
sum[i] = 0.0;
Expand Down Expand Up @@ -1005,8 +1005,8 @@ static inline void conv2d_fp32(kernel_fp32 *k) {
for (h0 = 0; h0 < k->dim_out_y / max_unroll; h0++) {
// Output width dimension `k->dim_out_x`
for (uint32_t w = 0; w < k->dim_out_x; w++) {
volatile register v2s sum[max_unroll];
volatile register float reduce_reg[max_unroll];
volatile v2s sum[max_unroll];
volatile float reduce_reg[max_unroll];
// pointer to output buffer location where intermediate values
// are read from and stored
float *_pOutBuffer =
Expand Down Expand Up @@ -1096,8 +1096,8 @@ static inline void conv2d_fp32(kernel_fp32 *k) {

// Output width dimension `k->dim_out_x`
for (uint32_t w = 0; w < k->dim_out_x; w++) {
volatile register v2s sum[max_unroll];
volatile register float reduce_reg[max_unroll];
volatile v2s sum[max_unroll];
volatile float reduce_reg[max_unroll];

// pointer to output buffer location where intermediate values
// are read from and stored
Expand Down Expand Up @@ -1438,7 +1438,7 @@ static inline void conv2d_dw_fp32(kernel_fp32 *k) {

// Output width dimension `k->dim_out_x`
for (uint32_t w = 0; w < k->dim_out_x; w++) {
volatile register v2s sum[max_unroll];
volatile v2s sum[max_unroll];
// pointer to output buffer location where intermediate values
// are read from and stored
v2s *_pOutBuffer =
Expand Down Expand Up @@ -1507,7 +1507,7 @@ static inline void conv2d_dw_fp32(kernel_fp32 *k) {

// Output width dimension `k->dim_out_x`
for (uint32_t w = 0; w < k->dim_out_x; w++) {
volatile register v2s sum[max_unroll];
volatile v2s sum[max_unroll];

// pointer to output buffer location where intermediate values
// are read from and stored
Expand Down Expand Up @@ -1784,8 +1784,8 @@ static inline void conv2d_chw_fp32(kernel_fp32 *k) {

// Output width dimension `k->dim_out_x`
for (uint32_t w = 0; w < k->dim_out_x; w++) {
volatile register v2s sum[max_unroll];
volatile register float reduce_reg[max_unroll];
volatile v2s sum[max_unroll];
volatile float reduce_reg[max_unroll];
// pointer to output buffer location where intermediate
// values are read from and stored
float *_pOutBuffer = &k->pOutBuffer[h * output_h_stride +
Expand Down Expand Up @@ -1880,8 +1880,8 @@ static inline void conv2d_chw_fp32(kernel_fp32 *k) {

// Output width dimension `k->dim_out_x`
for (uint32_t w = 0; w < k->dim_out_x; w++) {
volatile register v2s sum[max_unroll];
volatile register float reduce_reg[max_unroll];
volatile v2s sum[max_unroll];
volatile float reduce_reg[max_unroll];

// pointer to output buffer location where intermediate
// values are read from and stored
Expand Down

0 comments on commit 44d89bb

Please sign in to comment.