diff --git a/docs/lite/docs/source_en/converter/converter_tool.md b/docs/lite/docs/source_en/converter/converter_tool.md index 888a57f588607d258e26a662077da5c5fd6087bc..a524beb359a101355ff69fe13dee2dae1fe2c5bd 100644 --- a/docs/lite/docs/source_en/converter/converter_tool.md +++ b/docs/lite/docs/source_en/converter/converter_tool.md @@ -87,7 +87,7 @@ The following describes the parameters in detail. > - `inputDataFormat`: generally, in the scenario of integrating third-party hardware of NCHW specification, designated as NCHW will have a significant performance improvement over NHWC. In other scenarios, users can also set as needed. > - The `configFile` configuration files uses the `key=value` mode to define related parameters. For the configuration parameters related to quantization, please refer to [quantization](https://www.mindspore.cn/lite/docs/en/master/advanced/quantization.html). For the configuration parameters related to extension, please refer to [Extension Configuration](https://www.mindspore.cn/lite/docs/en/master/advanced/third_party/converter_register.html#extension-configuration). > - `--optimize` parameter is used to set the mode of optimization during the offline conversion. If this parameter is set to none, no relevant graph optimization operations will be performed during the offline conversion phase of the model, and the relevant graph optimization operations will be done during the execution of the inference phase. The advantage of this parameter is that the converted model can be deployed directly to any CPU/GPU/Ascend hardware backend since it is not optimized in a specific way, while the disadvantage is that the initialization time of the model increases during inference execution. If this parameter is set to general, general optimization will be performed, such as constant folding and operator fusion (the converted model only supports CPU/GPU hardware backend, not Ascend backend). If this parameter is set to gpu_oriented, the general optimization and extra optimization for GPU hardware will be performed (the converted model only supports GPU hardware backend). If this parameter is set to ascend_oriented, the optimization for Ascend hardware will be performed (the converted model only supports Ascend hardware backend). -> - The encryption and decryption function only takes effect when `MSLITE_ENABLE_MODEL_ENCRYPTION=on` is set at [compile](https://www.mindspore.cn/lite/docs/en/master/build/build.html) time and only supports Linux x86 platforms, and the key is a string represented by hexadecimal. For example, if the key is defined as `b'0123456789ABCDEF'`, the corresponding hexadecimal representation is `30313233343536373839414243444546`. Users on the Linux platform can use the `xxd` tool to convert the key represented by the bytes to a hexadecimal representation. +> - The encryption and decryption function only takes effect when `MSLITE_ENABLE_MODEL_ENCRYPTION=on` is set at [compile](https://www.mindspore.cn/lite/docs/en/master/build/build.html) time and only supports Linux x86 platforms, and the key is a string represented by hexadecimal. Users on the Linux platform can use the `xxd` tool to convert the key represented by the bytes to a hexadecimal representation. It should be noted that the encryption and decryption algorithm has been updated in version 1.7. As a result, the new version of the converter tool does not support the conversion of the encrypted model exported by MindSpore in version 1.6 and earlier. > - Parameters `--input_shape` and dynamicDims are stored in the model during conversion. Call model.get_model_info("input_shape") and model.get_model_info("dynamic_dims") to get it when using the model. diff --git a/docs/lite/docs/source_en/infer/runtime_cpp.md b/docs/lite/docs/source_en/infer/runtime_cpp.md index 191e9109e0d127663d897771625b6907ee8ee8b9..4bfbfae48863d35160b66d2ac4a5509e6c5eb752 100644 --- a/docs/lite/docs/source_en/infer/runtime_cpp.md +++ b/docs/lite/docs/source_en/infer/runtime_cpp.md @@ -679,7 +679,7 @@ if (build_ret != mindspore::kSuccess) { ### Decrypted Model Prediction -If the model is encrypted by the [converter_lite tool](https://mindspore.cn/mindarmour/docs/en/master/model_encrypt_protection.html#on-device-model-protection), the decryption key and decryption library are necessary to pass into the program. The `dec_key` should be the same as the encryption key used in converter_lite tool, which both are hexadecimal character strings, for example, the hexadecimal string corresponding to b'0123456789ABCDEF is 30313233343536373839414243444546. On the Linux platform, you can use the xxd tool to convert the key represented by bytes to a hexadecimal string. The `crypto_lib_path` is the path for the installed OpenSSL library, for example, "/home/root/openssl". +If the model is encrypted by the [converter_lite tool](https://mindspore.cn/mindarmour/docs/en/master/model_encrypt_protection.html#on-device-model-protection), the decryption key and decryption library are necessary to pass into the program. The `dec_key` should be the same as the encryption key used in converter_lite tool, which both are hexadecimal character strings. On the Linux platform, you can use the xxd tool to convert the key represented by bytes to a hexadecimal string. The `crypto_lib_path` is the path for the installed OpenSSL library, for example, "/home/root/openssl". The following sample code from [main.cc](https://gitee.com/mindspore/mindspore-lite/blob/master/mindspore-lite/examples/runtime_cpp/main.cc) demonstrates how to load graph and build model separately: diff --git a/docs/lite/docs/source_en/mindir/benchmark_tool.md b/docs/lite/docs/source_en/mindir/benchmark_tool.md index 929786e0dc0b9e49f93942282f7910f22a692e47..0ab57251143fa84f2ca4757fbdc8d3db3a1e82ed 100644 --- a/docs/lite/docs/source_en/mindir/benchmark_tool.md +++ b/docs/lite/docs/source_en/mindir/benchmark_tool.md @@ -66,7 +66,7 @@ Detailed parameter descriptions are provided below. | `--enableFp16=` | Optional | Specify whether to give preference to float16 operator. | Boolean | false | true, false | Not supported at the moment | | `--timeProfiling=` | Optional | Take effect at performance verification, specifying whether to use TimeProfiler to print the time of each operator. | Boolean | false | true, false | Not supported at the moment | | `--perfEvent=` | Optional | Take effect during CPU performance verification. Specify the specific content of the CPU performance parameters printed by PerfProfiler. When specified as CYCLE, the number of CPU cycles and the number of instructions of the operator will be printed. When specified as CACHE, the number of cache reads and the number of cache misses of the operator will be printed. When specified as STALL, the number of CPU front-end waiting cycles and the number of back-end waiting cycles will be printed. | String | CYCLE | CYCLE/CACHE/STALL | Not supported at the moment | -| `--decryptKey=` | Optional | The key used to decrypt the file, expressed in hexadecimal characters. Only AES-GCM is supported, and the key length is only 16Byte. | String | null | Note that the key is a hexadecimal representation of the string, such as the key is defined as `b'0123456789ABCDEF'` corresponding to the hexadecimal representation of `30313233343536373839414243444546`. Linux platform users can use the `xxd` tool to convert the byte representation of the key to hexadecimal expression. | Not supported at the moment | +| `--decryptKey=` | Optional | The key used to decrypt the file, expressed in hexadecimal characters. Only AES-GCM is supported, and the key length is only 16Byte. | String | null | Note that the key is a hexadecimal representation of the string. Linux platform users can use the `xxd` tool to convert the byte representation of the key to hexadecimal expression. | Not supported at the moment | | `--cryptoLibPath=` | Optional | Path to the OpenSSL crypto library crypto | String | null | - | Not supported at the moment | ### Usage Examples diff --git a/docs/lite/docs/source_en/mindir/converter_python.md b/docs/lite/docs/source_en/mindir/converter_python.md index 5883a41d41cb06cc1f5972e594a9b768f700db06..988e692e9f413d3de1bd8c2f88f6150f20076c36 100644 --- a/docs/lite/docs/source_en/mindir/converter_python.md +++ b/docs/lite/docs/source_en/mindir/converter_python.md @@ -91,7 +91,7 @@ Detailed descriptions of the parameters and their correspondence to the paramete | save_type | ModelType | `--saveType=` | Required | Set the model type needs to be export. | ModelType.MINDIR | The MINDIR model uses the MindSpore Lite cloud-side inference installation package | | weight_fp16 | bool | `--fp16=` | Set whether the weights in float32 data format need to be stored in float16 data format during model serialization. | True, False | - | -> - The encryption and decryption function only takes effect when `MSLITE_ENABLE_MODEL_ENCRYPTION=on` is set at [compile](https://www.mindspore.cn/lite/docs/en/master/mindir/build.html) time and only supports Linux x86 platforms. `decrypt_key` and `encrypt_key` are string expressed in hexadecimal. For example, if encrypt_key is set as "30313233343637383939414243444546", the corresponding hexadecimal expression is '(b)0123456789ABCDEF' . Linux platform users can use the' xxd 'tool to convert the key expressed in bytes into hexadecimal expressions. +> - The encryption and decryption function only takes effect when `MSLITE_ENABLE_MODEL_ENCRYPTION=on` is set at [compile](https://www.mindspore.cn/lite/docs/en/master/mindir/build.html) time and only supports Linux x86 platforms. `decrypt_key` and `encrypt_key` are string expressed in hexadecimal. Linux platform users can use the' xxd 'tool to convert the key expressed in bytes into hexadecimal expressions. > > - `input_shape` is a attribute that the user may need to set in the following scenarios: > diff --git a/docs/lite/docs/source_en/mindir/converter_tool.md b/docs/lite/docs/source_en/mindir/converter_tool.md index acce13c3bfa14afa8f2b300f6fd60a9abb1f742b..80bf857f3cc27d2daa74c4f651c2b14e6d943e33 100644 --- a/docs/lite/docs/source_en/mindir/converter_tool.md +++ b/docs/lite/docs/source_en/mindir/converter_tool.md @@ -83,7 +83,7 @@ Notes: - Caffe models are generally divided into two files: `*.prototxt` model structure, corresponding to the `--modelFile` parameter, and `*.caffemodel` model weights, corresponding to the `--weightFile` parameter. - The `configFile` configuration file uses the `key=value` approach to define the relevant parameters. - `--optimize` parameter is used to set the mode of optimization during the offline conversion. If this parameter is set to none, no relevant graph optimization operations will be performed during the offline conversion phase of the model, and the relevant graph optimization operations will be done during the execution of the inference phase. The advantage of this parameter is that the converted model can be deployed directly to any CPU/GPU/Ascend hardware backend since it is not optimized in a specific way, while the disadvantage is that the initialization time of the model increases during inference execution. If this parameter is set to general, general optimization will be performed, such as constant folding and operator fusion (the converted model only supports CPU/GPU hardware backend, not Ascend backend). If this parameter is set to gpu_oriented, the general optimization and extra optimization for GPU hardware will be performed (the converted model only supports GPU hardware backend). If this parameter is set to ascend_oriented, the optimization for Ascend hardware will be performed (the converted model only supports Ascend hardware backend). -- The encryption and decryption function only takes effect when `MSLITE_ENABLE_MODEL_ENCRYPTION=on` is set at [compile](https://www.mindspore.cn/lite/docs/en/master/mindir/build.html) time and only supports Linux x86 platforms. `decrypt_key` and `encrypt_key` are string expressed in hexadecimal. For example, if encrypt_key is set as "30313233343637383939414243444546", the corresponding hexadecimal expression is '(b)0123456789ABCDEF' . Linux platform users can use the' xxd 'tool to convert the key expressed in bytes into hexadecimal expressions. +- The encryption and decryption function only takes effect when `MSLITE_ENABLE_MODEL_ENCRYPTION=on` is set at [compile](https://www.mindspore.cn/lite/docs/en/master/mindir/build.html) time and only supports Linux x86 platforms. `decrypt_key` and `encrypt_key` are string expressed in hexadecimal. Linux platform users can use the' xxd 'tool to convert the key expressed in bytes into hexadecimal expressions. - For the MindSpore model, since it is already a `mindir` model, two approaches are suggested: Inference is performed directly without offline conversion. diff --git a/docs/lite/docs/source_en/tools/benchmark_tool.md b/docs/lite/docs/source_en/tools/benchmark_tool.md index 954f3c2cf74b818b2cd03e76f5d238386b63fa5b..047ceb28b3ce43049f4fae1787fb4b4f82c6cb80 100644 --- a/docs/lite/docs/source_en/tools/benchmark_tool.md +++ b/docs/lite/docs/source_en/tools/benchmark_tool.md @@ -67,7 +67,7 @@ The following describes the parameters in detail. | `--inputShapes=` | Optional | Specifies the shape of input data, the format should be NHWC. Use "," to segregate each dimension of input shape, and for several input shapes, use ":" to segregate. | String | Null | - | | `--perfProfiling=` | Optional | Specifies whether to use PerfProfiler to print every kernel's CPU performance data (PMU readings), it is disabled when timeProfiling is true. Only aarch64 CPU is supported. | Boolean | false | true, false | | `--perfEvent=` | Optional | Specifies what CPU performance data to measure when PerfProfiling is true. When set as CYCLE, the number of CPU cycles and instructions will be printed; when set as CACHE, cache reference times and cache miss times will be printed; when set as STALL, CPU front-end stall cycles and back-end stall cycles will be printed. | String | CYCLE | CYCLE/CACHE/STALL | -| `--decryptKey=` | Optional | The key used to decrypt the model, in hexadecimal characters for the key. It only supports AES-GCM, and the key length is only 16Byte. | String | null | Note that the key is a string represented by hexadecimal. For example, if the key is defined as `b'0123456789ABCDEF'`, the corresponding hexadecimal representation is `30313233343536373839414243444546`. Users on the Linux platform can use the `xxd` tool to convert the key represented by the bytes to a hexadecimal representation. | +| `--decryptKey=` | Optional | The key used to decrypt the model, in hexadecimal characters for the key. It only supports AES-GCM, and the key length is only 16Byte. | String | null | Note that the key is a string represented by hexadecimal. Users on the Linux platform can use the `xxd` tool to convert the key represented by the bytes to a hexadecimal representation. | | `--cryptoLibPath=` | Optional | The path to the OpenSSL encryption library. | String | null | - | ### Example diff --git a/docs/lite/docs/source_zh_cn/converter/converter_tool.md b/docs/lite/docs/source_zh_cn/converter/converter_tool.md index b6a1fdf6dcd68e5abe94d1fb366153278503e1d0..2a043b5f1aa0c57920f28de026912a349643757f 100644 --- a/docs/lite/docs/source_zh_cn/converter/converter_tool.md +++ b/docs/lite/docs/source_zh_cn/converter/converter_tool.md @@ -85,7 +85,7 @@ MindSpore Lite模型转换工具提供了多种参数设置,用户可根据需 > - `inputDataFormat`:一般在集成NCHW规格的三方硬件场景下,设为NCHW比NHWC会有较明显的性能提升。在其他场景下,用户也可按需设置。 > - `configFile`配置文件采用`key=value`的方式定义相关参数,量化相关的配置参数详见[量化](https://www.mindspore.cn/lite/docs/zh-CN/master/advanced/quantization.html),扩展功能相关的配置参数详见[扩展配置](https://www.mindspore.cn/lite/docs/zh-CN/master/advanced/third_party/converter_register.html#扩展配置)。 > - `--optimize`该参数是用来设定在离线转换的过程中需要完成哪些特定的优化。如果该参数设置为none,那么在模型的离线转换阶段将不进行相关的图优化操作,相关的图优化操作将会在执行推理阶段完成。该参数的优点在于转换出来的模型由于没有经过特定的优化,可以直接部署到CPU/GPU/Ascend任意硬件后端;而带来的缺点是推理执行时模型的初始化时间增长。如果设置成general,表示离线转换过程会完成通用优化,包括常量折叠,算子融合等(转换出的模型只支持CPU/GPU后端,不支持Ascend后端)。如果设置成gpu_oriented,表示转换过程中会完成通用优化和针对GPU后端的额外优化(转换出来的模型只支持GPU后端)。如果设置成ascend_oriented,表示转换过程中只完成针对Ascend后端的优化(转换出来的模型只支持Ascend后端)。 -> - 加解密功能仅在[编译](https://www.mindspore.cn/lite/docs/zh-CN/master/build/build.html)时设置为`MSLITE_ENABLE_MODEL_ENCRYPTION=on`时生效,并且仅支持Linux x86平台。其中密钥为十六进制表示的字符串,如密钥定义为`b'0123456789ABCDEF'`对应的十六进制表示为`30313233343536373839414243444546`,Linux平台用户可以使用`xxd`工具对字节表示的密钥进行十六进制表达转换。 +> - 加解密功能仅在[编译](https://www.mindspore.cn/lite/docs/zh-CN/master/build/build.html)时设置为`MSLITE_ENABLE_MODEL_ENCRYPTION=on`时生效,并且仅支持Linux x86平台。其中密钥为十六进制表示的字符串,Linux平台用户可以使用`xxd`工具对字节表示的密钥进行十六进制表达转换。 需要注意的是,加解密算法在1.7版本进行了更新,导致新版的converter工具不支持对1.6及其之前版本的MindSpore加密导出的模型进行转换。 > - `--input_shape`参数以及dynamicDims参数在转换时会被存入模型中,在使用模型时可以调用model.get_model_info("input_shape")以及model.get_model_info("dynamic_dims")来获取。 diff --git a/docs/lite/docs/source_zh_cn/infer/runtime_cpp.md b/docs/lite/docs/source_zh_cn/infer/runtime_cpp.md index c1b3e62d7ef11899d3abbbf664c4b4c43043d5f0..b83a8db4a12835f47e31159469376e7cc7c1cbea 100644 --- a/docs/lite/docs/source_zh_cn/infer/runtime_cpp.md +++ b/docs/lite/docs/source_zh_cn/infer/runtime_cpp.md @@ -678,7 +678,7 @@ if (build_ret != mindspore::kSuccess) { ### 模型解密推理 -当模型被[converter_lite工具](https://mindspore.cn/mindarmour/docs/zh-CN/master/model_encrypt_protection.html#%E7%AB%AF%E4%BE%A7%E6%A8%A1%E5%9E%8B%E4%BF%9D%E6%8A%A4)转换时加密,在lite加载模型时需通过传入密钥和解密工具相关参数。其中,dec_key应与使用converter_lite工具加密时的密钥一致,均十六进制表示的字符串。如b'0123456789ABCDEF'对应的十六进制表示为30313233343536373839414243444546,Linux平台用户可以使用xxd工具对字节表示的密钥进行十六进制表达转换。crypto_lib_path为该环境中openssl的安装路径,如"/home/root/openssl"。 +当模型被[converter_lite工具](https://mindspore.cn/mindarmour/docs/zh-CN/master/model_encrypt_protection.html#%E7%AB%AF%E4%BE%A7%E6%A8%A1%E5%9E%8B%E4%BF%9D%E6%8A%A4)转换时加密,在lite加载模型时需通过传入密钥和解密工具相关参数。其中,dec_key应与使用converter_lite工具加密时的密钥一致,均十六进制表示的字符串。Linux平台用户可以使用xxd工具对字节表示的密钥进行十六进制表达转换。crypto_lib_path为该环境中openssl的安装路径,如"/home/root/openssl"。 下面[示例代码](https://gitee.com/mindspore/mindspore-lite/blob/master/mindspore-lite/examples/runtime_cpp/main.cc)演示模型解密加载及推理的流程: diff --git a/docs/lite/docs/source_zh_cn/mindir/benchmark_tool.md b/docs/lite/docs/source_zh_cn/mindir/benchmark_tool.md index 37f2216573cde375f3904be1e988258e8f8049cb..5b993712b140f594aa0cf3b71420c0dc3f1fad1f 100644 --- a/docs/lite/docs/source_zh_cn/mindir/benchmark_tool.md +++ b/docs/lite/docs/source_zh_cn/mindir/benchmark_tool.md @@ -66,7 +66,7 @@ | `--enableFp16=` | 可选 | 指定是否优先使用float16算子。 | Boolean | false | true、false | 暂不支持 | | `--timeProfiling=` | 可选 | 性能验证时生效,指定是否使用TimeProfiler打印每个算子的耗时。 | Boolean | false | true、false | 暂不支持 | | `--perfEvent=` | 可选 | CPU性能验证时生效,指定PerfProfiler打印的CPU性能参数的具体内容,指定为CYCLE时,会打印算子的CPU周期数和指令条数;指定为CACHE时,会打印算子的缓存读取次数和缓存未命中次数;指定为STALL时,会打印CPU前端等待周期数和后端等待周期数。 | String | CYCLE | CYCLE/CACHE/STALL | 暂不支持 | -| `--decryptKey=` | 可选 | 用于解密文件的密钥,以十六进制字符表示。仅支持 AES-GCM,密钥长度仅支持16Byte。 | String | null | 注意密钥为十六进制表示的字符串,如密钥定义为`b'0123456789ABCDEF'`对应的十六进制表示为`30313233343536373839414243444546`,Linux平台用户可以使用`xxd`工具对字节表示的密钥进行十六进制表达转换。 | 暂不支持 | +| `--decryptKey=` | 可选 | 用于解密文件的密钥,以十六进制字符表示。仅支持 AES-GCM,密钥长度仅支持16Byte。 | String | null | 注意密钥为十六进制表示的字符串,Linux平台用户可以使用`xxd`工具对字节表示的密钥进行十六进制表达转换。 | 暂不支持 | | `--cryptoLibPath=` | 可选 | OpenSSL加密库crypto的路径 | String | null | - | 暂不支持 | ### 使用示例 diff --git a/docs/lite/docs/source_zh_cn/mindir/converter_python.md b/docs/lite/docs/source_zh_cn/mindir/converter_python.md index 40f333f241be547502c5179f883bf3b64d544d56..975e4b5aabdf97b455833e86bd37ffd8c40ff89e 100644 --- a/docs/lite/docs/source_zh_cn/mindir/converter_python.md +++ b/docs/lite/docs/source_zh_cn/mindir/converter_python.md @@ -91,7 +91,7 @@ MindSpore Lite云侧推理的Python接口模型转换提供了多种属性设置 | save_type | ModelType | `--saveType=` | 设置导出模型文件的类型。| ModelType.MINDIR | MINDIR模型使用MindSpore Lite云侧推理安装包 | | weight_fp16 | bool | `--fp16=` | 设置在模型序列化时是否需要将float32数据格式的权重存储为float16数据格式。 | True、False | - | -> - 加解密功能仅在[编译](https://www.mindspore.cn/lite/docs/zh-CN/master/mindir/build.html) 时设置为 `MSLITE_ENABLE_MODEL_ENCRYPTION=on` 时生效,并且仅支持Linux x86平台。其中密钥为十六进制表示的字符串,如encrypt_key设置为"30313233343536373839414243444546",对应的十六进制表示为 `(b)0123456789ABCDEF` ,Linux平台用户可以使用 `xxd` 工具对字节表示的密钥进行十六进制表达转换。需要注意的是,加解密算法在1.7版本进行了更新,导致新版的Python接口不支持对1.6及其之前版本的MindSpore Lite加密导出的模型进行转换。 +> - 加解密功能仅在[编译](https://www.mindspore.cn/lite/docs/zh-CN/master/mindir/build.html) 时设置为 `MSLITE_ENABLE_MODEL_ENCRYPTION=on` 时生效,并且仅支持Linux x86平台。其中密钥为十六进制表示的字符串,Linux平台用户可以使用 `xxd` 工具对字节表示的密钥进行十六进制表达转换。需要注意的是,加解密算法在1.7版本进行了更新,导致新版的Python接口不支持对1.6及其之前版本的MindSpore Lite加密导出的模型进行转换。 > > - `input_shape` 在以下场景下,用户可能需要设置该属性: > diff --git a/docs/lite/docs/source_zh_cn/mindir/converter_tool.md b/docs/lite/docs/source_zh_cn/mindir/converter_tool.md index 7480c09a171e0478a0d19b0f77ed00c9ed6ea9ad..0f741599610691d9c1d5c883470cc365e3c0d31f 100644 --- a/docs/lite/docs/source_zh_cn/mindir/converter_tool.md +++ b/docs/lite/docs/source_zh_cn/mindir/converter_tool.md @@ -83,7 +83,7 @@ MindSpore Lite云侧推理模型转换工具提供了多种参数设置,用户 - Caffe模型一般分为两个文件:`*.prototxt`模型结构,对应`--modelFile`参数;`*.caffemodel`模型权值,对应`--weightFile`参数。 - `configFile`配置文件采用`key=value`的方式定义相关参数。 - `--optimize`该参数是用来设定在离线转换的过程中需要完成哪些特定的优化。如果该参数设置为none,那么在模型的离线转换阶段将不进行相关的图优化操作,相关的图优化操作将会在执行推理阶段完成。该参数的优点在于转换出来的模型由于没有经过特定的优化,可以直接部署到CPU/GPU/Ascend任意硬件后端;而带来的缺点是推理执行时模型的初始化时间增长。如果设置成general,表示离线转换过程会完成通用优化,包括常量折叠,算子融合等(转换出的模型只支持CPU/GPU后端,不支持Ascend后端)。如果设置成gpu_oriented,表示转换过程中会完成通用优化和针对GPU后端的额外优化(转换出来的模型只支持GPU后端)。如果设置成ascend_oriented,表示转换过程中只完成针对Ascend后端的优化(转换出来的模型只支持Ascend后端)。 -- 加解密功能仅在[编译](https://www.mindspore.cn/lite/docs/zh-CN/master/mindir/build.html)时设置为`MSLITE_ENABLE_MODEL_ENCRYPTION=on`时生效,并且仅支持Linux x86平台。其中密钥为十六进制表示的字符串,如密钥定义为`b'0123456789ABCDEF'`对应的十六进制表示为`30313233343536373839414243444546`,Linux平台用户可以使用`xxd`工具对字节表示的密钥进行十六进制表达转换。需要注意的是,加解密算法在1.7版本进行了更新,导致新版的Python接口不支持对1.6及其之前版本的MindSpore Lite加密导出的模型进行转换。 +- 加解密功能仅在[编译](https://www.mindspore.cn/lite/docs/zh-CN/master/mindir/build.html)时设置为`MSLITE_ENABLE_MODEL_ENCRYPTION=on`时生效,并且仅支持Linux x86平台。其中密钥为十六进制表示的字符串,Linux平台用户可以使用`xxd`工具对字节表示的密钥进行十六进制表达转换。需要注意的是,加解密算法在1.7版本进行了更新,导致新版的Python接口不支持对1.6及其之前版本的MindSpore Lite加密导出的模型进行转换。 - 针对MindSpore模型,由于已经是`mindir`模型,建议两种做法: 不需要经过离线转换,直接进行推理执行。 diff --git a/docs/lite/docs/source_zh_cn/tools/benchmark_tool.md b/docs/lite/docs/source_zh_cn/tools/benchmark_tool.md index 2390c1a5bb11710453c6d0f61a1f82ba828daa51..aebad2f1d6ad13ea6002d4e4d74c2d86d2209de6 100644 --- a/docs/lite/docs/source_zh_cn/tools/benchmark_tool.md +++ b/docs/lite/docs/source_zh_cn/tools/benchmark_tool.md @@ -67,7 +67,7 @@ | `--inputShapes=` | 可选 | 指定输入维度,维度应该按照NHWC格式输入。维度值之间用‘,'隔开,多个输入的维度之间用‘:’隔开 | String | Null | - | | `--perfProfiling=` | 可选 | CPU性能验证时生效,指定是否使用PerfProfiler打印每个算子的CPU性能,当timeProfiling为true时无效。目前仅支持aarch64 CPU。 | Boolean | false | true, false | | `--perfEvent=` | 可选 | CPU性能验证时生效,指定PerfProfiler打印的CPU性能参数的具体内容,指定为CYCLE时,会打印算子的CPU周期数和指令条数;指定为CACHE时,会打印算子的缓存读取次数和缓存未命中次数;指定为STALL时,会打印CPU前端等待周期数和后端等待周期数。 | String | CYCLE | CYCLE/CACHE/STALL | -| `--decryptKey=` | 可选 | 用于解密文件的密钥,以十六进制字符表示。仅支持 AES-GCM,密钥长度仅支持16Byte。 | String | null | 注意密钥为十六进制表示的字符串,如密钥定义为`b'0123456789ABCDEF'`对应的十六进制表示为`30313233343536373839414243444546`,Linux平台用户可以使用`xxd`工具对字节表示的密钥进行十六进制表达转换。 | +| `--decryptKey=` | 可选 | 用于解密文件的密钥,以十六进制字符表示。仅支持 AES-GCM,密钥长度仅支持16Byte。 | String | null | 注意密钥为十六进制表示的字符串,Linux平台用户可以使用`xxd`工具对字节表示的密钥进行十六进制表达转换。 | | `--cryptoLibPath=` | 可选 | OpenSSL加密库crypto的路径 | String | null | - | ### 使用示例