Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So, this adds another class of tuning problems, one I think will be helpful for users. I did something similar in Kokkos Kernels a while back, but I think it makes sense in Kokkos. Basically, Tuning currently supports sets and ranges of
int64_t
,double
, andchar*
(string). But what if I want to pick among a set ofComplicatedCPPClass
? This adds an implementation for exactly that case. You pass in a vector ofComplicatedCPPClass
, and onbegin
the tuner hands you an instance of such a class (well, a cref to one), and begins a tuning context. On end, the, tuning context is ended. If no tool is loaded, the zeroth element of the vector is treated as the defaultBasically everybody is going to have to write this code at some point, I've already written it in a couple of test harnesses, I think we should just provide it.
Note that I added a test, but there's minimal real testing happening without a tool, we just verify that we don't crash an application in the absence of a tool. Which is necessary, but probably not sufficient :)