Skip to content

Commit

Permalink
add a tiny benchmark (#369)
Browse files Browse the repository at this point in the history
* tiny benchmark

* Update fakemodel.go
  • Loading branch information
lgarithm authored Feb 23, 2024
1 parent 80dfa46 commit b1e1768
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/go/fakemodel/fakemodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 9 additions & 0 deletions tests/go/fakemodel/tiny.go
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit b1e1768

Please sign in to comment.