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 logical slice assign dtype #5339

Merged
merged 40 commits into from
Jun 29, 2021
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
eb694ab
refine and add test case
Flowingsun007 Jun 10, 2021
813f379
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 10, 2021
0aae06b
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 10, 2021
4a38ccd
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 10, 2021
b58b849
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 11, 2021
b5e151a
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 11, 2021
0ff1651
support ellipsis type slice
Flowingsun007 Jun 11, 2021
1276e65
refine
Flowingsun007 Jun 11, 2021
b9066f9
refine
Flowingsun007 Jun 11, 2021
8f81967
support slice assign ellipsis type
Flowingsun007 Jun 11, 2021
8f8cee2
refine
Flowingsun007 Jun 11, 2021
a79dcdf
Merge branch 'master' into dev_fix_slice_bug
Flowingsun007 Jun 12, 2021
81a400e
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 12, 2021
e9e2fa4
Merge branch 'master' into dev_fix_slice_bug
Flowingsun007 Jun 13, 2021
dbdcf18
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 13, 2021
b11243f
Merge branch 'master' into dev_fix_slice_bug
Flowingsun007 Jun 13, 2021
9c7185b
Merge branch 'master' into dev_fix_slice_bug
oneflow-ci-bot Jun 13, 2021
c8c78fb
register fn to localtensor
Flowingsun007 Jun 13, 2021
f565929
Merge branch 'dev_fix_slice_bug' of https://github.com/Oneflow-Inc/on…
Flowingsun007 Jun 13, 2021
ebc25f0
Merge branch 'dev_fix_slice_bug'
Flowingsun007 Jun 13, 2021
475bbff
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 13, 2021
b69f554
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 15, 2021
e8cd9e3
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 16, 2021
a500a6d
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 17, 2021
5387b8f
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 17, 2021
756b0ed
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 17, 2021
34e9fd5
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 17, 2021
a5d67ac
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 21, 2021
e547b4b
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 21, 2021
756e537
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 24, 2021
a39271b
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 25, 2021
d5ecb51
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 27, 2021
db1b536
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 28, 2021
75cc02b
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 28, 2021
634b968
Merge branch 'master' of https://github.com/Oneflow-Inc/oneflow
Flowingsun007 Jun 29, 2021
c4ba305
make sure input's dtype == update's dtype
Flowingsun007 Jun 29, 2021
c1223ab
Merge branch 'master' into fix_logical_slice_assign_dtype
oneflow-ci-bot Jun 29, 2021
0736a58
Merge branch 'master' into fix_logical_slice_assign_dtype
oneflow-ci-bot Jun 29, 2021
0f5bc20
Merge branch 'master' into fix_logical_slice_assign_dtype
oneflow-ci-bot Jun 29, 2021
1feb226
Merge branch 'master' into fix_logical_slice_assign_dtype
oneflow-ci-bot Jun 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions oneflow/python/nn/modules/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def __init__(
self.step = step

def forward(self, x, update):
if update.dtype != x.dtype:
update = update.to(dtype=x.dtype)
return flow.F.logical_slice_assign(
x, update, start=self.start, stop=self.stop, step=self.step
)
Expand Down