Spaces:
Runtime error
Runtime error
File size: 3,632 Bytes
d1a84ee |
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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# Sparse/Masked Matrix and Layer.
# [internal] load android_library_selector
# [internal] load android_cc_test:def.bzl
licenses(["notice"])
cc_library(
name = "layer",
hdrs = [
"sparse_linear_layer.h",
],
visibility = [
"//sparse_matmul:__subpackages__",
],
deps = [
":matrix",
"//sparse_matmul/numerics:types",
"//sparse_matmul/os:coop_threads",
"//sparse_matmul/vector:cache_aligned_vector",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings:str_format",
"@com_google_glog//:glog",
],
)
cc_library(
name = "matrix",
hdrs = [
"csr_blocksparse_matrix.h",
"masked_sparse_matrix.h",
],
visibility = [
"//sparse_matmul:__subpackages__",
],
deps = [
"//sparse_matmul/compute:kernels",
"//sparse_matmul/compute:matmul",
"//sparse_matmul/compute:thread_bounds",
"//sparse_matmul/numerics:types",
"//sparse_matmul/os:coop_threads",
"//sparse_matmul/vector:cache_aligned_vector",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings:str_format",
"@com_google_glog//:glog",
],
)
cc_library(
name = "utils",
srcs = [
"utils.cc",
],
hdrs = [
"read_array_ifstream.h",
"utils.h",
],
visibility = [
"//sparse_matmul:__subpackages__",
],
deps = [
":layer",
":matrix",
":status",
"//sparse_matmul/numerics:types",
"//sparse_matmul/vector:cache_aligned_vector",
"//sparse_matmul/zlib_wrapper",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:cord",
"@gulrak_filesystem//:filesystem",
],
)
cc_library(
name = "status",
srcs = [
"errno_mapping.cc",
],
hdrs = [
"errno_mapping.h",
"status_macros.h",
],
deps = [
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:cord",
],
)
cc_test(
name = "csrblocksparse_test",
size = "small",
srcs = [
"csrblocksparse_test.cc",
],
data = glob(["testdata/*"]),
linkopts = select({
"@bazel_tools//platforms:android": ["-landroid"],
"//conditions:default": [],
}),
shard_count = 10,
deps = [
":status",
":utils",
"//sparse_matmul/compute:matmul",
"//sparse_matmul/numerics:test_utils",
"//sparse_matmul/os:coop_threads",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@com_google_googletest//:gtest_main",
"@gulrak_filesystem//:filesystem",
],
)
cc_test(
name = "sparse_linear_layer_test",
srcs = [
"sparse_linear_layer_test.cc",
],
deps = [
":layer",
"//sparse_matmul/numerics:test_utils",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "utils_test",
srcs = ["utils_test.cc"],
deps = [
":layer",
":matrix",
":status",
":utils",
"//sparse_matmul/numerics:fast_transcendentals",
"//sparse_matmul/numerics:test_utils",
"//sparse_matmul/numerics:types",
"//sparse_matmul/vector:cache_aligned_vector",
"@com_google_absl//absl/flags:flag",
"@com_google_googletest//:gtest_main",
"@gulrak_filesystem//:filesystem",
],
)
|