diff options
Diffstat (limited to 'third_party/tensorrt/build_defs.bzl.tpl')
-rw-r--r-- | third_party/tensorrt/build_defs.bzl.tpl | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/third_party/tensorrt/build_defs.bzl.tpl b/third_party/tensorrt/build_defs.bzl.tpl index 18f354ee5a..8a89b59bc8 100644 --- a/third_party/tensorrt/build_defs.bzl.tpl +++ b/third_party/tensorrt/build_defs.bzl.tpl @@ -1,18 +1,7 @@ -# -*- python -*- -""" -template file for trt functions +# Build configurations for TensorRT. -""" - -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, - }) +def if_tensorrt(if_true, if_false=[]): + """Tests whether TensorRT was enabled during the configure process.""" + if %{tensorrt_is_configured}: + return if_true + return if_false
\ No newline at end of file |