-
Notifications
You must be signed in to change notification settings - Fork 699
[OpenCL] Convolution NHWC vs. NCHW mismatch #3815
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
Comments
…ed bugs. (pytorch#3503)" Due to: pytorch#3815 This reverts commit ec46f24.
This issue is still there with OpenCL and can be reproduced with Squeezenet. |
and the c++ ResNet demo is also affected. Following is what I do.
and get the result like this:
and it crushed after finish classifying images. So sad.
|
[Update] I just remove related codes for verifying layout, it works and get the same result as CPU backend's. I don't know if this will lead to other problems. This is what I removed in the file glow::optimizeFunction(Function *F, const Backend &B,CompilationContext &cctx) {
...
// if (!B.verify(*F)) {
// return MAKE_ERR(
// ErrorValue::ErrorCode::COMPILE_UNSUPPORTED_NODE_AFTER_OPTIMIZE,
// "Unsupported node(s) found after optimizing Function " +
// F->getName().str() + " for backend " + B.getBackendName());
// }
return Error::success();
} It seems have done all the lowering and optimization, and crushed during the very last verify of layouts. So I removed the last verify and it can still work. |
…osing the input to NCHW (pytorch#3951) Summary: See the in-source comment for workaround information, but: We have a model we load from the outside with no-way of knowing the constant/placeholder input layout, the default assumption for 4-D tensors (images) is NHWC format which is the canonical Glow format, PNG files are in NHWC format. Our image loader, when using the `image-layout` flag, transposes the image outside the Glow graph, since there's no easy way to propagate that information, weaken the OpenCL verifier, not the canonical verifier: for placeholders and constants, assume that the loader knows what it is doing and they are in the right format. Fixes pytorch#3815 Pull Request resolved: pytorch#3951 Test Plan: `ninja test` Differential Revision: D19252774 Pulled By: shajrawi fbshipit-source-id: f850c504245ee947794446b144b00df635a68497
After fixing Issue #3802, inception_v1 now fails due to a mismatching layouts error. Should there be automatic conversion operation insertion in such a case?
Any pointers? We can take a look if someone pokes us to the right direction.
The text was updated successfully, but these errors were encountered: