-
Notifications
You must be signed in to change notification settings - Fork 803
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
dev empty op #4720
dev empty op #4720
Conversation
oneflow/python/ops/empty_op.py
Outdated
@flow.global_function() | ||
def empty_Job() -> tp.Numpy: | ||
empty_blob = flow.empty(shape=(1, 3, 3), | ||
dtype=flow.float) | ||
return empty_blob |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些注释回头都得改为multi-client下的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这一加一个ToDo(yaochi):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 “multi-client
下的” 的意思,是不是指 interface 正在做的,按 Module 方式调用的新 API 呢?
如果是这样的话,我就暂时不写 TODO 了,因为未来(1.0发布之前),所有的注释会集中改一遍。
This comment has been minimized.
This comment has been minimized.
oneflow/python/ops/empty_op.py
Outdated
@flow.global_function() | ||
def empty_Job() -> tp.Numpy: | ||
empty_blob = flow.empty(shape=(1, 3, 3), | ||
dtype=flow.float) | ||
return empty_blob |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这一加一个ToDo(yaochi):
* startup * empty op finished * add sbp signature * refine test case for fp16 * try to fix sbp problem * refien sbpGetFn * add sbp config attr * refine * refine * add balancedSpliter and add parallel check on py * refine * add partialSum parallel support * unexported empty and rm its test case * rm python wrapper for empty op Co-authored-by: Li Xinqi <lixinqi2010@gmail.com> Co-authored-by: oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com> Former-commit-id: 591021f
概述
empty 算子,即根据用户设置的形状和类型,创建张量(分配内存空间),但是不写内存。
功能 CheckList
注意 : 功能复选框均为可选项,若未选择,说明理由即可。例如:该 Op 由 Python 接口拼接而成,因此无
SetBatchAxisInferFn
Op 注册;再比如:该 Op 无输入,因此无SetInputArgModifyFn
。模板中自带的复选框可留空,但是不能删除。可根据实际情况增加复选框选项。
Op
Kernel
CPU in:float32
CPU in:float64
CPU in:int32
CPU in:int64
CPU in:int8
GPU in:float32
GPU in:float64
GPU in:int32
GPU in:int64
GPU in:float16
GPU in:int8
Python Wrapper
测试
本地原本测试了:
不过 PR 转正前根据 comment 去掉了 test case
GPU 有效带宽
带 GPU 的 Op,请参考 https://github.com/Oneflow-Inc/OneTeam/issues/167 测试有效带宽,并附带测试报告。
以下是报告样例:
Kernel 里,没有内存的写入操作,未做。
PR Checklist
bug, enhancement, purge, feature, documentation
)op, system, eager, build, xla, python, ci, test, tooling, onnx
)