| # Copyright 2024 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| load("@org_tensorflow//tensorflow/lite:build_def.bzl", "tflite_cc_shared_object", "tflite_copts") |
| load("@org_tensorflow//tensorflow/lite/core/shims:cc_library_with_tflite.bzl", "cc_library_with_tflite") |
| |
| cc_library_with_tflite( |
| name = "external", |
| srcs = [ |
| "external.cc", |
| ], |
| copts = tflite_copts(), |
| generate_opaque_delegate_target = True, |
| tflite_deps = [ |
| "@org_tensorflow//tensorflow/lite/acceleration/configuration/c:stable_delegate", |
| "@org_tensorflow//tensorflow/lite/delegates/utils/experimental/stable_delegate:stable_delegate_interface", |
| ], |
| deps = [ |
| "@org_tensorflow//tensorflow/lite/acceleration/configuration/c:gpu_plugin", |
| ], |
| ) |
| |
| tflite_cc_shared_object( |
| name = "tensorflowlite_stable_gpu_delegate", |
| linkopts = [ |
| "-Wl,--no-undefined", |
| # Expose necessary symbols only. |
| "-Wl,--version-script,$(location @org_tensorflow//tensorflow/lite/delegates/utils/experimental/stable_delegate:version_script.lds)", |
| ], |
| visibility = ["//:__pkg__"], |
| deps = [ |
| ":external_opaque_delegate", |
| "@org_tensorflow//tensorflow/lite/delegates/utils/experimental/stable_delegate:version_script.lds", |
| ], |
| ) |