diff --git a/c_api/README.md b/c_api/README.md index 58dd706586..b639456108 100644 --- a/c_api/README.md +++ b/c_api/README.md @@ -1,4 +1,4 @@ -# C API implementation +# C API tutorial This directory is the implementation of FastDeploy C SDK, which provides solutions for scenarios where users need C API. diff --git a/c_api/README_CN.md b/c_api/README_CN.md index 21429d0d64..78ea213bca 100644 --- a/c_api/README_CN.md +++ b/c_api/README_CN.md @@ -1,4 +1,4 @@ -# C API实现 +# C API指南 该目录下为FastDeploy C SDK的接口实现,为用户需要C API的场景提供解决方案。 diff --git a/csharp/README.md b/csharp/README.md index 053f3df45d..9271581f55 100644 --- a/csharp/README.md +++ b/csharp/README.md @@ -1,4 +1,4 @@ -# C# API implementation +# C# API tutorial This directory is the implementation of FastDeploy C# SDK, which provides solutions for scenarios where users need C# API. diff --git a/csharp/README_CN.md b/csharp/README_CN.md index 3dc3ec553d..a0b3c7857c 100644 --- a/csharp/README_CN.md +++ b/csharp/README_CN.md @@ -1,4 +1,4 @@ -# C# API实现 +# C# API指南 该目录下为FastDeploy C# SDK的接口实现,为用户需要C# API的场景提供解决方案。 diff --git a/docs/cn/build_and_install/cpu.md b/docs/cn/build_and_install/cpu.md index 87bed015bc..c3a6776390 100644 --- a/docs/cn/build_and_install/cpu.md +++ b/docs/cn/build_and_install/cpu.md @@ -12,8 +12,8 @@ | ENABLE_OPENVINO_BACKEND | Linux(x64)/Windows(x64)/Mac OSX(x86) | 默认OFF,是否编译集成OpenVINO后端 | | ENABLE_VISION | Linux(x64)/Windows(x64)/Mac OSX(x86) | 默认OFF,是否编译集成视觉模型的部署模块 | | ENABLE_TEXT | Linux(x64)/Windows(x64)/Mac OSX(x86) | 默认OFF,是否编译集成文本NLP模型的部署模块 | -| ENABLE_CAPI | Linux(x64)/Windows(x64)/Mac OSX(x86) | 默认OFF,是否编译集成C API | -| ENABLE_CSHARPAPI | Windows(x64) | 默认OFF,是否编译集成C# API | +| WITH_CAPI | Linux(x64)/Windows(x64)/Mac OSX(x86) | 默认OFF,是否编译集成C API | +| WITH_CSHARPAPI | Windows(x64) | 默认OFF,是否编译集成C# API | 第三方库依赖指定(不设定如下参数,会自动下载预编译库) | 选项 | 说明 | @@ -70,7 +70,7 @@ cmake .. -G "Visual Studio 16 2019" -A x64 ^ -DENABLE_VISION=ON ^ -DENABLE_TEXT=ON ^ -DCMAKE_INSTALL_PREFIX="D:\Paddle\compiled_fastdeploy" -% nuget restore (please execute it when ENABLE_CSHARPAPI to prepare dependencies in C#) +% nuget restore (please execute it when WITH_CSHARPAPI=ON to prepare dependencies in C#) msbuild fastdeploy.sln /m /p:Configuration=Release /p:Platform=x64 msbuild INSTALL.vcxproj /m /p:Configuration=Release /p:Platform=x64 ``` diff --git a/docs/cn/build_and_install/gpu.md b/docs/cn/build_and_install/gpu.md index 5b467c2585..b59ff14afa 100644 --- a/docs/cn/build_and_install/gpu.md +++ b/docs/cn/build_and_install/gpu.md @@ -16,8 +16,8 @@ | ENABLE_TEXT | Linux(x64)/Windows(x64) | 默认OFF,是否编译集成文本NLP模型的部署模块 | | CUDA_DIRECTORY | Linux(x64)/Windows(x64) | 默认/usr/local/cuda,要求CUDA>=11.2 | | TRT_DIRECTORY | Linux(x64)/Windows(x64) | 默认为空,要求TensorRT>=8.4, 指定路径如/Download/TensorRT-8.5 | -| ENABLE_CAPI | Linux(x64)/Windows(x64)/Mac OSX(x86) | 默认OFF,是否编译集成C API | -| ENABLE_CSHARPAPI | Windows(x64) | 默认OFF,是否编译集成C# API | +| WITH_CAPI | Linux(x64)/Windows(x64)/Mac OSX(x86) | 默认OFF,是否编译集成C API | +| WITH_CSHARPAPI | Windows(x64) | 默认OFF,是否编译集成C# API | 第三方库依赖指定(不设定如下参数,会自动下载预编译库) | 选项 | 说明 | @@ -88,7 +88,7 @@ cmake .. -G "Visual Studio 16 2019" -A x64 ^ -DTRT_DIRECTORY="D:\Paddle\TensorRT-8.4.1.5" ^ -DCUDA_DIRECTORY="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2" ^ -DCMAKE_INSTALL_PREFIX="D:\Paddle\compiled_fastdeploy" -% nuget restore (please execute it when ENABLE_CSHARPAPI to prepare dependencies in C#) +% nuget restore (please execute it when WITH_CSHARPAPI=ON to prepare dependencies in C#) msbuild fastdeploy.sln /m /p:Configuration=Release /p:Platform=x64 msbuild INSTALL.vcxproj /m /p:Configuration=Release /p:Platform=x64 ``` diff --git a/docs/en/build_and_install/cpu.md b/docs/en/build_and_install/cpu.md index 694210d056..4a04c4bdab 100644 --- a/docs/en/build_and_install/cpu.md +++ b/docs/en/build_and_install/cpu.md @@ -13,8 +13,8 @@ Please do not modify other cmake paramters exclude the following options. | ENABLE_OPENVINO_BACKEND | Linux(x64)/Windows(x64)/Mac OSX(x86) | Default OFF, whether to intergrate OpenVINO backend | | ENABLE_VISION | Linux(x64/aarch64)/Windows(x64)/Mac OSX(arm64/x86) | Default OFF, whether to intergrate vision models | | ENABLE_TEXT | Linux(x64/aarch64)/Windows(x64)/Mac OSX(arm64/x86) | Default OFF, whether to intergrate text models | -| ENABLE_CAPI | Linux(x64)/Windows(x64)/Mac OSX(x86) | Default OFF, whether to intergrate C API | -| ENABLE_CSHARPAPI | Windows(x64) | Default OFF, whether to intergrate C# API | +| WITH_CAPI | Linux(x64)/Windows(x64)/Mac OSX(x86) | Default OFF, whether to intergrate C API | +| WITH_CSHARPAPI | Windows(x64) | Default OFF, whether to intergrate C# API | The configuration for third libraries(Optional, if the following option is not defined, the prebuilt third libraries will download automaticly while building FastDeploy). | Option | Description | @@ -70,7 +70,7 @@ cmake .. -G "Visual Studio 16 2019" -A x64 \ -DENABLE_OPENVINO_BACKEND=ON \ -DENABLE_VISION=ON \ -DCMAKE_INSTALL_PREFIX="D:\Paddle\compiled_fastdeploy" -% nuget restore (please execute it when ENABLE_CSHARPAPI to prepare dependencies in C#) +% nuget restore (please execute it when WITH_CSHARPAPI=ON to prepare dependencies in C#) msbuild fastdeploy.sln /m /p:Configuration=Release /p:Platform=x64 msbuild INSTALL.vcxproj /m /p:Configuration=Release /p:Platform=x64 ``` diff --git a/docs/en/build_and_install/gpu.md b/docs/en/build_and_install/gpu.md index 5c6f487cb0..66e4ce4d96 100644 --- a/docs/en/build_and_install/gpu.md +++ b/docs/en/build_and_install/gpu.md @@ -16,8 +16,8 @@ Please do not modify other cmake paramters exclude the following options. | ENABLE_TEXT | Linux(x64/Windows(x64) | Default OFF, whether to intergrate text models | | CUDA_DIRECTORY | Linux(x64/Windows(x64) | Default /usr/local/cuda,require CUDA>=11.2 | | TRT_DIRECTORY | Linux(x64/Windows(x64) | Default empty,require TensorRT>=8.4, e.g. /Download/TensorRT-8.5 | -| ENABLE_CAPI | Linux(x64)/Windows(x64)/Mac OSX(x86) | Default OFF, whether to intergrate C API | -| ENABLE_CSHARPAPI | Windows(x64) | Default OFF, whether to intergrate C# API | +| WITH_CAPI | Linux(x64)/Windows(x64)/Mac OSX(x86) | Default OFF, whether to intergrate C API | +| WITH_CSHARPAPI | Windows(x64) | Default OFF, whether to intergrate C# API | The configuration for third libraries(Optional, if the following option is not defined, the prebuilt third libraries will download automaticly while building FastDeploy). | Option | Description | @@ -87,7 +87,7 @@ cmake .. -G "Visual Studio 16 2019" -A x64 \ -DTRT_DIRECTORY="D:\Paddle\TensorRT-8.4.1.5" \ -DCUDA_DIRECTORY="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2" \ -DCMAKE_INSTALL_PREFIX="D:\Paddle\compiled_fastdeploy" -% nuget restore (please execute it when ENABLE_CSHARPAPI to prepare dependencies in C#) +% nuget restore (please execute it when WITH_CSHARPAPI=ON to prepare dependencies in C#) msbuild fastdeploy.sln /m /p:Configuration=Release /p:Platform=x64 msbuild INSTALL.vcxproj /m /p:Configuration=Release /p:Platform=x64 ``` diff --git a/tutorials/README.md b/tutorials/README.md index 8e0f3095c1..6f98b970d2 100644 --- a/tutorials/README.md +++ b/tutorials/README.md @@ -7,3 +7,4 @@ This directory provides some tutorials for FastDeploy. For other model deploymen - Intel independent graphics card/integrated graphics card deployment [see intel_gpu](intel_gpu) - Model multithreaded call [see multi_thread](multi_thread) - Image decoding, including hardward decoding, e.g. nvJPEG [image_decoder](image_decoder) +- Deploy models with C or C# API [use_c_csharp_sdk](use_c_sharp_sdk) diff --git a/tutorials/README_CN.md b/tutorials/README_CN.md index efdd904b9a..1a9bc4affa 100644 --- a/tutorials/README_CN.md +++ b/tutorials/README_CN.md @@ -8,3 +8,4 @@ - Intel独立显卡/集成显卡部署 [见intel_gpu](intel_gpu) - 模型多线程调用 [见multi_thread](multi_thread) - 图片解码(含nvJPEG硬解码) [见image_decoder](image_decoder) +- 使用C或C# API进行模型部署 [见use_c_csharp_sdk](use_c_sharp_sdk) diff --git a/tutorials/use_c_csharp_sdk/README.md b/tutorials/use_c_csharp_sdk/README.md new file mode 100644 index 0000000000..d615c0aeb3 --- /dev/null +++ b/tutorials/use_c_csharp_sdk/README.md @@ -0,0 +1,8 @@ +English | [中文](README_CN.md) + +# Model Deployment with C or C# API + +Fastdeploy provideds C and C# API to support deployment with multiple programming languages, and this feature is included since version 1.0.4. C API is compiled and included in fastdeploy dynamic library by default. If you want to compile fastdeploy with C and C# API manually, compile it with options -DWITH_CAPI=ON and -DWITH_CSHARPAPI=ON. For more information about how to use C and C# API to deploy models, please refer to + +- [C API tutorial](../../c_api/README.md) +- [C# API tutorial](../../csharp/README.md) diff --git a/tutorials/use_c_csharp_sdk/README_CN.md b/tutorials/use_c_csharp_sdk/README_CN.md new file mode 100644 index 0000000000..a3f1f6ec8b --- /dev/null +++ b/tutorials/use_c_csharp_sdk/README_CN.md @@ -0,0 +1,10 @@ +[English](README.md) | 中文 + + +# 使用C或C# API进行模型部署 + +FastDeploy提供了C API以及C# API满足多语言部署的需求,这一特性从FastDeploy v1.0.4版本开始进行了支持。默认情况下,C API被编译进入了fastdeploy的动态库。 +如果希望手动编译FastDeploy,并且集成C和C# API进去,只需要打开编译开关-DWITH_CAPI=ON, -DWITH_CSHARPAPI=ON。关于如何安装和使用C和C# API,可以参考下列文档: + +- [C API指南](../../c_api/README_CN.md) +- [C# API指南](../../csharp/README_CN.md)