add some test cases in test-backend-op perf

This commit is contained in:
bssrdf 2025-11-03 10:10:51 -05:00
parent 91650b7fdc
commit f0ced9fb3d
2 changed files with 46 additions and 2 deletions

View File

@ -7374,6 +7374,50 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_perf() {
} }
} }
for (ggml_type kernel_type : {GGML_TYPE_F32, GGML_TYPE_F16}) {
for (int N : {1}) {
for (int IC : {320, 640}) {
for (int OC : {320, 640}) {
for (int s0 : {1}) {
for (int p1 : {1}) {
for (int d2 : {1}) {
int64_t IW = 26, IH = 38, ID = 8;
int64_t KW = 3, KH = 3, KD = 3;
int s1 = s0, s2 = s0;
int p0 = p1, p2 = p1;
int d0 = d2, d1 = d2;
test_cases.emplace_back(new test_conv_3d(
N, IC, ID, IH, IW,
OC, KD, KH, KW,
s0, s1, s2, p0, p1, p2, d0, d1, d2,
kernel_type));
IW = 52; IH = 76;
test_cases.emplace_back(new test_conv_3d(
N, IC, ID, IH, IW,
OC, KD, KH, KW,
s0, s1, s2, p0, p1, p2, d0, d1, d2,
kernel_type));
IW = 104; IH = 158;
test_cases.emplace_back(new test_conv_3d(
N, IC, ID, IH, IW,
OC, KD, KH, KW,
s0, s1, s2, p0, p1, p2, d0, d1, d2,
kernel_type));
IW = 208; IH = 316;
test_cases.emplace_back(new test_conv_3d(
N, IC, ID, IH, IW,
OC, KD, KH, KW,
s0, s1, s2, p0, p1, p2, d0, d1, d2,
kernel_type));
}
}
}
}
}
}
}
test_cases.emplace_back(new test_bin_bcast(ggml_add, GGML_TYPE_F32, {4096, 1, 1, 1}, {1, 1, 1, 1})); test_cases.emplace_back(new test_bin_bcast(ggml_add, GGML_TYPE_F32, {4096, 1, 1, 1}, {1, 1, 1, 1}));
test_cases.emplace_back(new test_bin_bcast(ggml_add, GGML_TYPE_F32, {4096, 1, 1, 1}, {1, 512, 1, 1})); test_cases.emplace_back(new test_bin_bcast(ggml_add, GGML_TYPE_F32, {4096, 1, 1, 1}, {1, 512, 1, 1}));

View File

@ -38,8 +38,8 @@ struct test_model {
}; };
void load_model(test_model & model, int ic, int oc, int iw, int ih, int id, void load_model(test_model & model, int ic, int oc, int iw, int ih, int id,
int kw = 3, int kh = 3, int kd = 3, int kw, int kh, int kd,
bool use_fp16 = true, bool use_gpu = false ); bool use_fp16, bool use_gpu);
struct ggml_cgraph * build_graph_0(const test_model& model, const int64_t ic, const int64_t n, const int64_t oc); struct ggml_cgraph * build_graph_0(const test_model& model, const int64_t ic, const int64_t n, const int64_t oc);
struct ggml_cgraph * build_graph_1(const test_model& model, const int64_t ic, const int64_t n, const int64_t oc); struct ggml_cgraph * build_graph_1(const test_model& model, const int64_t ic, const int64_t n, const int64_t oc);
typedef struct ggml_cgraph* (*build_graph_t)(const test_model& model, typedef struct ggml_cgraph* (*build_graph_t)(const test_model& model,