GithubHelp home page GithubHelp logo

torchpipe / torchpipe Goto Github PK

View Code? Open in Web Editor NEW
135.0 6.0 12.0 40.37 MB

Boosting DL Service Throughput 1.5-4x by Ensemble Pipeline Serving with Concurrent CUDA Streams for PyTorch/LibTorch Frontend and TensorRT/CVCUDA, etc., Backends

Home Page: https://torchpipe.github.io/

License: Apache License 2.0

CMake 0.50% Shell 0.10% Python 25.49% C++ 71.67% C 0.38% Cuda 1.39% Dockerfile 0.47%
deployment inference pipeline-parallelism serving tensorrt ray-serve triton-inference-server ray pytorch torch2trt

torchpipe's Introduction

English | 简体中文

TorchPipe

Serving inside Pytorch with Multiple Threads

Documentation

Torchpipe is an alternative choice for Triton Inference Server, mainly featuring similar functionalities such as Shared-momoryEnsemble, BLS mechanism. It aims to address common problems faced by the industry.

Production-Grade:Within NetEase over hundreds of billions of calls supported by Torchpipe everyday.

Installation

Using NGC Docker Image

Using NGC Docker Image

The easiest way is to choose NGC mirror for source code compilation (you may need to update your dirver).

First, clone the code:

git clone https://github.com/torchpipe/torchpipe.git
cd torchpipe/ && git submodule update --init --recursive

Then start the container and if your machine supports a higher version of the image, you can use the updated version of the Pytorch image.

img_name=nvcr.io/nvidia/pytorch:23.08-py3  # for tensort8.6.1, LayerNorm
# img_name=nvcr.io/nvidia/pytorch:22.12-py3  # For driver version lower than 510
docker run --rm --gpus=all --ipc=host  --network=host -v `pwd`:/workspace  --shm-size 1G  --ulimit memlock=-1 --ulimit stack=67108864  --privileged=true  -w/workspace -it $img_name /bin/bash

python setup.py install

cd examples/resnet18 && python resnet18.py

NOTE: If you are using a transformer-ish model, it is strongly recommended to use TensorRT >= 8.6.1 (nvcr.io/nvidia/pytorch:23.05-py3) for supporting opset 17 for LayerNormalization and opset 18 GroupNormalization.

From Dockerfile
# build docker image by yourself: 
docker build --network=host -f ./docker/Dockerfilex -t trt thirdparty/
export img_name=trt

Multi-Instance High-Throughput Serving

Torchpipe is a multi-instance pipeline parallel library that acts as a bridge between lower-level acceleration libraries (such as TensorRT, OpenCV, CVCUDA) and RPC frameworks (like Thrift, gRPC), ensuring a strict decoupling from them. It offers a thread-safe function interface for the PyTorch frontend at a higher level, while empowering users with fine-grained backend extension capabilities at a lower level.

Minimalist Configuration

The configuration of AI pipelines can be a complex and error-prone task, often requiring deep technical expertise. TorchPipe is designed to be intuitive and user-friendly, allowing even those with limited technical background in AI deployment to configure and optimize their AI pipelines efficiently. This enables users to define complex pipeline behaviors without getting bogged down in intricate coding details.

Quick Start

1. Get appropriate model file (currently supports ONNX, TensorRT engine, etc.).

import torchvision.models as models
resnet18 = models.resnet18(pretrained=True).eval().cuda()

import tempfile, os, torch
model_path =  os.path.join(tempfile.gettempdir(), "./resnet18.onnx") 
data_bchw = torch.rand((1, 3, 224, 224)).cuda()
print("export: ", model_path)
torch.onnx.export(resnet18, data_bchw, model_path,
                  opset_version=17,
                  do_constant_folding=True,
                  input_names=["in"], output_names=["out"],dynamic_axes={"in": {0: "x"},"out": {0: "x"}})

# os.system(f"onnxsim {model_path} {model_path}")

2. Now you can perform concurrent calls to a single model.

import torch, torchpipe
model = torchpipe.pipe({'model': model_path,
                        'backend': "Sequential[cvtColorTensor,TensorrtTensor,SyncTensor]", # Backend engine, see backend API reference documentation
                        'instance_num': 2, 'batching_timeout': '5', # Number of instances and timeout time
                        'max': 4, # Maximum value of the model optimization range, which can also be '4x3x224x224'
                        'mean': '123.675, 116.28, 103.53', # 255*"0.485, 0.456, 0.406"
                        'std': '58.395, 57.120, 57.375', # Fusion into TensorRT network
                        'color': 'rgb'}) # Parameters for cvtColorTensor backend: target color space order
