// Copyright © Advanced Micro Devices, Inc., or its affiliates. // SPDX-License-Identifier: MIT #pragma once #include #include #include #include #include "HipdnnMiopenContext.hpp" #include "HipdnnMiopenHandle.hpp" #include "HipdnnMiopenSettings.hpp" namespace miopen_plugin { class MiopenBatchnormPlanBuilder : public hipdnn_plugin_sdk::IPlanBuilder { public: MiopenBatchnormPlanBuilder() = default; ~MiopenBatchnormPlanBuilder() override = default; // Disallow copy and assignment MiopenBatchnormPlanBuilder(const MiopenBatchnormPlanBuilder&) = delete; MiopenBatchnormPlanBuilder& operator=(const MiopenBatchnormPlanBuilder&) = delete; bool isApplicable( const HipdnnMiopenHandle& handle, const hipdnn_flatbuffers_sdk::flatbuffer_utilities::IGraph& opGraph) const override; size_t getMaxWorkspaceSize(const HipdnnMiopenHandle& handle, const hipdnn_flatbuffers_sdk::flatbuffer_utilities::IGraph& opGraph, const HipdnnMiopenSettings& executionSettings) const override; void initializeExecutionSettings( const HipdnnMiopenHandle& handle, const hipdnn_flatbuffers_sdk::flatbuffer_utilities::IGraph& opGraph, const hipdnn_flatbuffers_sdk::flatbuffer_utilities::IEngineConfig& engineConfig, HipdnnMiopenSettings& executionSettings) const override; void buildPlan( const HipdnnMiopenHandle& handle, const hipdnn_flatbuffers_sdk::flatbuffer_utilities::IGraph& opGraph, [[maybe_unused]] const hipdnn_flatbuffers_sdk::flatbuffer_utilities::IEngineConfig& engineConfig, HipdnnMiopenContext& executionContext) const override; std::vector getCustomKnobs( const HipdnnMiopenHandle& handle, const hipdnn_flatbuffers_sdk::flatbuffer_utilities::IGraph& opGraph) const override; }; }