STT-tensorflow/tensorflow/security/fuzzing/op_fuzzing/BUILD
Mihai Maruseac c3cc3c40b0 Move fuzzers for TF ops to own subdir. Trim some dependencies.
This duplicates some of the BUILD dependency tree to go around the need to link huge bottleneck dependencies (such as `//tensorflow/core:framework`). Until TF can use `cc_shared_library` in a stable way (and all support in Bazel exists), we will need to use the duplicated tree for fuzzing.

PiperOrigin-RevId: 317326319
Change-Id: I1493e3ae7340298971fe15bd3702b63657f9bf9f
2020-06-19 09:59:12 -07:00

40 lines
1.1 KiB
Python

# Fuzzing TensorFlow ops..
# Most ops have a similar set of dependencies and a similar fuzzing
# infrastructure. Hence, we gather everything in one single place.
# Note that these fuzzers cover a large part of TF, they are not granular.
load(
"//tensorflow/security/fuzzing:tf_fuzzing.bzl",
"tf_fuzz_target",
)
package(
licenses = ["notice"], # Apache 2.0
)
# Since all ops need to have a graph created before being fuzzed, we define
# this header-only library to handle the needed plumbing.
cc_library(
name = "fuzz_session",
hdrs = ["fuzz_session.h"],
deps = [
"//tensorflow/cc:scope",
"//tensorflow/core:core_cpu_base",
"//tensorflow/core:session_options",
"//tensorflow/core/common_runtime:direct_session_internal",
"//tensorflow/core/framework:tensor",
"//tensorflow/core/platform:status",
],
)
# A trivial fuzzer with no pre-specified corpus.
tf_fuzz_target(
name = "identity_fuzz",
srcs = ["identity_fuzz.cc"],
deps = [
":fuzz_session",
"//tensorflow/cc:cc_ops",
"//tensorflow/core/kernels:array",
],
)