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

Add ImageDecoderRandomCropResizeOp::InferParallelSignature #3646

Conversation

liujuncheng
Copy link
Collaborator

No description provided.

Comment on lines 113 to 117
int64_t device_parallel_desc_symbol_id = JUST(scope.GetParallelDescSymbolId(op_conf()));
OperatorConf host_op_conf = op_conf();
host_op_conf.set_device_tag("cpu");
int64_t host_parallel_desc_symbol_id = JUST(scope.GetParallelDescSymbolId(host_op_conf));
mut_parallel_signature()->set_op_parallel_desc_symbol_id(device_parallel_desc_symbol_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

给scope类加一个scope_proto(),因为scope_proto上直接有host_parallel_desc_symbol_id和device_parallel_desc_symbol_id。
你都不需要在本函数最外层的那个if

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

给scope类加一个scope_proto(),因为scope_proto上直接有host_parallel_desc_symbol_id和device_parallel_desc_symbol_id。
你都不需要在本函数最外层的那个if

最外层的if应该还是要有,当这个op是一个cpu op时,和普通op一致,当是gpu时才特殊

@lixinqi lixinqi merged commit 7b7d3ae into dev_image_decoder_random_crop_resize Oct 4, 2020
@lixinqi lixinqi deleted the dev_image_decoder_random_crop_resize_ps branch October 4, 2020 12:32
liujuncheng added a commit that referenced this pull request Oct 5, 2020
* Fused ImageDecoderRandomCropResize

* format

* fix cpu build

* Add comment

* dest=>dst

* Add comment

* Add ImageDecoderRandomCropResizeOp::InferParallelSignature (#3646)

* Add ImageDecoderRandomCropResizeOp::InferParallelSignature

* Add Scope::scope_proto

* refine
liujuncheng added a commit that referenced this pull request Jun 3, 2021
* Fused ImageDecoderRandomCropResize

* format

* fix cpu build

* Add comment

* dest=>dst

* Add comment

* Add ImageDecoderRandomCropResizeOp::InferParallelSignature (#3646)

* Add ImageDecoderRandomCropResizeOp::InferParallelSignature

* Add Scope::scope_proto

* refine

Former-commit-id: ecb6455
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