35 return filter_fn(const_cast<cudnnBackendDescriptor_t>(p->get_backend_descriptor()));
38 to.insert(to.end(), std::make_move_iterator(p), std::make_move_iterator(from.end()));
40 from.erase(p, from.end());
43 template <cudnnBackendNumericalNote_t NUMERIC_NOTE>
46 bool hasNumerics =
false;
47 auto status = CUDNN_STATUS_SUCCESS;
49 cudnnBackendDescriptor_t engine_ = engine->get_backend_descriptor();
50 int64_t engine_count = -1;
51 status = cudnnBackendGetAttribute(
52 engine_config, CUDNN_ATTR_ENGINECFG_ENGINE, CUDNN_TYPE_BACKEND_DESCRIPTOR, 1, &engine_count, &engine_);
53 if (status == CUDNN_STATUS_SUCCESS) {
54 cudnnBackendNumericalNote_t notes[CUDNN_NUMERICAL_NOTE_TYPE_COUNT];
55 int64_t elem_count = 0;
56 cudnnBackendGetAttribute(engine->get_backend_descriptor(),
57 CUDNN_ATTR_ENGINE_NUMERICAL_NOTE,
58 CUDNN_TYPE_NUMERICAL_NOTE,
59 CUDNN_NUMERICAL_NOTE_TYPE_COUNT,
63 notes, notes + elem_count, [](cudnnBackendNumericalNote_t note) {
return note == NUMERIC_NOTE; })) {
70 #if (CUDNN_VERSION >= 8200) 71 template <cudnnBackendBehaviorNote_t BEHAVIOR_NOTE>
73 hasBehaviorNote(cudnnBackendDescriptor_t engine_config) {
74 bool hasBehavior =
false;
75 auto status = CUDNN_STATUS_SUCCESS;
77 cudnnBackendDescriptor_t engine_ = engine->get_backend_descriptor();
78 int64_t engine_count = -1;
79 status = cudnnBackendGetAttribute(
80 engine_config, CUDNN_ATTR_ENGINECFG_ENGINE, CUDNN_TYPE_BACKEND_DESCRIPTOR, 1, &engine_count, &engine_);
81 if (status == CUDNN_STATUS_SUCCESS) {
82 cudnnBackendBehaviorNote_t notes[CUDNN_BEHAVIOR_NOTE_TYPE_COUNT];
83 int64_t elem_count = 0;
84 cudnnBackendGetAttribute(engine->get_backend_descriptor(),
85 CUDNN_ATTR_ENGINE_BEHAVIOR_NOTE,
86 CUDNN_TYPE_BEHAVIOR_NOTE,
87 CUDNN_BEHAVIOR_NOTE_TYPE_COUNT,
91 notes, notes + elem_count, [](cudnnBackendBehaviorNote_t note) {
return note == BEHAVIOR_NOTE; })) {
static auto filter(Predicate pred, executionPlans_t &plans) -> executionPlans_t
static ManagedOpaqueDescriptor make_shared_backend_pointer(cudnnBackendDescriptorType_t type)
bool hasNumericalNote(cudnnBackendDescriptor_t engine_config)
std::shared_ptr< OpaqueBackendPointer > ManagedOpaqueDescriptor
std::vector< ManagedOpaqueDescriptor > EngineConfigList