mindspore.device_context.ascend.op_debug.aclinit_config

View Source On Gitee
mindspore.device_context.ascend.op_debug.aclinit_config(config)[source]

Configure the configuration items for the aclInit interface. please refer to Ascend Community document about aclInit..

Parameters

config (dict) –

When initializing AscendCL, you can enable or configure the following features through this configuration interface.

  • "max_opqueue_num": When executing using the single-operator model method, to save memory and balance the performance of calls, you can configure the maximum length of the single-operator model mapping queue through the max_opqueue_num parameter. If the length reaches the maximum, the system will first delete the mapping information that has not been used for a long time and the cached single-operator model, and then load the latest mapping information and the corresponding single-operator model. If the maximum length of the mapping queue is not configured, the default maximum length is 20,000.

  • "err_msg_mode": This parameter is used to control the level at which error information is retrieved, either by process or by thread. The default level is by process. "0" indicating that error information is retrieved by thread. "1" is the default value, indicates that error information is retrieved by process.

  • "dump": This parameter is used to enable exception dump for Ascend operators. The value can be set to {"dump_scene": "lite_exception"}, {"dump_scene": "lite_exception:disable"}. {"dump_scene": "lite_exception"} indicates that the exception dump is enabled. {"dump_scene": "lite_exception:disable"} indicates that the exception dump is disabled. {"dump_scene": "lite_exception"} is the default value, indicates that the exception dump is enabled.

Examples

>>> import mindspore as ms
>>> ms.set_device("Ascend", 0)
>>> ms.device_context.ascend.op_debug.aclinit_config({"max_opqueue_num": "20000", "err_msg_mode": "1",
...                                                   "dump": {"dump_scene": "lite_exception"}})