forked from google/gemma.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
100 lines (90 loc) · 1.79 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# gemma.cpp is a lightweight, standalone C++ inference engine for the Gemma
# foundation models from Google.
load("@rules_license//rules:license.bzl", "license")
package(
default_applicable_licenses = ["//:license"],
default_visibility = ["//visibility:public"],
)
license(
name = "license",
package_name = "gemma_cpp",
)
# Dual-licensed Apache 2 and 3-clause BSD.
licenses(["notice"])
exports_files(["LICENSE"])
cc_library(
name = "transformer_ops",
hdrs = [
"ops.h",
],
deps = [
"//compression:compress",
"@hwy//:algo",
"@hwy//:dot",
"@hwy//:hwy",
"@hwy//:math",
"@hwy//:matvec",
"@hwy//:profiler",
"@hwy//:thread_pool",
"@hwy//hwy/contrib/sort:vqsort",
],
)
cc_library(
name = "args",
hdrs = [
"util/args.h",
],
deps = [
"@hwy//:hwy",
],
)
cc_library(
name = "gemma_lib",
srcs = [
"gemma.cc",
],
hdrs = [
"configs.h",
"gemma.h",
],
deps = [
":args",
":transformer_ops",
# "//base",
"//compression:compress",
"@hwy//:hwy",
"@hwy//:matvec",
"@hwy//:nanobenchmark", # timer
"@hwy//:profiler",
"@hwy//:thread_pool",
"@com_google_sentencepiece//:sentencepiece_processor",
],
)
cc_library(
name = "app",
hdrs = [
"util/app.h",
],
deps = [
":args",
":gemma_lib",
"@hwy//:hwy",
],
)
cc_binary(
name = "gemma",
srcs = [
"run.cc",
],
deps = [
":app",
":args",
":gemma_lib",
# "//base",
"//compression:compress",
"@hwy//:hwy",
"@hwy//:nanobenchmark",
"@hwy//:profiler",
"@hwy//:thread_pool",
],
)