Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

扩展 Fallback 场景,允许用户标记某一个函数来强制跑动态图 #94

Open
SigureMo opened this issue May 25, 2023 · 0 comments

Comments

@SigureMo
Copy link
Member

SigureMo commented May 25, 2023

刚刚 @Aurelius84 提到的,暂时记一下~

增加一个装饰器,以使某一个特定函数跑动态图

@fallback_to_dygraph
def b():
    ...

def foo()
    a()   # <---- 跑正常 Symbolic Trace 逻辑
    b()   # <---- 强制跑动态图
    c()   # <---- 跑正常 Symbolic Trace 逻辑

看样子这个函数好像和 print 没什么区别?应该可以复用 print 对应的 Fallback 逻辑?

本需求和 #87 是否相似,接口上能否统一什么的? 好像不太一样

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant