Home / Class/ chooseSolution Class — pytorch Architecture

chooseSolution Class — pytorch Architecture

Architecture documentation for the chooseSolution class in Conv_miopen.cpp from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/miopen/Conv_miopen.cpp lines 622–638

template<typename algo_t>
Workspace chooseSolution(const ConvolutionArgs& args, uint64_t* solution_id)
{
  using search = algorithm_search<algo_t>;
  miopenConvSolution_t solution = search::getSolution(args, false);
  try {
    *solution_id = solution.solution_id;
    return Workspace(solution.workspace_size);
  } catch (const std::exception&) {
    std::ignore = hipGetLastError(); // clear OOM error

    // switch to default algorithm
    solution = search::getSolution(args, true);
    *solution_id = solution.solution_id;
    return Workspace(solution.workspace_size);
  }
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free