// Copyright © Advanced Micro Devices, Inc., or its affiliates. // SPDX-License-Identifier: MIT #pragma once #include namespace hipdnn_tests::plugin_constants { template constexpr int64_t engineId() = delete; } // namespace hipdnn_tests::plugin_constants // NOLINTBEGIN(bugprone-macro-parentheses) ClassName is used as a type identifier #define HIPDNN_MAP_TO_ID(ClassName, id) \ class ClassName; \ namespace hipdnn_tests::plugin_constants \ { \ template <> \ constexpr int64_t engineId() \ { \ return (id); \ }; \ } // NOLINTEND(bugprone-macro-parentheses) HIPDNN_MAP_TO_ID(GoodPlugin, -2); HIPDNN_MAP_TO_ID(GoodDefaultPlugin, -3); HIPDNN_MAP_TO_ID(NoApplicableEnginesAPlugin, -4); HIPDNN_MAP_TO_ID(NoApplicableEnginesBPlugin, -5); HIPDNN_MAP_TO_ID(ExecuteFailsPlugin, -6); HIPDNN_MAP_TO_ID(DuplicateIdAPlugin, -7); HIPDNN_MAP_TO_ID(DuplicateIdBPlugin, -7); HIPDNN_MAP_TO_ID(KnobsPlugin, -8); HIPDNN_MAP_TO_ID(KnobsPluginEngineB, -9); HIPDNN_MAP_TO_ID(KnobConstraintValidationPlugin, -10); HIPDNN_MAP_TO_ID(IncompatibleVersionPlugin, -11); // Override-execute fake plugins. Each receives a distinct id. HIPDNN_MAP_TO_ID(OverrideImplementingPlugin, -12); HIPDNN_MAP_TO_ID(OverrideOmittingPlugin, -13); HIPDNN_MAP_TO_ID(VersionLiarPlugin, -14); HIPDNN_MAP_TO_ID(SecondOverridePlugin, -15); // Malformed-version plugin used for load-time API-version parse rejection. HIPDNN_MAP_TO_ID(MalformedVersionPlugin, -16); // Version-zero plugin reports a parseable but too-low API version. HIPDNN_MAP_TO_ID(VersionZeroPlugin, -17); // Runtime pass-by-value fake reports K_PASS_BY_VALUE_MIN_API_VERSION ("1.2.0"). HIPDNN_MAP_TO_ID(PassByValuePlugin, -24); // Runtime pass-by-value RECORDER fake reports "1.2.0" and records the scalar it // resolves from device_buffers at execute (delivery-verification plugin). HIPDNN_MAP_TO_ID(PassByValueRecorderPlugin, -25); // Autotune test plugins. HIPDNN_MAP_TO_ID(AutotunePlugin, -18); HIPDNN_MAP_TO_ID(AutotunePluginEngineB, -19); HIPDNN_MAP_TO_ID(AutotunePluginEngineC, -20); HIPDNN_MAP_TO_ID(AutotunePluginEngineFails, -21); HIPDNN_MAP_TO_ID(AutotunePluginEnginePrimingOnlyFails, -22); HIPDNN_MAP_TO_ID(AutotunePluginEngineWorkspaceGrows, -23);