File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,7 @@ framework相关
291291 " :ref: `paddle.CUDAPlace <cn_api_fluid_CUDAPlace >` ", "一个设备描述符,表示一个分配或将要分配 Tensor 或 LoDTensor 的 GPU 设备"
292292 " :ref: `paddle.DataParallel <cn_api_fluid_dygraph_DataParallel >` ", "通过数据并行模式执行动态图模型"
293293 " :ref: `paddle.NPUPlace <cn_api_fluid_NPUPlace >` ", "一个设备描述符,指NCPUPlace则Tensor将被自动分配在该设备上,并且模型将会运行在该设备上"
294+ " :ref: `paddle.disable_signal_handler <cn_api_fluid_disable_signal_handler >` ", "关闭Paddle系统信号处理方法"
294295 " :ref: `paddle.disable_static <cn_api_paddle_disable_static >` ", "关闭静态图模式"
295296 " :ref: `paddle.enable_static <cn_api_paddle_enable_static >` ", "开启静态图模式"
296297 " :ref: `paddle.get_default_dtype <cn_api_paddle_framework_get_default_dtype >` ", "得到当前全局的dtype"
Original file line number Diff line number Diff line change 1+ .. _cn_api_fluid_disable_signal_handler :
2+
3+ disable_signal_handler
4+ -------------------------------
5+
6+ .. py :function :: paddle.disable_signal_handler()
7+
8+ 关闭Paddle系统信号处理方法
9+
10+ Paddle默认在C++层面注册了系统信号处理方法,用于优化报错信息。
11+ 但是一些特定的Python module可能需要使用某些系统信号,引发冲突。
12+ 您可以通过调用本函数来关闭Paddle的系统信号处理方法
13+
14+ 如果您在一个Python文件中同时使用了Paddle和下述框架的一种或多种,
15+ 则请在其他框架执行前首先调用paddle.disable_signal_handler()
16+
17+ 1.TVM框架
18+ 2.ADLIK框架
19+
20+ 返回
21+ :::::::::
22+ 无
23+
24+ 代码示例
25+ :::::::::
26+
27+ .. code-block :: python
28+
29+ import paddle
30+ paddle.disable_signal_handler()
You can’t perform that action at this time.
0 commit comments