Skip to content

Commit ebe9e41

Browse files
committed
Fix input args function
1 parent 8efa6db commit ebe9e41

File tree

7 files changed

+15
-31
lines changed

7 files changed

+15
-31
lines changed

tests/opencl/Makefile

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ all:
2222
$(MAKE) -C sgemm2
2323
$(MAKE) -C sgemm3
2424
$(MAKE) -C psum
25-
$(MAKE) -C kernel1
26-
$(MAKE) -C kernel2
27-
$(MAKE) -C kernel3
2825

2926
run-simx:
3027
$(MAKE) -C vecadd run-simx
@@ -46,9 +43,6 @@ run-simx:
4643
$(MAKE) -C sgemm2 run-simx
4744
$(MAKE) -C sgemm3 run-simx
4845
$(MAKE) -C psum run-simx
49-
$(MAKE) -C kernel1 run-simx
50-
$(MAKE) -C kernel2 run-simx
51-
$(MAKE) -C kernel3 run-simx
5246

5347
run-rtlsim:
5448
$(MAKE) -C vecadd run-rtlsim
@@ -70,9 +64,6 @@ run-rtlsim:
7064
$(MAKE) -C sgemm2 run-rtlsim
7165
$(MAKE) -C sgemm3 run-rtlsim
7266
$(MAKE) -C psum run-rtlsim
73-
$(MAKE) -C kernel1 run-rtlsim
74-
$(MAKE) -C kernel2 run-rtlsim
75-
$(MAKE) -C kernel3 run-rtlsim
7667

7768
run-opae:
7869
$(MAKE) -C vecadd run-opae
@@ -94,9 +85,6 @@ run-opae:
9485
$(MAKE) -C sgemm2 run-opae
9586
$(MAKE) -C sgemm3 run-opae
9687
$(MAKE) -C psum run-opae
97-
$(MAKE) -C kernel1 run-opae
98-
$(MAKE) -C kernel2 run-opae
99-
$(MAKE) -C kernel3 run-opae
10088

10189
clean:
10290
$(MAKE) -C vecadd clean
@@ -119,6 +107,3 @@ clean:
119107
$(MAKE) -C sgemm2 clean
120108
$(MAKE) -C sgemm3 clean
121109
$(MAKE) -C psum clean
122-
$(MAKE) -C kernel1 clean
123-
$(MAKE) -C kernel2 clean
124-
$(MAKE) -C kernel3 clean

tests/opencl/kernel1/common.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef COMMON_H
2+
#define COMMON_H
3+
4+
#define TS 4
5+
6+
#endif // COMMON_H

tests/opencl/kernel1/main.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <time.h>
1010
#include <unistd.h>
1111

12-
int TS = 0;
12+
int TS = 4;
1313
int M = 0, N = 0, K = 0;
1414

1515
static void show_usage() {
@@ -110,11 +110,8 @@ static void cleanup() {
110110

111111
static void parse_args(int argc, char **argv) {
112112
int c;
113-
while ((c = getopt(argc, argv, "T:n:M:N:K:h?")) != -1) {
113+
while ((c = getopt(argc, argv, "n:M:N:K:h?")) != -1) {
114114
switch (c) {
115-
case 'T':
116-
TS = atoi(optarg);
117-
break;
118115
case 'n':
119116
M = N = K = atoi(optarg);
120117
break;
@@ -336,4 +333,4 @@ int main(int argc, char **argv) {
336333
// free resureses
337334
cleanup();
338335
return errors;
339-
}
336+
}

tests/opencl/kernel2/main.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,8 @@ static void cleanup() {
111111

112112
static void parse_args(int argc, char **argv) {
113113
int c;
114-
while ((c = getopt(argc, argv, "T:n:M:N:K:h?")) != -1) {
114+
while ((c = getopt(argc, argv, "n:M:N:K:h?")) != -1) {
115115
switch (c) {
116-
case 'T':
117-
TS = atoi(optarg);
118-
break;
119116
case 'n':
120117
M = N = K = atoi(optarg);
121118
break;

tests/opencl/kernel3/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#ifndef COMMON_H
22
#define COMMON_H
33

4-
#define TS 16
5-
#define WPT 8
4+
#define TS 8
5+
#define WPT 4
66
#define RTS (TS/WPT)
77

88
#endif // COMMON_H

tests/opencl/kernel4/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef COMMON_H
22
#define COMMON_H
33

4-
#define TS 16
5-
#define WIDTH 8
4+
#define TS 8
5+
#define WIDTH 4
66

77
#endif // COMMON_H

tests/opencl/kernel4/kernel.cl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#define TS 32
2-
#define WIDTH 4
1+
#include "common.h"
32

43
#if WIDTH == 1
54
typedef float floatX;

0 commit comments

Comments
 (0)