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

Revert "Fixed incorrect transpose in find 2.0" #3388

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/problem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,7 @@ Problem::FindSolutions(Handle& handle, const FindOptions& options, std::size_t m
auto ret = std::visit(
boost::hof::match(
[&](const ConvolutionDescriptor& op_desc) {
if(op_desc.mode == miopenTranspose)
return MakeTransposed().FindSolutionsImpl(
handle, options, max_solutions, buffers, op_desc);
else
return FindSolutionsImpl(handle, options, max_solutions, buffers, op_desc);
return FindSolutionsImpl(handle, options, max_solutions, buffers, op_desc);
},
[&](const SoftmaxDescriptor& op_desc) {
return FindSolutionsImpl(handle, options, max_solutions, buffers, op_desc);
Expand Down Expand Up @@ -481,17 +477,21 @@ std::vector<Solution> Problem::FindSolutionsImpl(Handle& handle,
const auto& w = buffers.at(miopenTensorConvolutionW);
auto y = buffers.at(miopenTensorConvolutionY);

if(conv_desc.mode == miopenTranspose)
std::swap(x, y);

const auto conv_problem = AsConvolution();

ValidateGroupCount(x_desc, w_desc, conv_desc);
const auto conv_problem =
conv_desc.mode == miopenTranspose ? MakeTransposed().AsConvolution() : AsConvolution();

std::size_t workspace_size;
Allocator::ManageDataPtr owned_workspace;
Data_t workspace;

if(conv_desc.mode == miopenTranspose)
{
std::swap(x, y);
std::swap(x_desc, y_desc);
}

ValidateGroupCount(x_desc, w_desc, conv_desc);

if(options.preallocated_workspace)
{
workspace = options.preallocated_workspace->buffer;
Expand Down