Skip to content

Commit f0ced9f

Browse files
committed
add some test cases in test-backend-op perf
1 parent 91650b7 commit f0ced9f

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

tests/test-backend-ops.cpp

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7374,6 +7374,50 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_perf() {
73747374
}
73757375
}
73767376

7377+
7378+
for (ggml_type kernel_type : {GGML_TYPE_F32, GGML_TYPE_F16}) {
7379+
for (int N : {1}) {
7380+
for (int IC : {320, 640}) {
7381+
for (int OC : {320, 640}) {
7382+
for (int s0 : {1}) {
7383+
for (int p1 : {1}) {
7384+
for (int d2 : {1}) {
7385+
int64_t IW = 26, IH = 38, ID = 8;
7386+
int64_t KW = 3, KH = 3, KD = 3;
7387+
int s1 = s0, s2 = s0;
7388+
int p0 = p1, p2 = p1;
7389+
int d0 = d2, d1 = d2;
7390+
test_cases.emplace_back(new test_conv_3d(
7391+
N, IC, ID, IH, IW,
7392+
OC, KD, KH, KW,
7393+
s0, s1, s2, p0, p1, p2, d0, d1, d2,
7394+
kernel_type));
7395+
IW = 52; IH = 76;
7396+
test_cases.emplace_back(new test_conv_3d(
7397+
N, IC, ID, IH, IW,
7398+
OC, KD, KH, KW,
7399+
s0, s1, s2, p0, p1, p2, d0, d1, d2,
7400+
kernel_type));
7401+
IW = 104; IH = 158;
7402+
test_cases.emplace_back(new test_conv_3d(
7403+
N, IC, ID, IH, IW,
7404+
OC, KD, KH, KW,
7405+
s0, s1, s2, p0, p1, p2, d0, d1, d2,
7406+
kernel_type));
7407+
IW = 208; IH = 316;
7408+
test_cases.emplace_back(new test_conv_3d(
7409+
N, IC, ID, IH, IW,
7410+
OC, KD, KH, KW,
7411+
s0, s1, s2, p0, p1, p2, d0, d1, d2,
7412+
kernel_type));
7413+
}
7414+
}
7415+
}
7416+
}
7417+
}
7418+
}
7419+
}
7420+
73777421
test_cases.emplace_back(new test_bin_bcast(ggml_add, GGML_TYPE_F32, {4096, 1, 1, 1}, {1, 1, 1, 1}));
73787422
test_cases.emplace_back(new test_bin_bcast(ggml_add, GGML_TYPE_F32, {4096, 1, 1, 1}, {1, 512, 1, 1}));
73797423

tests/test-conv3d.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ struct test_model {
3838
};
3939

4040
void load_model(test_model & model, int ic, int oc, int iw, int ih, int id,
41-
int kw = 3, int kh = 3, int kd = 3,
42-
bool use_fp16 = true, bool use_gpu = false );
41+
int kw, int kh, int kd,
42+
bool use_fp16, bool use_gpu);
4343
struct ggml_cgraph * build_graph_0(const test_model& model, const int64_t ic, const int64_t n, const int64_t oc);
4444
struct ggml_cgraph * build_graph_1(const test_model& model, const int64_t ic, const int64_t n, const int64_t oc);
4545
typedef struct ggml_cgraph* (*build_graph_t)(const test_model& model,

0 commit comments

Comments
 (0)