[Debug] TensorRT-Polygraph工具

BUG:

Error Code 10: Internal Error (Could not find any implementation for node

[06/28/2022-09:03:12] [TRT] [W] TensorRT was linked against cuBLAS/cuBLAS LT 11.8.0 but loaded cuBLAS/cuBLAS LT 11.6.5
[06/28/2022-09:03:12] [TRT] [W] TensorRT was linked against cuDNN 8.3.2 but loaded cuDNN 8.2.4
[06/28/2022-09:03:28] [TRT] [W] Skipping tactic 0 due to insuficient memory on requested size of 99043584 detected for tactic 0.
[06/28/2022-09:03:28] [TRT] [E] 10: [optimizer.cpp::computeCosts::2033] Error Code 10: Internal Error (Could not find any implementation for node {ForeignNode[93...Add_4001]}.)
[06/28/2022-09:03:28] [TRT] [E] 2: [builder.cpp::buildSerializedNetwork::619] Error Code 2: Internal Error (Assertion engine != nullptr failed. )
[!] Invalid Engine. Please ensure the engine was built correctly
Traceback (most recent call last):
  File "build_and_run.py", line 63, in <module>
    main()
  File "build_and_run.py", line 50, in main
    with TrtRunner(build_engine) as runner:

参考方案:Error Code 10: Internal Error (Could not find any implementation for node {ForeignNode[Unsqueeze_93...Softmax_2088]} · Issue #1917 · NVIDIA/TensorRT · GitHubhttps://github.com/NVIDIA/TensorRT/issues/1917

解决方案:

通过增加workspace大小解决,代码如下:

build_engine = EngineFromNetwork(
        NetworkFromOnnxPath(model_config["model_name"]+".onnx"), config=CreateConfig(max_workspace_size=1<<24, tf32=model_config['tf32'], fp16=model_config['fp16'])
    )
# max_workspace_size=1<<24 -> max_workspace_size=10<<24
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值