[5.0 GA] UFFParser: Parser error: Sqrt: Unary not supported for other non-constant node

x86
Ubuntu 16.04.4 LTS
GeForce GTX TITAN X
Driver Version: 396.26
cuda 9.0
cudnn 7.3.1

python 3.5.5
tensorflow 1.10.0
tensorrt 5.0.2.6

Hi,
I heard that non-constant Unary operation is supported in TensorRT 5.0 GA (https://devtalk.nvidia.com/default/topic/1026657/unary-layer-in-tensorrt-3-0-rc/?offset=22)

However, there is still error in this code.

X = tf.placeholder(dtype=tf.float32, shape=(None, 368,368, 3))
Y = tf.sqrt(X)
OUT_NAMES=[Y.op.name]
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
with tf.Session(config=config) as sess:
    graph_def = sess.graph_def
    frozen_graph = tf.graph_util.convert_variables_to_constants(sess, graph_def, OUT_NAMES)
    tf_model = tf.graph_util.remove_training_nodes(frozen_graph)
uff_model = uff.from_tensorflow(tf_model, OUT_NAMES)

G_LOGGER = trt.Logger(trt.Logger.Severity.ERROR)
with trt.Builder(G_LOGGER) as builder, builder.create_network() as network, trt.UffParser() as parser:
    builder.max_batch_size = 1
    builder.max_workspace_size = 2**30
    parser.register_input(X.op.name, (3,368,368), trt.UffInputOrder.NHWC)
    for name in OUT_NAMES:
        print(name)
        parser.register_output(name)
    parser.parse_buffer(uff_model, network)
    engine = builder.build_cuda_engine(network)

…and the error is:

[TensorRT] ERROR: UFFParser: Parser error: Sqrt: Unary not supported for other non-constant node
[TensorRT] ERROR: Network must have at least one output

Are these unary operation supported in TensorRT5.0GA?

Hello,

looking into this now. will keep you updated.

NVES

Hello,

Unfortunately, the ops are not supported in TRT5GA, also documented in the release notes here -https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide/index.html#support_op
The fix has been made for TRT Aster, so will be available in next release.

We have addressed this in a future TRT release.

regards,
NVES