aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/tensorrt/build_defs.bzl.tpl
blob: 18f354ee5a3b7b7530abbb99851dac12989a994e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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,
    })