浏览代码

Fix TRT `max_workspace_size` deprecation notice (#6856)

* Fix TRT `max_workspace_size` deprecation notice

* Update export.py

* Update export.py
modifyDataloader
Glenn Jocher GitHub 2 年前
父节点
当前提交
acc58c1dcf
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. +1
    -0
      export.py

+ 1
- 0
export.py 查看文件

@@ -218,6 +218,7 @@ def export_engine(model, im, file, train, half, simplify, workspace=4, verbose=F
builder = trt.Builder(logger)
config = builder.create_builder_config()
config.max_workspace_size = workspace * 1 << 30
# config.set_memory_pool_limit(trt.MemoryPoolType.WORKSPACE, workspace << 30) # fix TRT 8.4 deprecation notice

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

正在加载...
取消
保存