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 |
Metadata
Release files for apstone 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| apstone-0.0.8.tar.gz | 41.3 kB | Details |
Release files / apstone-0.0.8.tar.gz
| Download URL | apstone-0.0.8.tar.gz |
|---|---|
| Size | 41.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e93f99275affbe0abf733f2ec065a23cfe6bc64365d11e666c3b3f374bc6f60
|
|
BLAKE2b-256 checksum How to use checksums |
755b6ac2ffe7fd2dee1e8f522c904acdaa517ab58bd46db9549404f533113eed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|