Skip to content

upgrade mobilenetv3 to tensorrt 10 - #1708

Merged
mpj1234 merged 1 commit into
wang-xinyu:trt10from
makaveli10:vineet/upgrade-mobilentv3-trt10
Feb 23, 2026
Merged

mpj1234 merged 1 commit into
wang-xinyu:trt10from
makaveli10:vineet/upgrade-mobilentv3-trt10

Conversation

@makaveli10

Copy link
Copy Markdown
Contributor

Only upgrading mobilenetv3 instead of both mobilenetv2/v3 as in PR #1707

C++ Implementations

  • Replaced deprecated APIs:
    • IBuilder::buildEngineWithConfig() -> IBuilder::buildSerializedNetwork()
    • ICudaEngine::deserialize() -> IRuntime::deserializeCudaEngine() with custom IStreamReaderV2
    • IExecutionContext::execute() -> IExecutionContext::enqueueV3()
  • Implemented MyStreamReaderV2 class for TensorRT 10 engine deserialization
  • Updated inference pipeline to use setTensorAddress() and modern execution API

Python Implementations

  • Replaced build_engine() -> build_serialized_network()
  • Updated to explicit batch mode with NetworkDefinitionCreationFlag.EXPLICIT_BATCH
  • Replaced deprecated add_fully_connected() with `add_matrix_multiply()
  • Updated buffer allocation to use TensorRT 10 tensor API (get_tensor_name(), set_tensor_address(), etc.)
  • Migrated to execute_async_v3() for inference

Other Improvements

  • Updated README files with correct script names and output file names
  • Added utils.h for image preprocessing pipeline

Output Sanity Check agains pytorchx:
mobilenetv3-small:

pytorchx: -3.4606e-03, -1.2621e-01,  2.3399e-01, -1.2450e-01,  2.7816e-01
tensorrtx: 0.0197003, -0.112725, 0.211143, -0.124036, 0.288239

mobilenetv3-large

pytorchx: -5.2233e-01,  7.0307e-01,  1.2416e+00,  6.9224e-01,  1.4927e+00
tensorrtx: -0.536705, 0.708078, 1.24243, 0.717128, 1.50676

Signed-off-by: makaveli10 <vineet.suryan@collabora.com>
@makaveli10
makaveli10 force-pushed the vineet/upgrade-mobilentv3-trt10 branch from 04908e2 to 802fd51 Compare February 23, 2026 05:41
@mpj1234
mpj1234 merged commit 65c35bb into wang-xinyu:trt10 Feb 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants