Skip to content

Commit 56e6867

Browse files
remove debug flag (#3618)
1 parent ff92545 commit 56e6867

24 files changed

+8
-88
lines changed

examples/apps/flux_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ def forward_loop(mod):
107107
"enabled_precisions": enabled_precisions,
108108
"truncate_double": True,
109109
"min_block_size": 1,
110-
"debug": False,
111110
"use_python_runtime": True,
112111
"immutable_weights": False,
113112
"offload_module_to_cpu": True,

examples/distributed_inference/data_parallel_gpt2.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1616

1717
import torch
18+
import torch_tensorrt
1819
from accelerate import PartialState
1920
from transformers import AutoTokenizer, GPT2LMHeadModel
2021

21-
import torch_tensorrt
22-
2322
tokenizer = AutoTokenizer.from_pretrained("gpt2")
2423

2524
# Set input prompts for different devices
@@ -42,7 +41,6 @@
4241
options={
4342
"truncate_long_and_double": True,
4443
"enabled_precisions": {torch.float16},
45-
"debug": True,
4644
},
4745
dynamic=False,
4846
)

examples/distributed_inference/data_parallel_stable_diffusion.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
# Imports and Model Definition
1515
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1616
import torch
17+
import torch_tensorrt
1718
from accelerate import PartialState
1819
from diffusers import DiffusionPipeline
1920

20-
import torch_tensorrt
21-
2221
model_id = "CompVis/stable-diffusion-v1-4"
2322

2423
# Instantiate Stable Diffusion Pipeline with FP16 weights
@@ -41,7 +40,6 @@
4140
options={
4241
"truncate_long_and_double": True,
4342
"precision": torch.float16,
44-
"debug": True,
4543
"use_python_runtime": True,
4644
},
4745
dynamic=False,

examples/dynamo/aot_plugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ def forward(self, X: torch.Tensor) -> torch.Tensor:
163163
model_trt = torch_tensorrt.compile(
164164
my_model,
165165
inputs=trt_inputs,
166-
debug=True,
167166
min_block_size=1,
168167
)
169168
print("Model compiled successfully!")