data = torch.zeros((1, 3, 224, 224)) # or torch.from_numpy(...)
input = {"data": data, 'color': 'bgr'}
model(input)  # Can be called in parallel with multiple threads
# Use "result" as the data output identifier; of course, other key values ​​can also be custom written
print(input["result"].shape)  # If failed, this key value must not exist, even if it already exists when input.

c++ API is also possible through [libtorch+cmake] or [pybind11].

YOLO-X Example

The following example shows the configuration for detection using YOLO-X. By default, it supports cross-request batching and node-level pipeline parallelism, under a product-ready environment.

batching_timeout = 5  # Waiting timeout for cross-request batching 
precision = "fp16" 

[jpg_decoder]
backend = "Sequential[DecodeMat,cvtColorMat,ResizePadMat,Mat2Tensor,SyncTensor]"
color = "bgr"
instance_num = 5
max_h = 416
max_w = 416

# the next node to go after this node
next = "detect"

[detect]
backend = "Sequential[TensorrtTensor,PostProcYolox,SyncTensor]" 
batching_timeout = 5 # Waiting timeout for cross-request batching 
instance_num = 2 
max = 4  # maximum batchsize
model = "./yolox_tiny.onnx"
"model::cache" = "./yolox_tiny.trt"

# params for user-defined backend PostProcYolox:
net_h=416
net_w=416

Roadmap

TorchPipe is currently in a rapid iteration phase, and we greatly appreciate your help. Feel free to provide feedback through issues or merge requests. Check out our Contribution Guidelines.

Our ultimate goal is to make high-throughput deployment on the server side as simple as possible. To achieve this, we actively iterate and are willing to collaborate with other projects with similar goals.

Current RoadMap:

  • Optimization of the compilation system, divided into modules such as core, pplcv, model/tensorrt, opencv, etc.
  • Optimization of the basic structure, including Python and C++ interaction, exception handling, logging system, compilation system, and cross-process backend optimization.
  • Technical reports

Potential research directions that have not been completed:

  • Single-node scheduling and multi-node scheduling backends, which have no essential difference from the computing backend, need to be decoupled more towards users. We want to optimize this part as part of the user API.
  • Debugging tools for multi-node scheduling. Since stack simulation design is used in multi-node scheduling, it is relatively easy to design node-level debugging tools.
  • Load balancing.

Acknowledgements

Our codebase is built using multiple opensource contributions, please see ACKNOWLEDGEMENTS for more details.

torchpipe's People

Contributors

shijianjian avatar tp-nan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

torchpipe's Issues

编译失败,使用docker为 nvcr.io/nvidia/pytorch:23.08-py3

报错如下:

