Skip to main content

ai_power base stone

Project description

Introduction

Base stone of AI_power, maintain all inference of AI_Power models.

Wrapper

  • Supply different model infer wrapper, including ONNX/TensorRT/Torch JIT;
  • Support onnx different Execution Providers (EP) , including cpu/gpu/trt/trt16/int8;
  • High level mmlab model (converted) infer wrapper, including MMPose/MMDet;

Model Convert

  • torch2jit torch2onnx etc.
  • detectron2 to onnx
  • modelscope to onnx
  • onnx2simple2trt
  • tf2pb2onnx

Model Tools

  • torch model edit
  • onnx model shape/speed test (different EP)
  • common scripts from onnxruntime

Usage

onnx model speed test

from apstone import ONNXModel

onnx_p = 'pretrain_models/sr_lib/realesr-general-x4v3-dynamic.onnx'
input_dynamic_shape = (1, 3, 96, 72)  # None
# cpu gpu trt trt16 int8
ONNXModel(onnx_p, provider='cpu', debug=True, input_dynamic_shape=input_dynamic_shape).speed_test()

Install

pip install apstone

Envs

Execution Providers Needs
cpu pip install onnxruntime
gpu pip install onnxruntime-gpu
trt/trt16/int8 onnxruntime-gpu compiled with tensorrt EP
TensorRT pip install tensorrt pycuda
torch JIT install pytorch

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apstone-0.0.8.tar.gz (41.3 kB view details)

Uploaded Source

File details

Details for the file apstone-0.0.8.tar.gz.

File metadata

  • Download URL: apstone-0.0.8.tar.gz
  • Upload date:
  • Size: 41.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for apstone-0.0.8.tar.gz
Algorithm Hash digest
SHA256 0e93f99275affbe0abf733f2ec065a23cfe6bc64365d11e666c3b3f374bc6f60
MD5 8a820b749c0b159508e5934469a3bd4a
BLAKE2b-256 755b6ac2ffe7fd2dee1e8f522c904acdaa517ab58bd46db9549404f533113eed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page