-
Notifications
You must be signed in to change notification settings - Fork 237
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
Solver/Solution framework #866
Comments
2. Problem Description and Context2.1. Problem Description for an operation, e.g.
|
3. What is SolverSolver is an object which encapsulates the implementation of specific primitive.
Member functions (see here for current prototypes):
If a Solver needs workspace:
Each Solver instance If a Solver is Dynamic:
If a Solver is NOT searchable (NOT tunable):
If a Solver is searchable (tunable), then also the accompanying PerformanceConfig type shall be defined plus some member functions:
Generic search.Modern Solvers employ Generic search.
The
Serialization/de-serialization of PerformanceConfig instancesAll PerformanceConfig types shall implement the following member functions:
|
4. What is SolutionInformation required to build and run a kernel (or a set of kernels), which is expected to perform computatons as per the
struct ConvSolution
{
std::vector<KernelInfo> construction_params; // impl may consist of multiple kernels.
miopenStatus_t status;
std::string solver_id;
...
} As you see, it contains a vector of KernelInfo objects.
struct KernelInfo
{
std::string comp_options;
std::vector<size_t> l_wk;
std::vector<size_t> g_wk;
std::string kernel_file;
std::string kernel_name;
friend std::ostream& operator<<(std::ostream& os, const KernelInfo& k);
}; |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5. Perf-db support
|
6. Future directions
|
7. Support for convolutions with non-packed tensorsCurrently we are not going to include strides of non-packed tensors to the database keys. Only an optional flag (saying that at least one tensor is non-packed) should be included there. The above means that databases will share the same find-db records, same Invoker instances and same perf-db information for the non-packed convolutions that differ only in strides. The above design should work correctly provided that:
Originated from #2334 (comment) |
This is a copy of a presentation for MIOpen team I held a couple of years ago, when we've introduced and implemented the Solver/Solution architecture. It does not cover the recent additions like GetWti() and Invokers. I would like to make it available for all MIOpen developers, including collaborators.
Though a bit outdated, this should provide a good overview of how device code is abstracted away from the rest of the library.
1. Intent
Problem: Variety of convolution kernels
Experience shows that straightforward attempts to support such a set of kernels result in host code which is large, fragile, difficult to develop and maintain. You may see leftovers of this in convolutionocl.cpp.
Provide abstractions which able to represent in the single place all the information required to
Such abstractions allow working with all convolutions in unified manner. Currently, there are:
The text was updated successfully, but these errors were encountered: