38 using Predicate = std::function<bool(cudnn_frontend::ExecutionPlan const &plan)>;
39 using GeneratorSource = std::function<cudnn_frontend::EngineConfigList(cudnn_frontend::OperationGraph &)>;
58 for (
int i = 0; i < sourceSize; i++) {
59 engine_config_generators.push_back(sources[i]);
68 for (
auto fn : engine_config_generators) {
70 std::copy(new_engine_config.begin(), new_engine_config.end(), std::back_inserter(engine_configs));
71 new_engine_config.clear();
73 return engine_configs;
82 template <CudnnFindSamplingTechnique samplingTechnique>
84 cudnnFindPlan(cudnnHandle_t handle,
96 for (
auto &
plan : plans) {
98 filtered_plans.emplace_back(std::move(
plan));
101 return filtered_plans;
Sample 3 times and take median.
Sample multiple times till stable.
EngineConfigGenerator(int const sourceSize, GeneratorSource const *sources)
std::function< bool(cudnn_frontend::ExecutionPlan const &plan)> Predicate
auto generate_engine_config(cudnn_frontend::OperationGraph &opGraph) -> cudnn_frontend::EngineConfigList
float time_ms
One can get the underlying EngineConfig from the ExecutionPlan.
cudnn_frontend::ExecutionPlan plan
CudnnFindSamplingTechnique
std::vector< GeneratorSource > engine_config_generators
std::vector< cudnn_frontend::ExecutionPlan > executionPlans_t
std::function< cudnn_frontend::EngineConfigList(cudnn_frontend::OperationGraph &)> GeneratorSource
std::vector< struct executionOption > executionOptions_t
Variety of renames.
auto filter(Predicate pred, executionPlans_t &plans) -> executionPlans_t
Sample once quick but may have unstable values.
std::vector< ManagedOpaqueDescriptor > EngineConfigList