Comments (4)
Hello @austingg !
I'm not sure if you are referring to dynamic batching or model concurrency. Anyhow, dali_backend
supports both.
In the dynamic batching case, all you need to do is to specify sufficiently large max_batch_size
in model configuration and specify the same value in the batch_size
argument of DALI pipeline, e.g.
config.pbtxt
------------
backend: dali
max_batch_size: 256
dali_pipeline.py
----------------
@dali.pipeline_def(batch_size=256, num_threads=1, device_id=0)
def pipe():
images = dali.fn.extenral_source(device="cpu", name="DALI_INPUT_0")
images = dali.fn.decoders.image(images, device="mixed", output_type=types.RGB)
images = dali.fn.resize(images, resize_x=299, resize_y=299)
images = dali.fn.crop_mirror_normalize(images,
dtype=types.FLOAT,
output_layout="HWC",
crop=(299, 299),
mean=[0.485 * 255, 0.456 * 255, 0.406 * 255],
std=[0.229 * 255, 0.224 * 255, 0.225 * 255])
return images
In case of model concurrency, no special actions are necessary, it should just work. If it doesn't, please let us know.
from dali_backend.
Thanks for your help, @szalpal
I have already used max_batch_size
, however other inference backend also specify dynamic batching {}
, you mean dali_backend doesn't need this ? I used max_batch_size 256
and instance_group: 10
I have checked get_inference_statisitcs()
all dali back batchsize is 1
from dali_backend.
My apologies. In fact, dynamic batching in dali_backend
is not fully supported yet. We expect to handle this in the nearest future, most probably it's going to be included in tritonserver:21.06
release. This feature might be available earlier, but for the main
branch build.
I'll keep this issue open until we ship the dynamic batching support
from dali_backend.
looking forward to it. since I used dali_backend
as the preprocessing part for an ensemble model, the inference backend can use dynamic batch, the bottleneck is preprocessing.
from dali_backend.
Related Issues (20)
- Failed to open serialized model file: models/dali/1/model.dali HOT 2
- Memory increase when decoding exception occurs HOT 2
- dali backend device parameter setting question HOT 1
- layout parameter to external_source causes assert error HOT 2
- DALI backend not releasing device memory HOT 8
- How to provide mean & stddev to dali.fn.normalize HOT 3
- Error when executing Mixed operator decoders__Image when sending image binary to dali in triton HOT 9
- how to use the numpy data in the DALI HOT 3
- Batching does not improve performance with dali HOT 10
- Can dali backend support default values or optional input? HOT 2
- Unexpected large memory needed for gpu resize HOT 4
- Error in thread 31: nvJPEG error (5): The user-provided allocator functions, for either memory allocation or for releasing the memory, returned a non-zero code. HOT 6
- Cannot compile dali_backend with older version of triton HOT 2
- how to provide batch input data for dali pipeline whicn input shapes [-1] HOT 1
- if I want to crop from different start point, how can I build pipe to do this? HOT 2
- Test issue
- Connecting InputOperator with no explicit inputs to Triton HOT 12
- Could not serialize dali.fn.python_function HOT 1
- when using crop_mirror_normalize func, Output layout "CHW" is slower than "HWC" HOT 5
- dlopen libcuda.so failed!. Please install GPU dirverTraceback (most recent call last): HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dali_backend.