-
Notifications
You must be signed in to change notification settings - Fork 825
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
Remove almost all usage of Blob
in EagerBlobObject
#7895
Conversation
Signed-off-by: daquexian <daquexian566@gmail.com>
Signed-off-by: daquexian <daquexian566@gmail.com>
Signed-off-by: daquexian <daquexian566@gmail.com>
Signed-off-by: daquexian <daquexian566@gmail.com>
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
swin性能测试环境
数据master分支@e62d826
本分支@18215dc
结论基于swin测试发现:
|
Signed-off-by: daquexian <daquexian566@gmail.com>
@@ -29,8 +29,8 @@ class BlobTensorView final : public Tensor { | |||
explicit BlobTensorView(Blob* blob); | |||
~BlobTensorView() = default; | |||
|
|||
const ShapeView& shape() const override; | |||
MutShapeView* mut_shape() override; | |||
ShapeView shape() const override; |
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.
这块为啥去掉const
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.
这个是返回一个值,所以不用加 const,以及 ShapeView 本身就没有写数据的操作(和 MutShapeView 对应)
void InitNonPODTypeEagerBlobObjectIfNeed(MemoryAllocator* allocator, | ||
vm::EagerBlobObject* eager_blob_object_ptr) { | ||
if (eager_blob_object_ptr->data_type() == kOFRecord) { | ||
int64_t elem_cnt = eager_blob_object_ptr->shape().elem_cnt(); |
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.
int64_t elem_cnt = eager_blob_object_ptr->shape().elem_cnt();
可以提取到
L124之前
CI failed when running job: cuda-benchmark. PR label automerge has been removed |
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
1 similar comment
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
Signed-off-by: daquexian <daquexian566@gmail.com>
11cb68c
to
d365d43
Compare
Signed-off-by: daquexian <daquexian566@gmail.com>
Speed stats:
|
CI failed when running job: Build cpu. PR label automerge has been removed |
CI failed when running job: cpu-misc. PR label automerge has been removed |
Speed stats:
|
Signed-off-by: daquexian <daquexian566@gmail.com>
Signed-off-by: daquexian <daquexian566@gmail.com>
View latest API docs preview at: https://staging.oneflow.info/docs/Oneflow-Inc/oneflow/pr/7895/ |
后来有没有查到一开始性能受损的原因? |
没有,可能是 speed test 退役、新版 benchmark 上线之后,就能通过了 |
改动: