Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions qa/L0_infer/infer_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2018-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2018-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -157,19 +157,13 @@ def _infer_exact_helper(
input_dtype,
output0_dtype,
output1_dtype,
(input_size,),
(input_size,),
(input_size,),
):
ensemble_prefix.append(prefix)

if not CPU_ONLY and tu.validate_for_trt_model(
input_dtype,
output0_dtype,
output1_dtype,
(input_size, 1, 1),
(input_size, 1, 1),
(input_size, 1, 1),
):
for prefix in ensemble_prefix:
if "plan" in BACKENDS:
Expand Down Expand Up @@ -204,9 +198,6 @@ def _infer_exact_helper(
input_dtype,
output0_dtype,
output1_dtype,
(input_size,),
(input_size,),
(input_size,),
):
for prefix in ensemble_prefix:
if "onnx" in BACKENDS:
Expand Down
13 changes: 3 additions & 10 deletions qa/L0_infer_reshape/infer_reshape_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2019-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -50,9 +50,7 @@ def _full_reshape(self, dtype, input_shapes, output_shapes=None, no_batch=True):
output_shapes = input_shapes

# For validation assume any shape can be used...
if tu.validate_for_onnx_model(
dtype, dtype, dtype, input_shapes[0], input_shapes[0], input_shapes[0]
):
if tu.validate_for_onnx_model(dtype, dtype, dtype):
# model that supports batching
for bs in (1, 8):
full_shapes = [
Expand Down Expand Up @@ -155,9 +153,6 @@ def _full_reshape(self, dtype, input_shapes, output_shapes=None, no_batch=True):
dtype,
dtype,
dtype,
input_shapes[0],
Comment thread
whoisj marked this conversation as resolved.
input_shapes[0],
input_shapes[0],
):
# model that supports batching
for bs in (1, 8):
Expand Down Expand Up @@ -203,9 +198,7 @@ def _trt_reshape(self, dtype, input_shapes, output_shapes=None, no_batch=True):
if output_shapes is None:
output_shapes = input_shapes

