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 interface InferContext::InputDType #5153

Merged
merged 16 commits into from
Jun 15, 2021

Conversation

terryzhao127
Copy link

Split InferContext::Dtype4ArgNameAndIndex into InferContext::InputDType and InferContext::OutputDType (the latter is already implemented in #5125).

@CLAassistant
Copy link

CLAassistant commented Jun 9, 2021

CLA assistant check
All committers have signed the CLA.

@@ -74,7 +74,7 @@ size_t InferTempStorageBytesSize(user_op::InferContext* ctx) {
const std::string& device_tag = ctx->device_tag();
DeviceType device_type = CHECK_JUST(DeviceType4DeviceTag(device_tag));
const Shape& input_shape = ctx->InputShape("input", 0);
DataType input_dtype = *ctx->Dtype4ArgNameAndIndex("input", 0);
DataType input_dtype = ctx->InputDType("input", 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

这里是不是可以是const DataType&

Copy link
Author

Choose a reason for hiding this comment

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

Modified in e31fd05

@oneflow-ci-bot oneflow-ci-bot removed their request for review June 15, 2021 08:07
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 15, 2021 08:07
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 15, 2021 10:39
@oneflow-ci-bot oneflow-ci-bot self-requested a review June 15, 2021 11:53
@oneflow-ci-bot oneflow-ci-bot removed their request for review June 15, 2021 13:06
@oneflow-ci-bot oneflow-ci-bot self-requested a review June 15, 2021 13:06
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 15, 2021 13:57
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 15, 2021 15:07
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 15, 2021 16:14
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 15, 2021 17:42
@oneflow-ci-bot oneflow-ci-bot self-requested a review June 15, 2021 18:48
@oneflow-ci-bot oneflow-ci-bot merged commit b6d67eb into master Jun 15, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the refactor_infer_ctx_input_dtype branch June 15, 2021 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants