Make tf_gen_op_libs macro more flexible by adding a sub_directory arg.
This is to prepare for moving op targets to a new build file under tensorflow/core/ops. PiperOrigin-RevId: 336554704 Change-Id: Ib1d83f78467c5fa6aa800b3d3af7b23374515c8d
This commit is contained in:
parent
c726ae3cab
commit
a7cabb95d6
@ -399,7 +399,12 @@ def tf_defines_nortti_if_lite_protos():
|
||||
|
||||
# Given a list of "op_lib_names" (a list of files in the ops directory
|
||||
# without their .cc extensions), generate a library for that file.
|
||||
def tf_gen_op_libs(op_lib_names, deps = None, is_external = True, compatible_with = None):
|
||||
def tf_gen_op_libs(
|
||||
op_lib_names,
|
||||
sub_directory = "ops/",
|
||||
deps = None,
|
||||
is_external = True,
|
||||
compatible_with = None):
|
||||
# Make library out of each op so it can also be used to generate wrappers
|
||||
# for various languages.
|
||||
if not deps:
|
||||
@ -408,7 +413,7 @@ def tf_gen_op_libs(op_lib_names, deps = None, is_external = True, compatible_wit
|
||||
cc_library(
|
||||
name = n + "_op_lib",
|
||||
copts = tf_copts(is_external = is_external),
|
||||
srcs = ["ops/" + n + ".cc"],
|
||||
srcs = [sub_directory + n + ".cc"],
|
||||
deps = deps + [clean_dep("//tensorflow/core:framework")],
|
||||
compatible_with = compatible_with,
|
||||
visibility = ["//visibility:public"],
|
||||
|
Loading…
Reference in New Issue
Block a user