if tu.validate_for_trt_model(
dtype, dtype, dtype, input_shapes[0], input_shapes[0], input_shapes[0]
):
if tu.validate_for_trt_model(dtype, dtype, dtype):
# model that supports batching
for bs in (1, 8):
full_shapes = [
Expand Down
11 changes: 1 addition & 10 deletions qa/L0_infer_variable/infer_variable_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2019-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -140,19 +140,13 @@ def _infer_exact_helper(
input_dtype,
output0_dtype,
output1_dtype,
input_shape,
input_shape,
input_shape,
):
ensemble_prefix.append(prefix)

if tu.validate_for_trt_model(
input_dtype,
output0_dtype,
output1_dtype,
input_shape,
output0_shape,
output1_shape,
):
for prefix in ensemble_prefix:
if input_dtype == np.int8:
Expand Down Expand Up @@ -186,9 +180,6 @@ def _infer_exact_helper(
input_dtype,
output0_dtype,
output1_dtype,
input_shape,
output0_shape,
output1_shape,
):
# No basic ensemble models are created against custom models [TODO]
_infer_exact_helper(
Expand Down
6 changes: 2 additions & 4 deletions qa/L0_infer_zero/infer_zero_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2019-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -93,9 +93,7 @@ def _full_zero(self, dtype, shapes):
)

for name in ["simple_zero", "sequence_zero", "fan_zero"]:
if tu.validate_for_ensemble_model(
name, dtype, dtype, dtype, shapes[0], shapes[0], shapes[0]
):
if tu.validate_for_ensemble_model(name, dtype, dtype, dtype):
# model that supports batching
for bs in (1, 8):
batch_shapes = [
Expand Down
8 changes: 1 addition & 7 deletions qa/L0_storage_swiftstack/infer_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2021-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -87,9 +87,6 @@ def _infer_exact_helper(
input_dtype,
output0_dtype,
output1_dtype,
(input_size, 1, 1),
(input_size, 1, 1),
(input_size, 1, 1),
):
if input_dtype == np.int8:
_infer_exact_helper(
Expand Down Expand Up @@ -122,9 +119,6 @@ def _infer_exact_helper(
input_dtype,
output0_dtype,
output1_dtype,
(input_size,),
(input_size,),
(input_size,),
):
_infer_exact_helper(
self,
Expand Down
20 changes: 10 additions & 10 deletions qa/common/gen_ensemble_model_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2019-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -761,7 +761,7 @@ def create_ensemble_modelfile(

try:
os.makedirs(model_version_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir


Expand Down Expand Up @@ -834,7 +834,7 @@ def create_ensemble_modelconfig(

try:
os.makedirs(config_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir

with open(config_dir + "/config.pbtxt", "w") as cfile:
Expand Down Expand Up @@ -867,7 +867,7 @@ def create_identity_ensemble_modelfile(

try:
os.makedirs(model_version_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir


Expand Down Expand Up @@ -915,7 +915,7 @@ def create_identity_ensemble_modelconfig(

try:
os.makedirs(config_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir

with open(config_dir + "/config.pbtxt", "w") as cfile:
Expand All @@ -937,7 +937,7 @@ def create_sequence_ensemble_modelfile(

try:
os.makedirs(model_version_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir


Expand Down Expand Up @@ -979,7 +979,7 @@ def create_sequence_ensemble_modelconfig(

try:
os.makedirs(config_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir

with open(config_dir + "/config.pbtxt", "w") as cfile:
Expand Down Expand Up @@ -1015,7 +1015,7 @@ def create_nop_modelconfig(

try:
os.makedirs(config_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir

with open(config_dir + "/config.pbtxt", "w") as cfile:
Expand Down Expand Up @@ -1059,7 +1059,7 @@ def create_nop_tunnel_modelconfig(models_dir, tensor_shape, tensor_dtype):

try:
os.makedirs(config_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir

with open(config_dir + "/config.pbtxt", "w") as cfile:
Expand All @@ -1084,7 +1084,7 @@ def create_nop_tunnel_modelconfig(models_dir, tensor_shape, tensor_dtype):

try:
os.makedirs(config_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir

with open(config_dir + "/config.pbtxt", "w") as cfile:
Expand Down
18 changes: 9 additions & 9 deletions qa/common/gen_qa_custom_ops_models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Copyright 2019-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -68,13 +68,13 @@ def forward(self, input0, input1):

try:
os.makedirs(model_version_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir

traced.save(model_version_dir + "/model.pt")


def create_moduloop_modelconfig(models_dir, model_version):
def create_moduloop_modelconfig(models_dir):
model_name = "libtorch_modulo"
config_dir = models_dir + "/" + model_name
config = """
Expand Down Expand Up @@ -106,7 +106,7 @@ def create_moduloop_modelconfig(models_dir, model_version):

try:
os.makedirs(config_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir

with open(config_dir + "/config.pbtxt", "w") as cfile:
Expand All @@ -132,13 +132,13 @@ def forward(self, input, boxes):

try:
os.makedirs(model_version_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir

scripted.save(model_version_dir + "/model.pt")


def create_visionop_modelconfig(models_dir, model_version):
def create_visionop_modelconfig(models_dir):
model_name = "libtorch_visionop"
config_dir = models_dir + "/" + model_name
config = """
Expand Down Expand Up @@ -170,7 +170,7 @@ def create_visionop_modelconfig(models_dir, model_version):

try:
os.makedirs(config_dir)
except OSError as ex:
except OSError:
pass # ignore existing dir

with open(config_dir + "/config.pbtxt", "w") as cfile:
Expand All @@ -181,15 +181,15 @@ def create_modulo_op_models(models_dir):
model_version = 1

if FLAGS.libtorch:
create_moduloop_modelconfig(models_dir, model_version)
create_moduloop_modelconfig(models_dir)
create_moduloop_modelfile(models_dir, model_version)


def create_vision_op_models(models_dir):
model_version = 1

if FLAGS.libtorch:
create_visionop_modelconfig(models_dir, model_version)
create_visionop_modelconfig(models_dir)
create_visionop_modelfile(models_dir, model_version)


Expand Down
Loading
Loading