Running setup.py develop for torchpipe
Running command /usr/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/workspace/setup.py'"'"'; file='"'"'/workspace/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps
WARN: random IPIPE_KEY used.
Building wheel torchpipe-0.4.4+e5bc165
NVJPEG found: True
extra_compile_args: {'cxx': ['-Wno-unused-parameter', '-std=c++17', '-DWITH_OPENCV', '-DWITH_TENSORRT', '-DIPIPE_KEY=2703692098.5610943', '-DWITH_CUDA', '-DNDEBUG', '-O3', '-finline-functions', '-DNDEBUG', '-O3', '-fPIC', '-Werror=return-type', '-DCATCH_SUB'], 'nvcc': ['-std=c++17']}
running develop
/usr/local/lib/python3.10/dist-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running egg_info
writing torchpipe.egg-info/PKG-INFO
writing dependency_links to torchpipe.egg-info/dependency_links.txt
writing requirements to torchpipe.egg-info/requires.txt
writing top-level names to torchpipe.egg-info/top_level.txt
reading manifest file 'torchpipe.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.so' under directory 'ipipe'
warning: no files found matching '
.hpp' under directory 'ipipe'
warning: no files found matching '.h' under directory 'ipipe'
warning: no files found matching '
.hpp' under directory 'thirdparty/spdlog/include/'
warning: no files found matching 'libcvcuda.so*' under directory 'build'
adding license file 'LICENSE'
writing manifest file 'torchpipe.egg-info/SOURCES.txt'
running build_ext
/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:398: UserWarning: There are no x86_64-linux-gnu-g++ version bounds defined for CUDA version 12.1
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'torchpipe.libipipe' extension
Emitting ninja build file /workspace/build/temp.linux-x86_64-3.10/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.11.1.git.kitware.jobserver-1
x86_64-linux-gnu-g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -fwrapv -O2 -Wl,-Bsymbolic-functions -fwrapv -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 /workspace/build/temp.linux-x86_64-3.10/workspace/thirdparty/cvnp/cvnp/cvnp.o /workspace/build/temp.linux-x86_64-3.10/workspace/thirdparty/cvnp/cvnp/cvnp_synonyms.o /workspace/build/temp.linux-x86_64-3.10/workspace/thirdparty/cvnp/cvnp/cvnp_test_helper.o /workspace/build/temp.linux-x86_64-3.10/workspace/thirdparty/cvnp/cvnp/pydef_cvnp.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/Interpreter.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/AES.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/ModelConverter.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/NativeAES.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/OpenvinoMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/PillowResizeTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/PyTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/Python.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/PythonEngine.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/SubProcess.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/SyncTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/Torch.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/cuda_utils.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/params.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/BatchingPostProc2Cpu.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/C10Exception.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/CreateTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/CropTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/CvtColorTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/DecodeTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/GpuTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/LoadTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/MultipleConcatPreprocess.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/ResizePadTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/ResizeTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/SaveTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/SingleConcatPreprocess.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/SoftArgMax.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/TorchScriptTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/decrypt.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/tensorrt_utils.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/torch_allocator.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/torch_utils.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/tensorrt/Calibrator.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/tensorrt/Onnx2TensorrtConverter.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/tensorrt/TensorrtTensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/tensorrt/dynamic_onnx2trt.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/tensorrt/infer_model_input_shape.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Backend.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/FileLogger.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Identity.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Keep.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Logger.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Max.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Parallel.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Range.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Remote.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Remove.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Sequential.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Serialize.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Sleep.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/SpdLogger.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/any.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/base_logging.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/event.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/exception.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/file_utils.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/ipipe_utils.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/reflect.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/AlignMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/CropMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/DynamicFixHResizePadMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/DynamicResizeMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/FixHResizePadMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/FloatMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/Mat2Tensor.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/OpencvBackend.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/PerspectiveTransformMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/PillowResizeMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/ResizeCenterPadMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/ResizeMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/ResizePadMat.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/torch_mat_utils.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/Jump.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/JumpV0.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/LogicalGraph.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/MapReduce.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/PhysicalView.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/PipelineReviser.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/PipelineV3.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/Stack.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/config_parser.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/filter.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/python/src/any2object.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/python/src/object2any.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/python/src/tensor_type_caster.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/BaselineSchedule.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/BorrowReplay.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/InstanceHandler.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/Instances.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/MultipleInstances.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/RangeMerger.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/Schedule.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/ScheduleV3.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/ScoreSchedule.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/SortSchedule.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/thirdpart/cvcuda/PillowResizeCudaV2.o /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/thirdpart/pillow-resize/PillowResize.o -L./lib -L/usr/local/lib/ -L/usr/local/lib/ -L/usr/local/lib/python3.10/dist-packages/torch/lib -L/usr/local/cuda/lib64 -lnvonnxparser -lnvinfer -lnvinfer_plugin -lnppc -lnppig -lnvrtc -lnvjpeg -lopencv_core -lopencv_imgcodecs -lopencv_imgproc -lopencv_highgui -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-3.10/torchpipe/libipipe.so -Wl,-Bsymbolic-functions
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/thirdparty/cvnp/cvnp/cvnp.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/thirdparty/cvnp/cvnp/cvnp_synonyms.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/thirdparty/cvnp/cvnp/cvnp_test_helper.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/thirdparty/cvnp/cvnp/pydef_cvnp.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/Interpreter.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/AES.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/ModelConverter.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/NativeAES.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/OpenvinoMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/PillowResizeTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/PyTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/Python.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/PythonEngine.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/SubProcess.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/SyncTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/Torch.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/cuda_utils.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src/params.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/BatchingPostProc2Cpu.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/C10Exception.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/CreateTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/CropTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/CvtColorTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/DecodeTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/GpuTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/LoadTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/MultipleConcatPreprocess.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/ResizePadTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/ResizeTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/SaveTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/SingleConcatPreprocess.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/SoftArgMax.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/TorchScriptTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/decrypt.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/tensorrt_utils.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/torch_allocator.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/src_cuda/torch_utils.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/tensorrt/Calibrator.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/tensorrt/Onnx2TensorrtConverter.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/tensorrt/TensorrtTensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/tensorrt/dynamic_onnx2trt.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/backend/tensorrt/infer_model_input_shape.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Backend.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/FileLogger.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Identity.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Keep.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Logger.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Max.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Parallel.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Range.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Remote.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Remove.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Sequential.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Serialize.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/Sleep.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/SpdLogger.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/any.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/base_logging.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/event.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/exception.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/file_utils.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/ipipe_utils.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/core/src/reflect.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/AlignMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/CropMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/DynamicFixHResizePadMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/DynamicResizeMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/FixHResizePadMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/FloatMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/Mat2Tensor.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/OpencvBackend.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/PerspectiveTransformMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/PillowResizeMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/ResizeCenterPadMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/ResizeMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/ResizePadMat.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/opencv/src/torch_mat_utils.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/Jump.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/JumpV0.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/LogicalGraph.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/MapReduce.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/PhysicalView.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/PipelineReviser.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/PipelineV3.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/Stack.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/config_parser.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/pipeline/src/filter.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/python/src/any2object.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/python/src/object2any.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/python/src/tensor_type_caster.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/BaselineSchedule.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/BorrowReplay.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/InstanceHandler.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/Instances.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/MultipleInstances.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/RangeMerger.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/Schedule.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/ScheduleV3.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/ScoreSchedule.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/schedule/src/SortSchedule.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/thirdpart/cvcuda/PillowResizeCudaV2.o: No such file or directory
/usr/bin/ld: cannot find /workspace/build/temp.linux-x86_64-3.10/workspace/torchpipe/csrc/thirdpart/pillow-resize/PillowResize.o: No such file or directory
collect2: error: ld returned 1 exit status
error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
ERROR: Command errored out with exit status 1: /usr/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/workspace/setup.py'"'"'; file='"'"'/workspace/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

