Skip to content

Commit 6606eb1

Browse files
committed
Merge branch 'make-convs-A-stride' of https://github.com/ucb-bar/gemmini-rocc-tests into make-convs-A-stride
2 parents da29cba + 41dd988 commit 6606eb1

File tree

3 files changed

+0
-30
lines changed

3 files changed

+0
-30
lines changed

bareMetalC/conv.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88
#endif
99
#include "include/gemmini_testutils.h"
1010

11-
// #define BATCH_SIZE 4
12-
// #define IN_DIM 224
13-
// #define IN_CHANNELS 3
14-
// #define OUT_CHANNELS 32
15-
// #define KERNEL_DIM 3
16-
// #define PADDING 1
17-
// #define STRIDE 2
18-
1911
#ifndef BAREMETAL
2012

2113
#define BATCH_SIZE 4

bareMetalC/conv_with_pool.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@
88
#endif
99
#include "include/gemmini_testutils.h"
1010

11-
// #define BATCH_SIZE 4
12-
// #define IN_DIM 224
13-
// #define IN_CHANNELS 3
14-
// #define OUT_CHANNELS 32
15-
// #define KERNEL_DIM 3
16-
// #define PADDING 1
17-
// #define STRIDE 2
18-
//
19-
// #define POOL_SIZE 3
20-
// #define POOL_STRIDE 2
21-
// #define POOL_PADDING 1
22-
2311
#ifndef BAREMETAL
2412

2513
#define BATCH_SIZE 4
@@ -396,7 +384,6 @@ int main() {
396384
uint64_t start_gemmini = read_cycles();
397385

398386
tiled_conv_A_stride_auto(
399-
// tiled_conv(
400387
BATCH_SIZE, IN_DIM, IN_CHANNELS,
401388
OUT_CHANNELS, OUT_DIM,
402389
STRIDE, PADDING, KERNEL_DIM,

include/gemmini.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,9 +1079,7 @@ void sp_tiled_conv_A_stride(
10791079
for (int ocol = 0; ocol < ocols; ocol += DIM) {
10801080
const int I = ocols - ocol > DIM ? DIM : ocols - ocol;
10811081

1082-
// for (int och = 0; och < ochs; och += DIM) {
10831082
for (int och = 0; och < ochs; och += max_ochs_per_mvin) {
1084-
// const int J = ochs - och > DIM ? DIM : ochs - och;
10851083
const int J = ochs - och > max_ochs_per_mvin ? max_ochs_per_mvin : ochs - och;
10861084

10871085
const uint32_t D_sp_addr = D_sp_addr_start + (och / DIM) * batches * orows * ocols + b * orows * ocols + orow * ocols + ocol;
@@ -1145,9 +1143,6 @@ void sp_tiled_conv_A_stride(
11451143

11461144
gemmini_extended4_config_ld(out_channels * sizeof(elem_t), MVIN_SCALE_IDENTITY, false, krows * kcols * kchs, 1);
11471145

1148-
// for (int och = 0; och < ochs; och += DIM) {
1149-
// const int J = ochs - och > DIM ? DIM : ochs - och;
1150-
11511146
for (int och = 0; och < ochs; och += max_ochs_per_mvin) {
11521147
const int J = ochs - och > max_ochs_per_mvin ?
11531148
max_ochs_per_mvin : ochs - och;
@@ -1157,9 +1152,6 @@ void sp_tiled_conv_A_stride(
11571152
for (int kch = 0; kch < kchs; kch += DIM) {
11581153
const int K = kchs - kch > DIM ? DIM : kchs - kch;
11591154

1160-
// for (int kch = 0; kch < kchs; kch += max_kchs_per_mvin) {
1161-
// const int K = kchs - kch > max_kchs_per_mvin ? max_kchs_per_mvin : kchs - kch;
1162-
11631155
const uint32_t B_sp_addr = B_sp_addr_start + (och / DIM) * krows * kcols * kchs + krow * kcols * kchs + kcol * kchs + kch;
11641156

11651157
gemmini_extended_mvin2(weights + (krow*kernel_dim*in_channels + kcol*in_channels + kch) * out_channels + och,
@@ -1183,7 +1175,6 @@ void sp_tiled_conv_A_stride(
11831175
for (int krow = 0; krow < krows; krow++) {
11841176
const int irow = orow * stride + krow;
11851177

1186-
// for (int kcol = 0; kcol < kcols; kcol++) {
11871178
for (int kcol = 0; kcol < kcols; kcol++) {
11881179
const int icol = ocol * stride + kcol;
11891180

0 commit comments

Comments
 (0)