mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Ensure IDEEP transpose operator works correctly
Summary: I found out that without exporting to public format IDEEP transpose operator in the middle of convolution net produces incorrect results (probably reading some out-of-bound memory). Exporting to public format might not be the most efficient solution, but at least it ensures correct behavior. Test Plan: Running ConvFusion followed by transpose should give identical results on CPU and IDEEP Reviewed By: bwasti Differential Revision: D22970872 fbshipit-source-id: 1ddca16233e3d7d35a367c93e72d70632d28e1ef
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c660d2a9ae
commit
9c8f5cb61d
@ -18,7 +18,7 @@ class IDEEPTransposeOp final : public IDEEPOperator {
|
||||
const auto& X = Input(INPUT);
|
||||
auto* Y = Output(OUTPUT);
|
||||
|
||||
Y->transpose_from(X, axes_);
|
||||
Y->transpose_from(X.to_public(nullptr, X.get_data_type()), axes_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user