Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix autocast to support global tensor #10605

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

fpzh2011
Copy link
Contributor

oneflow autocast 不支持 global tensor。下面代码直接报错

import oneflow as flow

placement = flow.placement("cuda", ranks=[0])
sbp = flow.sbp.broadcast
a = flow.randn(2, 3).to_global(placement=placement, sbp=sbp)
b = flow.randn(3, 4).to_global(placement=placement, sbp=sbp)
with flow.autocast(device_type="cuda"):
    c = flow.matmul(a, b)

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

Successfully merging this pull request may close these issues.

2 participants