Minor: rename compression/shared -> types.h

PiperOrigin-RevId: 758199851
This commit is contained in:
Jan Wassenberg 2025-05-13 06:52:46 -07:00 committed by Copybara-Service
parent d538a6d6c6
commit 2038dfd9cc
36 changed files with 51 additions and 51 deletions

View File

@ -131,7 +131,7 @@ cc_library(
hdrs = ["gemma/configs.h"], hdrs = ["gemma/configs.h"],
deps = [ deps = [
":basics", ":basics",
"//compression:shared", "//compression:types",
"//io:fields", "//io:fields",
"@highway//:hwy", # base.h "@highway//:hwy", # base.h
], ],
@ -143,7 +143,7 @@ cc_test(
deps = [ deps = [
":configs", ":configs",
"@googletest//:gtest_main", # buildcleaner: keep "@googletest//:gtest_main", # buildcleaner: keep
"//compression:shared", "//compression:types",
"//io:fields", "//io:fields",
], ],
) )
@ -155,7 +155,7 @@ cc_library(
deps = [ deps = [
":basics", ":basics",
":configs", ":configs",
"//compression:shared", "//compression:types",
], ],
) )
@ -168,7 +168,7 @@ cc_library(
":basics", ":basics",
":tensor_info", ":tensor_info",
":threading_context", ":threading_context",
"//compression:shared", "//compression:types",
"//io:fields", "//io:fields",
"@highway//:hwy", "@highway//:hwy",
"@highway//:profiler", "@highway//:profiler",
@ -200,7 +200,7 @@ cc_library(
":tensor_info", ":tensor_info",
":threading_context", ":threading_context",
":tokenizer", ":tokenizer",
"//compression:shared", "//compression:types",
"//io", "//io",
"//io:blob_store", "//io:blob_store",
"//io:fields", "//io:fields",
@ -471,7 +471,7 @@ cc_library(
# Placeholder for internal dep, do not remove., # Placeholder for internal dep, do not remove.,
"//io:blob_store", "//io:blob_store",
"//io", "//io",
"//compression:shared", "//compression:types",
"//paligemma:image", "//paligemma:image",
"@highway//:hwy", "@highway//:hwy",
"@highway//:nanobenchmark", # timer "@highway//:nanobenchmark", # timer
@ -590,7 +590,7 @@ cc_binary(
":gemma_lib", ":gemma_lib",
":ops", ":ops",
":tokenizer", ":tokenizer",
"//compression:shared", "//compression:types",
"//paligemma:image", "//paligemma:image",
"@highway//:hwy", "@highway//:hwy",
"@highway//:profiler", "@highway//:profiler",
@ -775,7 +775,7 @@ cc_test(
":tokenizer", ":tokenizer",
":weights", ":weights",
"@googletest//:gtest_main", # buildcleaner: keep "@googletest//:gtest_main", # buildcleaner: keep
"//compression:shared", "//compression:types",
"@highway//:thread_pool", "@highway//:thread_pool",
], ],
) )

View File

@ -58,7 +58,7 @@ set(SOURCES
compression/compress.h compression/compress.h
compression/nuq-inl.h compression/nuq-inl.h
compression/sfp-inl.h compression/sfp-inl.h
compression/shared.h compression/types.h
compression/test_util-inl.h compression/test_util-inl.h
evals/benchmark_helper.cc evals/benchmark_helper.cc
evals/benchmark_helper.h evals/benchmark_helper.h

View File

@ -27,7 +27,7 @@
#include "backprop/optimizer.h" #include "backprop/optimizer.h"
#include "backprop/prompt.h" #include "backprop/prompt.h"
#include "backprop/sampler.h" #include "backprop/sampler.h"
#include "compression/shared.h" #include "compression/types.h"
#include "gemma/configs.h" #include "gemma/configs.h"
#include "gemma/gemma.h" #include "gemma/gemma.h"
#include "gemma/tokenizer.h" #include "gemma/tokenizer.h"

View File

@ -24,7 +24,7 @@ cc_library(
name = "distortion", name = "distortion",
hdrs = [ hdrs = [
"distortion.h", "distortion.h",
"shared.h", "types.h",
], ],
deps = [ deps = [
"//:basics", "//:basics",
@ -48,8 +48,8 @@ cc_test(
) )
cc_library( cc_library(
name = "shared", name = "types",
hdrs = ["shared.h"], hdrs = ["types.h"],
deps = [ deps = [
"//:basics", "//:basics",
"@highway//:hwy", "@highway//:hwy",
@ -60,7 +60,7 @@ cc_library(
name = "sfp", name = "sfp",
textual_hdrs = ["sfp-inl.h"], textual_hdrs = ["sfp-inl.h"],
deps = [ deps = [
":shared", ":types",
"@highway//:hwy", "@highway//:hwy",
], ],
) )
@ -70,7 +70,7 @@ cc_library(
textual_hdrs = ["nuq-inl.h"], textual_hdrs = ["nuq-inl.h"],
deps = [ deps = [
":sfp", ":sfp",
":shared", ":types",
"//:basics", "//:basics",
"@highway//:hwy", "@highway//:hwy",
"@highway//hwy/contrib/sort:vqsort", "@highway//hwy/contrib/sort:vqsort",
@ -138,7 +138,7 @@ cc_library(
srcs = ["compress.cc"], srcs = ["compress.cc"],
hdrs = [ hdrs = [
"compress.h", "compress.h",
"shared.h", "types.h",
], ],
textual_hdrs = ["compress-inl.h"], textual_hdrs = ["compress-inl.h"],
deps = [ deps = [
@ -184,7 +184,7 @@ cc_library(
deps = [ deps = [
":nuq", ":nuq",
":sfp", ":sfp",
":shared", ":types",
"@highway//:hwy", "@highway//:hwy",
"@highway//:stats", "@highway//:stats",
"@highway//:thread_pool", "@highway//:thread_pool",

View File

@ -26,7 +26,7 @@
#include <cstdlib> // std::abs #include <cstdlib> // std::abs
#include <vector> #include <vector>
#include "compression/shared.h" #include "compression/types.h"
#include "hwy/base.h" #include "hwy/base.h"
#include "hwy/contrib/thread_pool/thread_pool.h" #include "hwy/contrib/thread_pool/thread_pool.h"
#include "hwy/stats.h" #include "hwy/stats.h"

View File

@ -29,7 +29,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "compression/shared.h" // IWYU pragma: export #include "compression/types.h" // IWYU pragma: export
#if COMPRESS_STATS #if COMPRESS_STATS
#include "compression/distortion.h" #include "compression/distortion.h"
#include "hwy/stats.h" #include "hwy/stats.h"

View File

@ -17,7 +17,7 @@
#include <stdio.h> #include <stdio.h>
#include "compression/shared.h" // SfpStream::kMax #include "compression/types.h" // SfpStream::kMax
#include "util/test_util.h" #include "util/test_util.h"
#include "hwy/nanobenchmark.h" #include "hwy/nanobenchmark.h"
#include "hwy/tests/hwy_gtest.h" #include "hwy/tests/hwy_gtest.h"

View File

@ -23,7 +23,7 @@
#include <cstdio> #include <cstdio>
#include "compression/shared.h" #include "compression/types.h"
#include "util/basics.h" #include "util/basics.h"
#include "hwy/base.h" #include "hwy/base.h"

View File

@ -27,7 +27,7 @@
#include <random> #include <random>
#include "compression/distortion.h" #include "compression/distortion.h"
#include "compression/shared.h" #include "compression/types.h"
#include "util/test_util.h" #include "util/test_util.h"
#include "hwy/aligned_allocator.h" #include "hwy/aligned_allocator.h"
#include "hwy/base.h" #include "hwy/base.h"

View File

@ -36,7 +36,7 @@ pybind_extension(
":compression_clif_aux", ":compression_clif_aux",
"//:mat", "//:mat",
"//:tensor_info", "//:tensor_info",
"//compression:shared", "//compression:types",
], ],
) )

View File

@ -21,7 +21,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "compression/shared.h" // Type #include "compression/types.h" // Type
#include "gemma/configs.h" #include "gemma/configs.h"
#include "gemma/model_store.h" #include "gemma/model_store.h"
#include "gemma/tensor_info.h" #include "gemma/tensor_info.h"

View File

@ -19,7 +19,7 @@
#include <string> #include <string>
#include "compression/python/compression_clif_aux.h" #include "compression/python/compression_clif_aux.h"
#include "compression/shared.h" // Type #include "compression/types.h" // Type
#include "gemma/tensor_info.h" #include "gemma/tensor_info.h"
#include "util/mat.h" #include "util/mat.h"

View File

@ -20,7 +20,7 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include "compression/shared.h" #include "compression/types.h"
#include "hwy/base.h" #include "hwy/base.h"
#endif // THIRD_PARTY_GEMMA_CPP_COMPRESSION_SFP_INL_H_ #endif // THIRD_PARTY_GEMMA_CPP_COMPRESSION_SFP_INL_H_

View File

@ -25,7 +25,7 @@
#include <set> #include <set>
#include "compression/distortion.h" #include "compression/distortion.h"
#include "compression/shared.h" #include "compression/types.h"
#include "util/test_util.h" #include "util/test_util.h"
#include "hwy/aligned_allocator.h" #include "hwy/aligned_allocator.h"
#include "hwy/base.h" #include "hwy/base.h"

View File

@ -15,8 +15,8 @@
// Types shared between tensor definitions and `compress-inl.h`. // Types shared between tensor definitions and `compress-inl.h`.
#ifndef THIRD_PARTY_GEMMA_CPP_COMPRESSION_SHARED_H_ #ifndef THIRD_PARTY_GEMMA_CPP_COMPRESSION_TYPES_H_
#define THIRD_PARTY_GEMMA_CPP_COMPRESSION_SHARED_H_ #define THIRD_PARTY_GEMMA_CPP_COMPRESSION_TYPES_H_
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
@ -281,4 +281,4 @@ HWY_INLINE PackedSpan<const Packed> MakeConst(PackedSpan<Packed> packed) {
} }
} // namespace gcpp } // namespace gcpp
#endif // THIRD_PARTY_GEMMA_CPP_COMPRESSION_SHARED_H_ #endif // THIRD_PARTY_GEMMA_CPP_COMPRESSION_TYPES_H_

View File

@ -24,7 +24,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "compression/shared.h" // TypeName #include "compression/types.h" // TypeName
#include "evals/cross_entropy.h" #include "evals/cross_entropy.h"
#include "gemma/gemma.h" #include "gemma/gemma.h"
#include "gemma/gemma_args.h" #include "gemma/gemma_args.h"

View File

@ -21,7 +21,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "compression/shared.h" // Type #include "compression/types.h" // Type
#include "io/fields.h" // IFields #include "io/fields.h" // IFields
#include "hwy/base.h" #include "hwy/base.h"

View File

@ -25,7 +25,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "compression/shared.h" // Type #include "compression/types.h" // Type
#include "io/fields.h" // IFieldsVisitor #include "io/fields.h" // IFieldsVisitor
#include "util/basics.h" #include "util/basics.h"

View File

@ -6,7 +6,7 @@
#include <vector> #include <vector>
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "compression/shared.h" // Type #include "compression/types.h" // Type
#include "io/fields.h" // Type #include "io/fields.h" // Type
namespace gcpp { namespace gcpp {

View File

@ -28,7 +28,7 @@
#include <vector> #include <vector>
// Placeholder for internal header, do not modify. // Placeholder for internal header, do not modify.
#include "compression/shared.h" #include "compression/types.h"
#include "gemma/configs.h" #include "gemma/configs.h"
#include "gemma/model_store.h" #include "gemma/model_store.h"
#include "gemma/tokenizer.h" #include "gemma/tokenizer.h"

View File

@ -24,7 +24,7 @@
#include <cstring> // strcmp #include <cstring> // strcmp
#include <string> #include <string>
#include "compression/shared.h" #include "compression/types.h"
#include "gemma/configs.h" // ModelConfig #include "gemma/configs.h" // ModelConfig
#include "gemma/tensor_info.h" #include "gemma/tensor_info.h"
#include "gemma/tokenizer.h" #include "gemma/tokenizer.h"

View File

@ -23,7 +23,7 @@
#include <string_view> #include <string_view>
#include <vector> #include <vector>
#include "compression/shared.h" // PromptWrapping #include "compression/types.h" // PromptWrapping
#include "evals/benchmark_helper.h" #include "evals/benchmark_helper.h"
#include "gemma/gemma.h" // Gemma #include "gemma/gemma.h" // Gemma
#include "gemma/gemma_args.h" #include "gemma/gemma_args.h"

View File

@ -4,7 +4,7 @@
#include <string> #include <string>
#include "compression/shared.h" #include "compression/types.h"
#include "gemma/configs.h" #include "gemma/configs.h"
namespace gcpp { namespace gcpp {

View File

@ -7,7 +7,7 @@
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include "compression/shared.h" // Type #include "compression/types.h" // Type
#include "gemma/configs.h" #include "gemma/configs.h"
#include "util/basics.h" // Extents2D #include "util/basics.h" // Extents2D

View File

@ -3,7 +3,7 @@
#include <stdio.h> #include <stdio.h>
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "compression/shared.h" // SfpStream #include "compression/types.h" // SfpStream
#include "gemma/configs.h" #include "gemma/configs.h"
#include "gemma/weights.h" #include "gemma/weights.h"
#include "util/mat.h" #include "util/mat.h"

View File

@ -26,7 +26,7 @@
#include <vector> #include <vector>
#include "compression/compress.h" #include "compression/compress.h"
#include "compression/shared.h" #include "compression/types.h"
#include "gemma/configs.h" #include "gemma/configs.h"
#include "gemma/model_store.h" #include "gemma/model_store.h"
#include "io/blob_store.h" #include "io/blob_store.h"

View File

@ -25,7 +25,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "compression/shared.h" // IsF32 #include "compression/types.h" // IsF32
#include "gemma/configs.h" // ModelConfig #include "gemma/configs.h" // ModelConfig
#include "gemma/model_store.h" // ModelStore #include "gemma/model_store.h" // ModelStore
#include "gemma/tensor_info.h" // TensorInfoRegistry #include "gemma/tensor_info.h" // TensorInfoRegistry

View File

@ -33,7 +33,7 @@
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
#include "compression/shared.h" #include "compression/types.h"
#include "ops/matmul.h" #include "ops/matmul.h"
#include "util/basics.h" #include "util/basics.h"
#include "util/threading_context.h" #include "util/threading_context.h"

View File

@ -27,7 +27,7 @@
#include <random> #include <random>
#include "compression/compress.h" #include "compression/compress.h"
#include "compression/shared.h" #include "compression/types.h"
#include "util/allocator.h" #include "util/allocator.h"
#include "util/test_util.h" #include "util/test_util.h"
#include "util/threading_context.h" #include "util/threading_context.h"

View File

@ -19,7 +19,7 @@
#include <vector> #include <vector>
#include "compression/shared.h" #include "compression/types.h"
#include "ops/matmul.h" // IWYU pragma: export #include "ops/matmul.h" // IWYU pragma: export
#include "util/allocator.h" #include "util/allocator.h"
#include "util/basics.h" #include "util/basics.h"

View File

@ -29,7 +29,7 @@
#include <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
#include "compression/shared.h" #include "compression/types.h"
#include "ops/matmul.h" #include "ops/matmul.h"
#include "util/basics.h" #include "util/basics.h"
#include "util/mat.h" #include "util/mat.h"

View File

@ -44,7 +44,7 @@ cc_test(
"//:benchmark_helper", "//:benchmark_helper",
"//:configs", "//:configs",
"//:gemma_lib", "//:gemma_lib",
"//compression:shared", "//compression:types",
"@highway//:hwy", "@highway//:hwy",
"@highway//:hwy_test_util", "@highway//:hwy_test_util",
], ],

View File

@ -17,7 +17,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "compression/shared.h" #include "compression/types.h"
#include "evals/benchmark_helper.h" #include "evals/benchmark_helper.h"
#include "gemma/configs.h" #include "gemma/configs.h"
#include "gemma/gemma.h" #include "gemma/gemma.h"

View File

@ -15,7 +15,7 @@ pybind_extension(
deps = [ deps = [
"//:configs", "//:configs",
"//:tensor_info", "//:tensor_info",
"//compression:shared", "//compression:types",
], ],
) )

View File

@ -19,7 +19,7 @@
#include <pybind11/pybind11.h> #include <pybind11/pybind11.h>
#include <pybind11/stl.h> #include <pybind11/stl.h>
#include "compression/shared.h" #include "compression/types.h"
#include "gemma/tensor_info.h" #include "gemma/tensor_info.h"
using gcpp::ActivationType; using gcpp::ActivationType;

View File

@ -25,7 +25,7 @@
#include <vector> #include <vector>
// IWYU pragma: begin_exports // IWYU pragma: begin_exports
#include "compression/shared.h" // Type #include "compression/types.h" // Type
#include "gemma/tensor_info.h" #include "gemma/tensor_info.h"
#include "io/fields.h" #include "io/fields.h"
#include "util/allocator.h" // AlignedPtr #include "util/allocator.h" // AlignedPtr