diff --git a/BUILD.bazel b/BUILD.bazel index d6e77e4..9475ccc 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -37,7 +37,7 @@ cc_library( hdrs = ["util/args.h"], deps = [ ":basics", - "//compression:io", # Path + "//io", # Path "@highway//:hwy", ], ) @@ -131,8 +131,8 @@ cc_library( hdrs = ["gemma/configs.h"], deps = [ ":basics", - "//compression:fields", "//compression:shared", + "//io:fields", "@highway//:hwy", # base.h ], ) @@ -143,8 +143,8 @@ cc_test( deps = [ ":configs", "@googletest//:gtest_main", # buildcleaner: keep - "//compression:fields", "//compression:shared", + "//io:fields", ], ) @@ -168,8 +168,8 @@ cc_library( ":basics", ":tensor_info", ":threading_context", - "//compression:fields", "//compression:shared", + "//io:fields", "@highway//:hwy", "@highway//:profiler", "@highway//:thread_pool", @@ -200,10 +200,10 @@ cc_library( ":tensor_info", ":threading_context", ":tokenizer", - "//compression:blob_store", - "//compression:fields", - "//compression:io", "//compression:shared", + "//io", + "//io:blob_store", + "//io:fields", "@highway//:hwy", "@highway//:thread_pool", ], @@ -218,8 +218,8 @@ cc_library( ":mat", ":model_store", ":tensor_info", - "//compression:blob_store", "//compression:compress", + "//io:blob_store", "@highway//:hwy", "@highway//:profiler", "@highway//:stats", @@ -426,7 +426,7 @@ cc_library( ":args", ":basics", ":ops", # matmul.h - "//compression:io", + "//io", "@highway//:hwy", ], ) @@ -467,8 +467,8 @@ cc_library( ":threading_context", ":weights", # Placeholder for internal dep, do not remove., - "//compression:blob_store", - "//compression:io", + "//io:blob_store", + "//io", "//compression:shared", "//paligemma:image", "@highway//:hwy", @@ -603,7 +603,7 @@ cc_binary( ":benchmark_helper", ":cross_entropy", ":gemma_lib", - "//compression:io", + "//io", "@highway//:hwy", "@highway//:nanobenchmark", "@nlohmann_json//:json", @@ -630,7 +630,7 @@ cc_binary( ":args", ":benchmark_helper", ":gemma_lib", - "//compression:io", + "//io", "@highway//:hwy", "@nlohmann_json//:json", ], @@ -643,7 +643,7 @@ cc_binary( ":args", ":benchmark_helper", ":gemma_lib", - "//compression:io", + "//io", "@highway//:hwy", "@highway//:profiler", "@nlohmann_json//:json", diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c27616..10ebecc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,32 +41,25 @@ FetchContent_MakeAvailable(benchmark) # Base source files set(SOURCES - compression/blob_store.cc - compression/blob_store.h + backprop/activations.h + backprop/backward_scalar.h + backprop/backward-inl.h + backprop/backward.cc + backprop/backward.h + backprop/common_scalar.h + backprop/forward_scalar.h + backprop/forward-inl.h + backprop/forward.cc + backprop/forward.h + backprop/optimizer.cc + backprop/optimizer.h + compression/compress-inl.h compression/compress.cc compression/compress.h - compression/compress-inl.h - compression/fields.cc - compression/fields.h - compression/io_win.cc - compression/io.cc - compression/io.h compression/nuq-inl.h compression/sfp-inl.h compression/shared.h compression/test_util-inl.h - backprop/activations.h - backprop/backward.cc - backprop/backward.h - backprop/backward-inl.h - backprop/backward_scalar.h - backprop/common_scalar.h - backprop/forward.cc - backprop/forward.h - backprop/forward-inl.h - backprop/forward_scalar.h - backprop/optimizer.cc - backprop/optimizer.h evals/benchmark_helper.cc evals/benchmark_helper.h evals/cross_entropy.cc @@ -94,6 +87,13 @@ set(SOURCES gemma/tokenizer.h gemma/weights.cc gemma/weights.h + io/blob_store.cc + io/blob_store.h + io/fields.cc + io/fields.h + io/io_win.cc + io/io.cc + io/io.h ops/dot-inl.h ops/matmul-inl.h ops/matmul.cc @@ -110,10 +110,10 @@ set(SOURCES util/mat.cc util/mat.h util/test_util.h - util/threading.cc - util/threading.h util/threading_context.cc util/threading_context.h + util/threading.cc + util/threading.h util/topology.cc util/topology.h ) @@ -200,14 +200,14 @@ include(GoogleTest) set(GEMMA_TEST_FILES backprop/backward_test.cc backprop/optimize_test.cc - compression/blob_store_test.cc compression/compress_test.cc compression/distortion_test.cc - compression/fields_test.cc compression/nuq_test.cc compression/sfp_test.cc evals/gemma_test.cc gemma/tensor_info_test.cc + io/blob_store_test.cc + io/fields_test.cc ops/bench_matmul.cc ops/dot_test.cc ops/gemma_matvec_test.cc @@ -240,5 +240,5 @@ endif() # GEMMA_ENABLE_TESTS ## Tools -add_executable(migrate_weights compression/migrate_weights.cc) +add_executable(migrate_weights io/migrate_weights.cc) target_link_libraries(migrate_weights libgemma hwy hwy_contrib) diff --git a/compression/BUILD.bazel b/compression/BUILD.bazel index c14897f..e6de279 100644 --- a/compression/BUILD.bazel +++ b/compression/BUILD.bazel @@ -1,4 +1,4 @@ -# Weight compression, I/O and analysis +# Weight compression and analysis. package( default_applicable_licenses = [ @@ -20,77 +20,6 @@ config_setting( visibility = ["//visibility:private"], ) -FILE_DEPS = select({ - "//conditions:default": [ - # Placeholder for io deps, do not remove - ], - ":android": [], - # Placeholder for internal build rules, do not remove -}) - -cc_library( - name = "io", - srcs = [ - "io.cc", - # Placeholder for io backend, do not remove - ], - hdrs = ["io.h"], - local_defines = select({ - # Placeholder for internal build rules, do not remove - "//conditions:default": [], - }), - deps = [ - "//:allocator", - "@highway//:hwy", - ] + FILE_DEPS, -) - -cc_library( - name = "fields", - srcs = ["fields.cc"], - hdrs = ["fields.h"], - deps = [ - "@highway//:hwy", - ], -) - -cc_test( - name = "fields_test", - srcs = ["fields_test.cc"], - deps = [ - ":fields", - "@googletest//:gtest_main", # buildcleaner: keep - "@highway//:hwy_test_util", - ], -) - -cc_library( - name = "blob_store", - srcs = ["blob_store.cc"], - hdrs = ["blob_store.h"], - deps = [ - ":io", - "//:basics", - "//:threading_context", - "@highway//:hwy", - "@highway//:profiler", - "@highway//:thread_pool", - ], -) - -cc_test( - name = "blob_store_test", - srcs = ["blob_store_test.cc"], - deps = [ - ":blob_store", - ":io", - "@googletest//:gtest_main", # buildcleaner: keep - "//:basics", - "//:threading_context", - "@highway//:hwy_test_util", - ], -) - cc_library( name = "distortion", hdrs = [ @@ -262,39 +191,3 @@ cc_library( "@highway//hwy/contrib/sort:vqsort", ], ) - -cc_library( - name = "io_win", - srcs = ["io_win.cc"], - deps = [ - ":io", - "//:allocator", - "@highway//:hwy", - ], -) - -cc_binary( - name = "blob_compare", - srcs = ["blob_compare.cc"], - deps = [ - ":blob_store", - ":io", - "//:basics", - "//:threading", - "//:threading_context", - "@highway//:hwy", - "@highway//:hwy_test_util", - "@highway//:nanobenchmark", - "@highway//:thread_pool", - ], -) - -cc_binary( - name = "migrate_weights", - srcs = ["migrate_weights.cc"], - deps = [ - "//:args", - "//:benchmark_helper", - "//:gemma_lib", - ], -) diff --git a/compression/python/BUILD.bazel b/compression/python/BUILD.bazel index ab0dad2..fdd8736 100644 --- a/compression/python/BUILD.bazel +++ b/compression/python/BUILD.bazel @@ -21,9 +21,9 @@ cc_library( "//:tensor_info", "//:threading_context", "//:tokenizer", - "//compression:blob_store", "//compression:compress", - "//compression:io", + "//io", + "//io:blob_store", "@highway//:hwy", "@highway//:thread_pool", ], diff --git a/compression/python/compression_clif_aux.cc b/compression/python/compression_clif_aux.cc index d3c5451..2657712 100644 --- a/compression/python/compression_clif_aux.cc +++ b/compression/python/compression_clif_aux.cc @@ -22,13 +22,13 @@ #include #include -#include "compression/blob_store.h" // BlobWriter -#include "compression/compress.h" // ScaleWeights -#include "compression/io.h" // Path -#include "gemma/configs.h" // ModelConfig -#include "gemma/model_store.h" // ModelStore -#include "gemma/tensor_info.h" // TensorInfo +#include "compression/compress.h" // ScaleWeights +#include "gemma/configs.h" // ModelConfig +#include "gemma/model_store.h" // ModelStore +#include "gemma/tensor_info.h" // TensorInfo #include "gemma/tokenizer.h" +#include "io/blob_store.h" // BlobWriter +#include "io/io.h" // Path #include "util/basics.h" #include "util/mat.h" #include "util/threading_context.h" diff --git a/compression/python/compression_clif_aux.h b/compression/python/compression_clif_aux.h index 294ea83..dfc0030 100644 --- a/compression/python/compression_clif_aux.h +++ b/compression/python/compression_clif_aux.h @@ -21,11 +21,11 @@ #include #include -#include "compression/blob_store.h" #include "compression/shared.h" // Type #include "gemma/configs.h" #include "gemma/model_store.h" #include "gemma/tensor_info.h" +#include "io/blob_store.h" #include "util/mat.h" #include "hwy/aligned_allocator.h" // Span diff --git a/evals/benchmark.cc b/evals/benchmark.cc index 1897bc5..a225d64 100644 --- a/evals/benchmark.cc +++ b/evals/benchmark.cc @@ -8,10 +8,10 @@ #include #include -#include "compression/io.h" // Path #include "evals/benchmark_helper.h" #include "evals/cross_entropy.h" #include "gemma/gemma.h" +#include "io/io.h" // Path #include "util/args.h" #include "hwy/base.h" #include "hwy/timer.h" diff --git a/evals/debug_prompt.cc b/evals/debug_prompt.cc index 2d02b3a..66fa466 100644 --- a/evals/debug_prompt.cc +++ b/evals/debug_prompt.cc @@ -18,9 +18,9 @@ #include #include -#include "compression/io.h" #include "evals/benchmark_helper.h" #include "gemma/gemma.h" // LayersOutputFunc +#include "io/io.h" #include "util/args.h" #include "hwy/base.h" #include "nlohmann/json.hpp" diff --git a/evals/run_mmlu.cc b/evals/run_mmlu.cc index fd04c7b..9cffc41 100644 --- a/evals/run_mmlu.cc +++ b/evals/run_mmlu.cc @@ -19,9 +19,9 @@ #include #include -#include "compression/io.h" // Path #include "evals/benchmark_helper.h" #include "gemma/gemma.h" // Gemma +#include "io/io.h" // Path #include "util/args.h" #include "hwy/base.h" #include "hwy/highway.h" diff --git a/gemma/configs.cc b/gemma/configs.cc index 3244c5f..89d02b5 100644 --- a/gemma/configs.cc +++ b/gemma/configs.cc @@ -21,8 +21,8 @@ #include #include -#include "compression/fields.h" // IFields #include "compression/shared.h" // Type +#include "io/fields.h" // IFields #include "hwy/base.h" namespace gcpp { diff --git a/gemma/configs.h b/gemma/configs.h index 5984dc5..88af789 100644 --- a/gemma/configs.h +++ b/gemma/configs.h @@ -25,8 +25,8 @@ #include #include -#include "compression/fields.h" // IFieldsVisitor #include "compression/shared.h" // Type +#include "io/fields.h" // IFieldsVisitor #include "util/basics.h" namespace gcpp { diff --git a/gemma/configs_test.cc b/gemma/configs_test.cc index 16b5656..2ae9482 100644 --- a/gemma/configs_test.cc +++ b/gemma/configs_test.cc @@ -6,8 +6,8 @@ #include #include "gtest/gtest.h" -#include "compression/fields.h" // Type #include "compression/shared.h" // Type +#include "io/fields.h" // Type namespace gcpp { diff --git a/gemma/gemma.cc b/gemma/gemma.cc index 6c7e5f6..7715085 100644 --- a/gemma/gemma.cc +++ b/gemma/gemma.cc @@ -28,13 +28,13 @@ #include // Placeholder for internal header, do not modify. -#include "compression/blob_store.h" -#include "compression/io.h" // Path #include "compression/shared.h" #include "gemma/configs.h" #include "gemma/model_store.h" #include "gemma/tokenizer.h" #include "gemma/weights.h" +#include "io/blob_store.h" +#include "io/io.h" // Path #include "ops/matmul.h" #include "paligemma/image.h" #include "util/threading_context.h" diff --git a/gemma/gemma.h b/gemma/gemma.h index 44c3bc9..b18eb60 100644 --- a/gemma/gemma.h +++ b/gemma/gemma.h @@ -21,14 +21,14 @@ #include // IWYU pragma: begin_exports -#include "compression/blob_store.h" -#include "compression/io.h" // Path #include "gemma/activations.h" #include "gemma/configs.h" #include "gemma/gemma_args.h" #include "gemma/kv_cache.h" #include "gemma/model_store.h" #include "gemma/weights.h" +#include "io/blob_store.h" +#include "io/io.h" // Path #include "ops/matmul.h" // MatMulEnv #include "paligemma/image.h" #include "util/basics.h" // TokenAndProb diff --git a/gemma/gemma_args.h b/gemma/gemma_args.h index 713ee8c..b5a8148 100644 --- a/gemma/gemma_args.h +++ b/gemma/gemma_args.h @@ -25,7 +25,7 @@ #include #include -#include "compression/io.h" // Path +#include "io/io.h" // Path #include "ops/matmul.h" // MMStorage::kMax* #include "util/args.h" #include "util/basics.h" // Tristate diff --git a/gemma/model_store.cc b/gemma/model_store.cc index 4298856..fca4674 100644 --- a/gemma/model_store.cc +++ b/gemma/model_store.cc @@ -24,13 +24,13 @@ #include // strcmp #include -#include "compression/blob_store.h" -#include "compression/fields.h" -#include "compression/io.h" // Path #include "compression/shared.h" #include "gemma/configs.h" // ModelConfig #include "gemma/tensor_info.h" #include "gemma/tokenizer.h" +#include "io/blob_store.h" +#include "io/fields.h" +#include "io/io.h" // Path #include "util/basics.h" #include "util/threading_context.h" #include "hwy/base.h" diff --git a/gemma/model_store.h b/gemma/model_store.h index a3a3031..88b536c 100644 --- a/gemma/model_store.h +++ b/gemma/model_store.h @@ -27,10 +27,10 @@ #include // IWYU pragma: begin_exports -#include "compression/blob_store.h" -#include "compression/io.h" // Path -#include "gemma/configs.h" // ModelConfig +#include "gemma/configs.h" // ModelConfig #include "gemma/tokenizer.h" +#include "io/blob_store.h" +#include "io/io.h" // Path #include "util/basics.h" // Tristate #include "util/mat.h" // MatPtr // IWYU pragma: end_exports diff --git a/gemma/weights.cc b/gemma/weights.cc index d099e71..eb9b24f 100644 --- a/gemma/weights.cc +++ b/gemma/weights.cc @@ -25,11 +25,11 @@ #include #include -#include "compression/blob_store.h" #include "compression/compress.h" #include "compression/shared.h" #include "gemma/configs.h" #include "gemma/model_store.h" +#include "io/blob_store.h" #include "util/mat.h" #include "hwy/base.h" #include "hwy/contrib/thread_pool/thread_pool.h" diff --git a/gemma/weights.h b/gemma/weights.h index 93e67be..d0b8a03 100644 --- a/gemma/weights.h +++ b/gemma/weights.h @@ -25,12 +25,12 @@ #include #include -#include "compression/blob_store.h" // BlobWriter -#include "compression/shared.h" // IsF32 -#include "gemma/configs.h" // ModelConfig -#include "gemma/model_store.h" // ModelStore -#include "gemma/tensor_info.h" // TensorInfoRegistry -#include "util/mat.h" // MatPtr +#include "compression/shared.h" // IsF32 +#include "gemma/configs.h" // ModelConfig +#include "gemma/model_store.h" // ModelStore +#include "gemma/tensor_info.h" // TensorInfoRegistry +#include "io/blob_store.h" // BlobWriter +#include "util/mat.h" // MatPtr #include "hwy/contrib/thread_pool/thread_pool.h" namespace gcpp { diff --git a/io/BUILD.bazel b/io/BUILD.bazel new file mode 100644 index 0000000..1811b4e --- /dev/null +++ b/io/BUILD.bazel @@ -0,0 +1,118 @@ +# File I/O and model loading + +package( + default_applicable_licenses = [ + "//:license", # Placeholder comment, do not modify + ], + # Placeholder for internal compatible_with + default_visibility = [ + # Placeholder for internal visibility, + # Users require gcpp::Path etc., which are defined in this package. + "//visibility:public", + ], +) + +config_setting( + name = "android", + constraint_values = [ + "@platforms//os:android", + ], + visibility = ["//visibility:private"], +) + +FILE_DEPS = select({ + "//conditions:default": [ + # Placeholder for io deps, do not remove + ], + ":android": [], + # Placeholder for internal build rules, do not remove +}) + +cc_library( + name = "io", + srcs = [ + "io.cc", + # Placeholder for io backend, do not remove + ], + hdrs = ["io.h"], + local_defines = select({ + # Placeholder for internal build rules, do not remove + "//conditions:default": [], + }), + deps = [ + "//:allocator", + "@highway//:hwy", + ] + FILE_DEPS, +) + +cc_library( + name = "fields", + srcs = ["fields.cc"], + hdrs = ["fields.h"], + deps = [ + "@highway//:hwy", + ], +) + +cc_test( + name = "fields_test", + srcs = ["fields_test.cc"], + deps = [ + ":fields", + "@googletest//:gtest_main", # buildcleaner: keep + "@highway//:hwy_test_util", + ], +) + +cc_library( + name = "blob_store", + srcs = ["blob_store.cc"], + hdrs = ["blob_store.h"], + deps = [ + ":io", + "//:basics", + "//:threading_context", + "@highway//:hwy", + "@highway//:profiler", + "@highway//:thread_pool", + ], +) + +cc_test( + name = "blob_store_test", + srcs = ["blob_store_test.cc"], + deps = [ + ":blob_store", + ":io", + "@googletest//:gtest_main", # buildcleaner: keep + "//:basics", + "//:threading_context", + "@highway//:hwy_test_util", + ], +) + +cc_binary( + name = "blob_compare", + srcs = ["blob_compare.cc"], + deps = [ + ":blob_store", + ":io", + "//:basics", + "//:threading", + "//:threading_context", + "@highway//:hwy", + "@highway//:hwy_test_util", + "@highway//:nanobenchmark", + "@highway//:thread_pool", + ], +) + +cc_binary( + name = "migrate_weights", + srcs = ["migrate_weights.cc"], + deps = [ + "//:args", + "//:benchmark_helper", + "//:gemma_lib", + ], +) diff --git a/compression/blob_compare.cc b/io/blob_compare.cc similarity index 99% rename from compression/blob_compare.cc rename to io/blob_compare.cc index 2f0ab49..7e0df8d 100644 --- a/compression/blob_compare.cc +++ b/io/blob_compare.cc @@ -22,8 +22,8 @@ #include #include -#include "compression/blob_store.h" -#include "compression/io.h" // Path +#include "io/blob_store.h" +#include "io/io.h" // Path #include "util/basics.h" // IndexRange #include "util/threading.h" #include "util/threading_context.h" diff --git a/compression/blob_store.cc b/io/blob_store.cc similarity index 99% rename from compression/blob_store.cc rename to io/blob_store.cc index ccb8064..95da0ba 100644 --- a/compression/blob_store.cc +++ b/io/blob_store.cc @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "compression/blob_store.h" +#include "io/blob_store.h" #include #include @@ -24,7 +24,7 @@ #include // std::move #include -#include "compression/io.h" +#include "io/io.h" #include "util/threading_context.h" #include "hwy/aligned_allocator.h" // Span #include "hwy/base.h" diff --git a/compression/blob_store.h b/io/blob_store.h similarity index 96% rename from compression/blob_store.h rename to io/blob_store.h index 80dc877..4548f81 100644 --- a/compression/blob_store.h +++ b/io/blob_store.h @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef THIRD_PARTY_GEMMA_CPP_COMPRESSION_BLOB_STORE_H_ -#define THIRD_PARTY_GEMMA_CPP_COMPRESSION_BLOB_STORE_H_ +#ifndef THIRD_PARTY_GEMMA_CPP_IO_BLOB_STORE_H_ +#define THIRD_PARTY_GEMMA_CPP_IO_BLOB_STORE_H_ // Reads/writes arrays of bytes from/to file. @@ -26,7 +26,7 @@ #include #include -#include "compression/io.h" // File, Path, MapPtr +#include "io/io.h" // File, Path, MapPtr #include "util/basics.h" // Tristate #include "hwy/aligned_allocator.h" // Span #include "hwy/base.h" // HWY_ASSERT @@ -178,4 +178,4 @@ class BlobWriter { } // namespace gcpp -#endif // THIRD_PARTY_GEMMA_CPP_COMPRESSION_BLOB_STORE_H_ +#endif // THIRD_PARTY_GEMMA_CPP_IO_BLOB_STORE_H_ diff --git a/compression/blob_store_test.cc b/io/blob_store_test.cc similarity index 98% rename from compression/blob_store_test.cc rename to io/blob_store_test.cc index 15a842e..c96c81d 100644 --- a/compression/blob_store_test.cc +++ b/io/blob_store_test.cc @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "compression/blob_store.h" +#include "io/blob_store.h" #include @@ -23,7 +23,7 @@ #include #include -#include "compression/io.h" +#include "io/io.h" #include "util/basics.h" #include "util/threading_context.h" #include "hwy/tests/hwy_gtest.h" diff --git a/compression/fields.cc b/io/fields.cc similarity index 99% rename from compression/fields.cc rename to io/fields.cc index fb7b0b4..4516e89 100644 --- a/compression/fields.cc +++ b/io/fields.cc @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "compression/fields.h" +#include "io/fields.h" #include #include diff --git a/compression/fields.h b/io/fields.h similarity index 100% rename from compression/fields.h rename to io/fields.h diff --git a/compression/fields_test.cc b/io/fields_test.cc similarity index 99% rename from compression/fields_test.cc rename to io/fields_test.cc index bfe7b03..37bb942 100644 --- a/compression/fields_test.cc +++ b/io/fields_test.cc @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "compression/fields.h" +#include "io/fields.h" #include #include diff --git a/compression/io.cc b/io/io.cc similarity index 99% rename from compression/io.cc rename to io/io.cc index 28df7e2..e942068 100644 --- a/compression/io.cc +++ b/io/io.cc @@ -44,7 +44,7 @@ #include -#include "compression/io.h" +#include "io/io.h" #include "util/allocator.h" #include "hwy/base.h" // HWY_ASSERT diff --git a/compression/io.h b/io/io.h similarity index 100% rename from compression/io.h rename to io/io.h diff --git a/compression/io_win.cc b/io/io_win.cc similarity index 99% rename from compression/io_win.cc rename to io/io_win.cc index 1f5e959..fb6d1fa 100644 --- a/compression/io_win.cc +++ b/io/io_win.cc @@ -21,7 +21,7 @@ #include #include -#include "compression/io.h" +#include "io/io.h" #include "util/allocator.h" #include "hwy/base.h" // HWY_ASSERT #ifndef WIN32_LEAN_AND_MEAN diff --git a/compression/migrate_weights.cc b/io/migrate_weights.cc similarity index 100% rename from compression/migrate_weights.cc rename to io/migrate_weights.cc diff --git a/paligemma/BUILD.bazel b/paligemma/BUILD.bazel index 6329d27..704df01 100644 --- a/paligemma/BUILD.bazel +++ b/paligemma/BUILD.bazel @@ -13,7 +13,7 @@ cc_library( srcs = ["image.cc"], hdrs = ["image.h"], deps = [ - "//compression:io", + "//io", "@highway//:hwy", "@highway//:profiler", ], diff --git a/paligemma/image.cc b/paligemma/image.cc index 32e23ef..6c95437 100644 --- a/paligemma/image.cc +++ b/paligemma/image.cc @@ -29,7 +29,7 @@ #include #include -#include "compression/io.h" +#include "io/io.h" #include "hwy/aligned_allocator.h" // hwy::Span #include "hwy/base.h" #include "hwy/profiler.h" diff --git a/util/args.h b/util/args.h index 2ea7d68..32d54fb 100644 --- a/util/args.h +++ b/util/args.h @@ -23,7 +23,7 @@ #include // std::transform #include -#include "compression/io.h" // Path +#include "io/io.h" // Path #include "util/basics.h" // Tristate #include "hwy/base.h" // HWY_ABORT diff --git a/util/mat.h b/util/mat.h index 0fbd452..c5e7a54 100644 --- a/util/mat.h +++ b/util/mat.h @@ -25,9 +25,9 @@ #include // IWYU pragma: begin_exports -#include "compression/fields.h" #include "compression/shared.h" // Type #include "gemma/tensor_info.h" +#include "io/fields.h" #include "util/allocator.h" #include "util/basics.h" // Extents2D // IWYU pragma: end_exports