// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include #include "core/providers/cuda/cuda_kernel.h" namespace onnxruntime { namespace cuda { class BatchScale final : public CudaKernel { public: BatchScale(const OpKernelInfo& info) : CudaKernel(info) { ORT_ENFORCE(info.GetAttr("scale_0", &scale0_).IsOK()); ORT_ENFORCE(info.GetAttr("scale_1", &scale1_).IsOK()); float scale2_tmp; if (info.GetAttr("scale_2", &scale2_tmp).IsOK()) { scale2_ = scale2_tmp; } } Status ComputeInternal(OpKernelContext* context) const override; private: float scale0_; float scale1_; std::optional scale2_; }; } // namespace cuda } // namespace onnxruntime