FastDeploy icon indicating copy to clipboard operation
FastDeploy copied to clipboard

Support Poros Backend

Open wjj19950828 opened this issue 1 year ago • 1 comments

PR types

New features

PR changes

Poros Backend

Describe

1、支持Poros backend 通过如下方式进行调用:

# prewarm data and option
input_datas = load_example_input_datas()
option = fd.RuntimeOption()
option.use_gpu(0)
option.use_poros_backend()
option.set_model_path(model_path model_format="torchscript")
option.is_dynamic = True

# compile
runtime = fd.Runtime(option)
runtime.compile(input_datas)

# infer
input_data_0 = np.random.rand(1,3,224,224).astype("float32")
result = runtime.forward(input_data_0)
print(result[0].shape)

wjj19950828 avatar Sep 05 '22 07:09 wjj19950828

已添加property以及setter装饰器

wjj19950828 avatar Oct 14 '22 04:10 wjj19950828