Move examples to another repo

Current main repo is around 100 MB when download those examples and the history files. It is better to move those unnecessary files to another repo to keep this one cleaner, and easy to clone.

ANNOUNCEMENT: Torchpipe Release v0.4.0

Discussed in #25

Originally posted by tp-nan January 12, 2024

torchpipe 0.4.0 Release Notes


torchpipe 0.4.0 is a major release of the library providing multiple new features, and fixes to multiple customer-reported issues.

Release Highlights

torchpipe v0.4.0 includes the following key changes:

  • Initial support for CVCUDA 0.5.0 (WITH_CVCUDA=1 pip install -e .).
  • Improved support for Python backend and Python filters.
  • Added support for TensorRT 9.2.
  • Enhanced compatibility and stability.

Compatibility

GPU Compute Capability: 6.1+(7+.x for WITH_CVCUDA)
Ubuntu x86_64: 20.04, 22.04
CUDA Toolkit: 11.0+ (11.2+ for WITH_CVCUDA)
Python: >= 3.7

Known Issues/Limitations

  • For the torchpipe installed via whl, the dynamic library path for CVCUDA may need to be set using LD_LIBRARY_PATH

License

torchpipe is licensed under the Apache 2.0 license.

Acknowledgements

Thanks for contributions in various ways to torchpipe


This discussion was created from the release Torchpipe Release v0.4.0.

Call for Co-developers: Join our Open Source Project to Improve and Perfect the Codebase

Discussed in #28

Originally posted by tp-nan January 30, 2024
Dear Community,

We are excited to announce that we are seeking passionate co-developers/teams who can help us enhance and perfect our open source project. Our team has been working diligently on this initiative, but we believe that collaboration and diverse perspectives will lead to a better end product. By joining forces with like-minded developers, we aim to create an even more robust, efficient, and user-friendly solution while fostering a vibrant community around it.

Project Overview:

TorchPipe is a multi-instance pipeline parallel library that provides a seamless integration between lower-level acceleration libraries (such as TensorRT and CVCUDA) and RPC frameworks. It achieves strict decoupling from these libraries, offering a thread-safe function interface for the PyTorch frontend at a higher level. At the same time, it enables users to extend the backend capabilities at a lower level. TorchPipe is primarily applied in cloud-based computer vision scenes, with hundreds of millions to billions of daily calls. Its design ensures high service throughput while meeting latency requirements.

Why Contribute?

  • Providing Direct Technical Support for you, Prioritizing Optimization of Your Required Scenarios
  • Learn new skills and improve existing ones through hands-on practice.
  • become co-authers

Responsibilities of Co-developers:

Collaborate effectively with other team members using communication tools.
Actively contribute ideas and solutions during design discussions.
Provide timely feedback on pull requests and issues raised by others.
Adhere to the project's coding standards and guidelines.
Attend regular meetings (if applicable) and actively participate in decision-making processes.

Requirements:

We do not require extensive programming experience from you.

  • Familiarity with version control systems, preferably Git.
  • A positive attitude and willingness to learn from constructive criticism.
  • Self-motivated and able to work independently when necessary.

How to Apply:

Please directly reply to this issue, or apply via email at [email protected]" with the subject line "Application for Co-developer Position." We look forward to hearing from you!

Best Regards,

torchpipe teams

有多节点多进程的实现么?

只发现了单节点单进程多线程的examples, 有多节点多进程的torchpipe实现么? 单节点的话, triton的 ensemble 是可以做到多进程单线程pipeline,对于python, 更能充分利用cpu, 只是没有torchpipe多线程轻量, 那比triton的 ensemble的性能好的原因是什么? 都是cpu 与 gpu拆分成流水线

关于ScheduleV3 banckend的一些问题

对于 Schedule这里我不是很明白其作用。 主要是多个模型或者多个实例的调度吗? 在toml文件中是怎样配置的呢?没有看到相应的demo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.