Skip to content

Commit

Permalink
Revert "Fixed incorrect transpose in find 2.0 (#3285)"
Browse files Browse the repository at this point in the history
This reverts commit 2d69aeb.
  • Loading branch information
DrizztDoUrden authored and BrianHarrisonAMD committed Nov 15, 2024
1 parent 4bd61bb commit cd1a3f1
Showing 1 changed file with 11 additions and 11 deletions.
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

0 comments on commit cd1a3f1

Please sign in to comment.