-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Refine MKLDNNMatrix and MKLDNNLayer #4008
Conversation
} | ||
real* iData = getInputValue(0, CPU_DEVICE)->getData(); | ||
inVal_->setData(iData); | ||
} |
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.
updateInputData这个函数,不同的mkldnn layer的处理方式会不一样么?
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.
处理方式是一样的,但是可能别的layer不是用inVal_了
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.
如果处理方式是一样的,那updateInputData的实现应该放在MKLDNNLayer中:
void MKLDNNLayer::updateInputData(MKLDNNMatrix* val) {
if (inputLayers_[0]->getType() != "data") {
return;
}
real* iData = getInputValue(0, CPU_DEVICE)->getData();
val->setData(iData);
}
这里,updateInputData(inVal_)
即可。
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.
嗯,是的。不过我准备下一个PR,把这个函数放到父类,所以下一个一起改掉吧
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.
LGTM
Some addition refer to #4011 |
First PR of #3974