Skip to content

Commit acc58c1

Browse files
authored
Fix TRT max_workspace_size deprecation notice (#6856)
* Fix TRT `max_workspace_size` deprecation notice * Update export.py * Update export.py
1 parent a5a1760 commit acc58c1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

export.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ def export_engine(model, im, file, train, half, simplify, workspace=4, verbose=F
218218
builder = trt.Builder(logger)
219219
config = builder.create_builder_config()
220220
config.max_workspace_size = workspace * 1 << 30
221+
# config.set_memory_pool_limit(trt.MemoryPoolType.WORKSPACE, workspace << 30) # fix TRT 8.4 deprecation notice
221222

222223
flag = (1 << int(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH))
223224
network = builder.create_network(flag)

0 commit comments

Comments
 (0)