// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include #include #include namespace onnxruntime { namespace training { enum class OptimizerOutputKey : int { GradientAccumulation, GradientAllIsFinite, GlobalGradientNorm, DeltaAllIsFinite, }; struct OptimizerOutputKeyHash { size_t operator()(OptimizerOutputKey key) const { using underlying_type = std::underlying_type::type; return std::hash{}(static_cast(key)); } }; template using OptimizerOutputKeyMap = std::unordered_map; } // namespace training } // namespace onnxruntime