评价此页

torch.fx.experimental.proxy_tensor.maybe_disable_thunkify#

torch.fx.experimental.proxy_tensor.maybe_disable_thunkify()[源码]#

在上下文中,禁用 thunkification。更多详情请参见 maybe_enable_thunkify()。如果您有一个包装函数,您希望在其上启用 thunkification,但在内部的某些部分(例如,原始用户函数)您希望禁用 thunkification,因为那里不需要它,这将非常有用。

返回类型

Generator[None, None, None]