Skip to content

Commit

Permalink
Fix format of Custom Ops build (#2346)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampathweb authored Feb 13, 2024
1 parent e71ee60 commit 79a1c26
Showing 1 changed file with 47 additions and 17 deletions.
64 changes: 47 additions & 17 deletions keras_cv/custom_ops/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,68 @@ cc_library(
name = "box_util",
srcs = ["box_util.cc"],
hdrs = ["box_util.h"],
copts = select({
":windows": [
"/DEIGEN_STRONG_INLINE=inline",
"-DTENSORFLOW_MONOLITHIC_BUILD",
"/DPLATFORM_WINDOWS",
"/DEIGEN_HAS_C99_MATH",
"/DTENSORFLOW_USE_EIGEN_THREADPOOL",
"/DEIGEN_AVOID_STL_ARRAY",
"/Iexternal/gemmlowp",
"/wd4018",
"/wd4577",
"/DNOGDI",
"/UTF_COMPILE_LIBRARY",
],
"//conditions:default": [
"-pthread",
"-std=c++17",
],
}),
deps = [
"@local_config_tf//:libtensorflow_framework",
"@local_config_tf//:tf_header_lib",
],
copts = select({
":windows": ["/DEIGEN_STRONG_INLINE=inline", "-DTENSORFLOW_MONOLITHIC_BUILD", "/DPLATFORM_WINDOWS", "/DEIGEN_HAS_C99_MATH", "/DTENSORFLOW_USE_EIGEN_THREADPOOL", "/DEIGEN_AVOID_STL_ARRAY", "/Iexternal/gemmlowp", "/wd4018", "/wd4577", "/DNOGDI", "/UTF_COMPILE_LIBRARY"],
"//conditions:default": ["-pthread", "-std=c++17"],
}),
)

cc_binary(
name = '_keras_cv_custom_ops.so',
name = "_keras_cv_custom_ops.so",
srcs = [
"kernels/pairwise_iou_kernel.cc",
"ops/pairwise_iou_op.cc",
"kernels/withinbox_op.cc",
"ops/withinbox_op.cc",
"kernels/within_any_box_op.cc",
"kernels/withinbox_op.cc",
"ops/pairwise_iou_op.cc",
"ops/within_any_box_op.cc",
"ops/withinbox_op.cc",
],
copts = select({
":windows": [
"/DEIGEN_STRONG_INLINE=inline",
"-DTENSORFLOW_MONOLITHIC_BUILD",
"/DPLATFORM_WINDOWS",
"/DEIGEN_HAS_C99_MATH",
"/DTENSORFLOW_USE_EIGEN_THREADPOOL",
"/DEIGEN_AVOID_STL_ARRAY",
"/Iexternal/gemmlowp",
"/wd4018",
"/wd4577",
"/DNOGDI",
"/UTF_COMPILE_LIBRARY",
],
"//conditions:default": [
"-pthread",
"-std=c++17",
],
}),
features = select({
":windows": ["windows_export_all_symbols"],
"//conditions:default": [],
}),
linkshared = 1,
deps = [
":box_util",
"@local_config_tf//:libtensorflow_framework",
"@local_config_tf//:tf_header_lib",
":box_util",
],
features = select({
":windows": ["windows_export_all_symbols"],
"//conditions:default": [],
}),
copts = select({
":windows": ["/DEIGEN_STRONG_INLINE=inline", "-DTENSORFLOW_MONOLITHIC_BUILD", "/DPLATFORM_WINDOWS", "/DEIGEN_HAS_C99_MATH", "/DTENSORFLOW_USE_EIGEN_THREADPOOL", "/DEIGEN_AVOID_STL_ARRAY", "/Iexternal/gemmlowp", "/wd4018", "/wd4577", "/DNOGDI", "/UTF_COMPILE_LIBRARY"],
"//conditions:default": ["-pthread", "-std=c++17"],
}),
)

0 comments on commit 79a1c26

Please sign in to comment.