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

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

@SigureMo

Description

@SigureMo

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

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

@fallback_to_dygraph
def b():
    ...

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

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions