You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defin_dynamic_or_pir_mode() ->bool:
""" This API checks whether paddle runs in dynamic graph or pir mode. Returns: bool: Whether paddle runs in static graph mode and use pir api. Examples: .. code-block:: python >>> import paddle >>> print(paddle.framework.in_dynamic_or_pir_mode()) True >>> paddle.enable_static() >>> print(paddle.framework.in_dynamic_or_pir_mode()) False >>> with paddle.pir_utils.IrGuard(): ... print(paddle.framework.in_dynamic_or_pir_mode()) True """returnglobal_var._dygraph_tracer_isnotNoneorglobal_var._use_pir_api_
请提出你的问题 Please ask your question
根据
in_dynamic_or_pir_mode
函数内的示例,使用paddle.enable_static()
之后结果应该为False,但是在develop分支实际为True。in_dynamic_or_pir_mode
函数:测试代码:
实际结果:
The text was updated successfully, but these errors were encountered: