Skip to content

Commit b2eb297

Browse files
committed
changed the file place and deleted unnecessary code
1 parent 1d37c89 commit b2eb297

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

demo/flux_demo.py examples/apps/flux_demo.py

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
del ep
8989
pipe.transformer = trt_gm
9090
pipe.transformer.config = config
91+
trt_gm.device = torch.device("cuda")
9192
torch.cuda.empty_cache()
9293

9394

py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -706,10 +706,9 @@ def run(
706706
builder_config, self.compilation_settings.timing_cache_path
707707
)
708708
# TODO: Memory control prototyping. Under discussion
709-
self.module.to("cpu")
710-
torch.cuda.empty_cache()
711709
del self.module
712710
gc.collect()
711+
torch.cuda.empty_cache()
713712
serialized_engine = self.builder.build_serialized_network(
714713
self.ctx.net, builder_config
715714
)

0 commit comments

Comments
 (0)