diff --git a/larq_compute_engine/mlir/BUILD b/larq_compute_engine/mlir/BUILD index 5aa7b33b..b09e0a86 100644 --- a/larq_compute_engine/mlir/BUILD +++ b/larq_compute_engine/mlir/BUILD @@ -1,5 +1,6 @@ load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library") load("@org_tensorflow//tensorflow:tensorflow.bzl", "pybind_extension", "tf_cc_binary") +load("@pypi_lce//:requirements.bzl", lce_requirement = "requirement") package( default_visibility = ["//visibility:public"], @@ -486,13 +487,13 @@ cc_library( "@llvm-project//llvm:Support", "@llvm-project//mlir:IR", "@llvm-project//mlir:Pass", + "@local_tsl//tsl/platform:statusor", "@org_tensorflow//tensorflow/compiler/mlir:op_or_arg_name_mapper", "@org_tensorflow//tensorflow/compiler/mlir/lite:flatbuffer_export", "@org_tensorflow//tensorflow/compiler/mlir/lite/metrics:error_collector", "@org_tensorflow//tensorflow/compiler/mlir/lite/quantization:quantization_config", "@org_tensorflow//tensorflow/compiler/mlir/tensorflow:error_util", "@org_tensorflow//tensorflow/compiler/mlir/tensorflow/transforms:tf_saved_model_freeze_variables", - "@local_tsl//tsl/platform:statusor", ], ) @@ -557,6 +558,8 @@ py_library( ], deps = [ ":_tf_tfl_flatbuffer", + lce_requirement("tensorflow-cpu"), + lce_requirement("flatbuffers"), ], ) diff --git a/larq_compute_engine/requirements.in b/larq_compute_engine/requirements.in index 1fd9ed03..565e80a7 100644 --- a/larq_compute_engine/requirements.in +++ b/larq_compute_engine/requirements.in @@ -1,3 +1,6 @@ tensorflow-cpu +tensorflow-datasets +larq tqdm pytest +googleapis-common-protos<2,>=1.52.0 # dependency of tensorflow-datasets, somehow not picked up by pip-compile diff --git a/larq_compute_engine/requirements.txt b/larq_compute_engine/requirements.txt index e1b0a44f..e450945a 100644 --- a/larq_compute_engine/requirements.txt +++ b/larq_compute_engine/requirements.txt @@ -2,27 +2,47 @@ # This file is autogenerated by pip-compile with Python 3.10 # by the following command: # -# pip-compile --allow-unsafe --no-emit-index-url larq_compute_engine/requirements.in +# pip-compile --allow-unsafe --no-emit-index-url --strip-extras larq_compute_engine/requirements.in # absl-py==2.1.0 # via + # array-record + # etils # keras # tensorboard # tensorflow-cpu + # tensorflow-datasets + # tensorflow-metadata +array-record==0.5.1 + # via tensorflow-datasets astunparse==1.6.3 # via tensorflow-cpu certifi==2024.6.2 # via requests charset-normalizer==3.3.2 # via requests +click==8.1.7 + # via tensorflow-datasets +dm-tree==0.1.8 + # via tensorflow-datasets +docstring-parser==0.16 + # via simple-parsing +etils==1.7.0 + # via + # array-record + # tensorflow-datasets exceptiongroup==1.2.1 # via pytest flatbuffers==24.3.25 # via tensorflow-cpu +fsspec==2024.6.0 + # via etils gast==0.5.4 # via tensorflow-cpu google-pasta==0.2.0 # via tensorflow-cpu +googleapis-common-protos==1.63.1 + # via -r larq_compute_engine/requirements.in grpcio==1.64.1 # via # tensorboard @@ -33,10 +53,16 @@ h5py==3.11.0 # tensorflow-cpu idna==3.7 # via requests +immutabledict==4.2.0 + # via tensorflow-datasets +importlib-resources==6.4.0 + # via etils iniconfig==2.0.0 # via pytest keras==3.3.3 # via tensorflow-cpu +larq==0.13.3 + # via -r larq_compute_engine/requirements.in libclang==18.1.1 # via tensorflow-cpu markdown==3.6 @@ -55,38 +81,57 @@ namex==0.0.8 # via keras numpy==1.26.4 # via + # etils # h5py # keras + # larq # ml-dtypes # opt-einsum + # pyarrow # tensorboard # tensorflow-cpu + # tensorflow-datasets opt-einsum==3.3.0 # via tensorflow-cpu optree==0.11.0 # via keras packaging==24.1 # via + # larq # pytest # tensorflow-cpu pluggy==1.5.0 # via pytest -protobuf==4.25.3 +promise==2.3 + # via tensorflow-datasets +protobuf==3.20.3 # via + # googleapis-common-protos # tensorboard # tensorflow-cpu + # tensorflow-datasets + # tensorflow-metadata +psutil==5.9.8 + # via tensorflow-datasets +pyarrow==16.1.0 + # via tensorflow-datasets pygments==2.18.0 # via rich pytest==8.2.2 # via -r larq_compute_engine/requirements.in requests==2.32.3 - # via tensorflow-cpu + # via + # tensorflow-cpu + # tensorflow-datasets rich==13.7.1 # via keras +simple-parsing==0.1.5 + # via tensorflow-datasets six==1.16.0 # via # astunparse # google-pasta + # promise # tensorboard # tensorflow-cpu tensorboard==2.16.2 @@ -95,17 +140,32 @@ tensorboard-data-server==0.7.2 # via tensorboard tensorflow-cpu==2.16.1 # via -r larq_compute_engine/requirements.in +tensorflow-datasets==4.9.6 + # via -r larq_compute_engine/requirements.in tensorflow-io-gcs-filesystem==0.37.0 # via tensorflow-cpu +tensorflow-metadata==1.15.0 + # via tensorflow-datasets termcolor==2.4.0 - # via tensorflow-cpu + # via + # tensorflow-cpu + # tensorflow-datasets +terminaltables==3.1.10 + # via larq +toml==0.10.2 + # via tensorflow-datasets tomli==2.0.1 # via pytest tqdm==4.66.4 - # via -r larq_compute_engine/requirements.in + # via + # -r larq_compute_engine/requirements.in + # etils + # tensorflow-datasets typing-extensions==4.12.2 # via + # etils # optree + # simple-parsing # tensorflow-cpu urllib3==2.2.1 # via requests @@ -114,7 +174,11 @@ werkzeug==3.0.3 wheel==0.43.0 # via astunparse wrapt==1.16.0 - # via tensorflow-cpu + # via + # tensorflow-cpu + # tensorflow-datasets +zipp==3.19.2 + # via etils # The following packages are considered to be unsafe in a requirements file: setuptools==70.0.0 diff --git a/larq_compute_engine/tests/BUILD b/larq_compute_engine/tests/BUILD index 0356f630..34e2ff22 100644 --- a/larq_compute_engine/tests/BUILD +++ b/larq_compute_engine/tests/BUILD @@ -1,3 +1,7 @@ +load("@pypi//:requirements.bzl", tf_requirement = "requirement") +load("@pypi_lce//:requirements.bzl", lce_requirement = "requirement") +load("//larq_compute_engine/tests:qemu_test.bzl", "lce_qemu_test_suite") + package( default_visibility = ["//visibility:public"], licenses = ["notice"], # Apache 2.0 @@ -8,8 +12,6 @@ exports_files([ "test_aarch64_binary.sh", ]) -load("//larq_compute_engine/tests:qemu_test.bzl", "lce_qemu_test_suite") - py_test( name = "end2end_test", size = "large", @@ -17,6 +19,11 @@ py_test( deps = [ "//larq_compute_engine/mlir:converter", "//larq_compute_engine/tflite/python:interpreter", + tf_requirement("numpy"), + lce_requirement("larq"), + lce_requirement("pytest"), + lce_requirement("tensorflow-cpu"), + lce_requirement("tensorflow_datasets"), ], )