MIOpen
MIOpen copied to clipboard
Use CandidateSelectionModel heuristic for conv_hip_implicit_gemm_3d_grouped_*_xdlops solvers
Proposed changes
With this PR MIOpen should be able to use heuristics for the three conv_hip_implicit_gemm_3d_grouped_*_xdlops.
I have made bunch of changes to how the metadata is structured, we are able to robustly map kernel config strings that MIOpen generates from CK to vectors that can be used as input to the fdeep model.
I have added gtest functions for all the new stuff.
I continued with the structure set up before:
ai_heuristics.cppcontains all the code already there beforehand, plust the fdeep code, since fdeep can only be imported in a single fileai_candidate_selectioncontains the actual "model" and "metadata" classes that do the computation using floating point vectors. This his been somewhat updated to make the translation from "input" (=fdbkey) and "output" (=kernel configs) more robustai_conv_3d_kernel_tuning_utilscontains the machinery one level higher. That is, how to convert kernel configs and fdb_key input to float vectors and how to fetch and call the relevant CandidateSelectionModel. This is shared for all three solvers, so it made sense to centralise it.kernels/gfx942....model and metadatafiles. Perhaps these should gitlfs, but I suggest we worry about that when we make the final PR in the monoreposolver/conv/...cppsolver_specific files, they ultimately contain the solver-specific machinery. In this case our 3 solvers rely heavily onai_conv_3d_kernel_tuning_utilsand through that onai_candidate_selection- gtest files: should speak for themselves, please have a look
- solvers.hpp a huuuuge header file that contains declarations for all solvers (i.e. for the
solver/conv/...cppfiles), so this needed to be altered as well
Checklist
Please put an x into the boxes that apply. You can also fill these out after creating the PR. If you're not sure, please don't hesitate to ask.
- [x] I have added automated tests relevant to the introduced functionality
- [x] I have sufficient test coverage for the changes, and code coverage hasn't decreased as a result of my PR
- [x] I have ran the tests, and they are all passing locally
- [ ] I have added relevant documentation for the changes
- [ ] I have removed the stale documentation which is no longer relevant after this pull request
- [x] I have ran
make format&make check_formatto ensure the changes have been formatted