From b1e176834138ead55afc58a25ff32a8614d4c4b8 Mon Sep 17 00:00:00 2001 From: LG Date: Fri, 23 Feb 2024 13:00:20 +0000 Subject: [PATCH] add a tiny benchmark (#369) * tiny benchmark * Update fakemodel.go --- tests/go/fakemodel/fakemodel.go | 1 + tests/go/fakemodel/tiny.go | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 tests/go/fakemodel/tiny.go diff --git a/tests/go/fakemodel/fakemodel.go b/tests/go/fakemodel/fakemodel.go index bfeedf4ed..d82f878b7 100644 --- a/tests/go/fakemodel/fakemodel.go +++ b/tests/go/fakemodel/fakemodel.go @@ -14,6 +14,7 @@ var Models = map[string][]int{ "vgg16-imagenet": vgg16Imagenet, "slp-mnist": slpMNIST, "bert": bert, + "tiny": genFakeModel(8, 10000), } var Names = func(m map[string][]int) []string { diff --git a/tests/go/fakemodel/tiny.go b/tests/go/fakemodel/tiny.go new file mode 100644 index 000000000..e2f869d75 --- /dev/null +++ b/tests/go/fakemodel/tiny.go @@ -0,0 +1,9 @@ +package fakemodel + +func genFakeModel(k, n int) []int { + a := make([]int, n) + for i := range a { + a[i] = k + } + return a +}