examples/dynamo/auto_generate_converters.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,7 @@ def forward(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
174174
n = torch.full((64, 64), 3, device="cuda", dtype=torch.float)
175175

176176
with torch_tensorrt.logging.errors():
177-
model_trt = torch_tensorrt.compile(
178-
my_model, inputs=[m, n], debug=True, min_block_size=1
179-
)
177+
model_trt = torch_tensorrt.compile(my_model, inputs=[m, n], min_block_size=1)
180178
for i in range(300):
181179
res = model_trt(m, n)
182180
assert torch.allclose(res, my_model(m, n))

examples/dynamo/auto_generate_plugins.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ def forward(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
144144
n = torch.randint(0, 5, (64, 64), device="cuda", dtype=torch.float)
145145

146146
with torch_tensorrt.logging.errors():
147-
model_trt = torch_tensorrt.compile(
148-
my_model, inputs=[m, n], debug=True, min_block_size=1
149-
)
147+
model_trt = torch_tensorrt.compile(my_model, inputs=[m, n], min_block_size=1)
150148
for i in range(300):
151149
res = model_trt(m, n)
152150
assert torch.allclose(res, my_model(m, n))

examples/dynamo/cross_runtime_compilation_for_windows.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
"cross runtime compiled model for windows can only be compiled in Linux system"
7272
)
7373
compile_spec = {
74-
"debug": True,
7574
"min_block_size": 1,
7675
}
7776
torchtrt.cross_compile_for_windows(

examples/dynamo/custom_kernel_plugins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
276276
# Node: torch.ops.torchtrt_ex.triton_circular_pad.default, with layer location: __/triton_circular_pad
277277
# Note: Some of the above nodes may be supported, but were not included in a TRT graph by the partitioner
278278
#
279-
# Compiled with: CompilationSettings(enabled_precisions={<dtype.f32: 7>}, debug=False, workspace_size=0, min_block_size=1, torch_executed_ops=set(), pass_through_build_failures=False, max_aux_streams=None, version_compatible=False, optimization_level=None, use_python_runtime=False, truncate_double=False, use_fast_partitioner=True, enable_experimental_decompositions=False, device=Device(type=DeviceType.GPU, gpu_id=0), require_full_compilation=False, disable_tf32=False, sparse_weights=False, refit=False, engine_capability=<EngineCapability.STANDARD: 1>, num_avg_timing_iters=1, dla_sram_size=1048576, dla_local_dram_size=1073741824, dla_global_dram_size=536870912, dryrun=True, hardware_compatible=False)
279+
# Compiled with: CompilationSettings(enabled_precisions={<dtype.f32: 7>}, workspace_size=0, min_block_size=1, torch_executed_ops=set(), pass_through_build_failures=False, max_aux_streams=None, version_compatible=False, optimization_level=None, use_python_runtime=False, truncate_double=False, use_fast_partitioner=True, enable_experimental_decompositions=False, device=Device(type=DeviceType.GPU, gpu_id=0), require_full_compilation=False, disable_tf32=False, sparse_weights=False, refit=False, engine_capability=<EngineCapability.STANDARD: 1>, num_avg_timing_iters=1, dla_sram_size=1048576, dla_local_dram_size=1073741824, dla_global_dram_size=536870912, dryrun=True, hardware_compatible=False)
280280
#
281281
# Graph Structure:
282282
#
@@ -581,7 +581,7 @@ def circular_padding_converter(
581581
#
582582
# The graph consists of 2 Total Operators, of which 2 operators are supported, 100.0% coverage
583583
#
584-
# Compiled with: CompilationSettings(enabled_precisions={<dtype.f32: 7>}, debug=True, workspace_size=0, min_block_size=1, torch_executed_ops=set(), pass_through_build_failures=False, max_aux_streams=None, version_compatible=False, optimization_level=None, use_python_runtime=False, truncate_double=False, use_fast_partitioner=True, enable_experimental_decompositions=False, device=Device(type=DeviceType.GPU, gpu_id=0), require_full_compilation=False, disable_tf32=False, sparse_weights=False, refit=False, engine_capability=<EngineCapability.STANDARD: 1>, num_avg_timing_iters=1, dla_sram_size=1048576, dla_local_dram_size=1073741824, dla_global_dram_size=536870912, dryrun=False, hardware_compatible=False)
584+
# Compiled with: CompilationSettings(enabled_precisions={<dtype.f32: 7>}, workspace_size=0, min_block_size=1, torch_executed_ops=set(), pass_through_build_failures=False, max_aux_streams=None, version_compatible=False, optimization_level=None, use_python_runtime=False, truncate_double=False, use_fast_partitioner=True, enable_experimental_decompositions=False, device=Device(type=DeviceType.GPU, gpu_id=0), require_full_compilation=False, disable_tf32=False, sparse_weights=False, refit=False, engine_capability=<EngineCapability.STANDARD: 1>, num_avg_timing_iters=1, dla_sram_size=1048576, dla_local_dram_size=1073741824, dla_global_dram_size=536870912, dryrun=False, hardware_compatible=False)
585585
#
586586
# Graph Structure:
587587
#

examples/dynamo/engine_caching_bert_example.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def compile_bert(iterations=3):
5050
"use_python_runtime": False,
5151
"enabled_precisions": {torch.float},
5252
"truncate_double": True,
53-
"debug": False,
5453
"min_block_size": 1,
5554
"immutable_weights": False,
5655
"cache_built_engines": cache_built_engines,

examples/dynamo/engine_caching_example.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040
model = models.resnet18(pretrained=True).eval().to("cuda")
4141
enabled_precisions = {torch.float}
42-
debug = False
4342
min_block_size = 1
4443
use_python_runtime = False
4544

@@ -95,7 +94,6 @@ def torch_compile(iterations=3):
9594
options={
9695
"use_python_runtime": True,
9796
"enabled_precisions": enabled_precisions,
98-
"debug": debug,
9997
"min_block_size": min_block_size,
10098
"immutable_weights": False,
10199
"cache_built_engines": cache_built_engines,
@@ -155,7 +153,6 @@ def dynamo_compile(iterations=3):
155153
tuple(inputs),
156154
use_python_runtime=use_python_runtime,
157155
enabled_precisions=enabled_precisions,
158-
debug=debug,
159156
min_block_size=min_block_size,
160157
immutable_weights=False,
161158
cache_built_engines=cache_built_engines,
@@ -266,7 +263,6 @@ def torch_compile_my_cache(iterations=3):
266263
options={
267264
"use_python_runtime": True,
268265
"enabled_precisions": enabled_precisions,
269-
"debug": debug,
270266
"min_block_size": min_block_size,
271267
"immutable_weights": False,
272268
"cache_built_engines": cache_built_engines,

0 commit comments

Comments
 (0)