diff options
Diffstat (limited to 'third_party/tensorrt/build_defs.bzl.tpl')
-rw-r--r-- | third_party/tensorrt/build_defs.bzl.tpl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/third_party/tensorrt/build_defs.bzl.tpl b/third_party/tensorrt/build_defs.bzl.tpl new file mode 100644 index 0000000000..18f354ee5a --- /dev/null +++ b/third_party/tensorrt/build_defs.bzl.tpl @@ -0,0 +1,18 @@ +# -*- python -*- +""" +template file for trt functions + +""" + +def is_trt_enabled(): + return %{trt_configured} + +def if_trt(if_true,if_false=[]): + # if is_trt_enabled(): + # return if_true + # return if_false + + return select({ + "@local_config_tensorrt//:trt_enabled":if_true, + "//conditions:default":if_false, + }) |