1 /** 2 * Copyright 2020 Huawei Technologies Co., Ltd 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef DATASET_ENGINE_OPT_PRE_INPUT_VALIDATION_PASS_H_ 18 #define DATASET_ENGINE_OPT_PRE_INPUT_VALIDATION_PASS_H_ 19 20 #include <memory> 21 #include <vector> 22 #include "minddata/dataset/engine/opt/pass.h" 23 24 namespace mindspore { 25 namespace dataset { 26 27 /// \class InputValidationPass 28 /// \brief This is a parse pass that validates input parameters of the IR tree. 29 class InputValidationPass : public IRNodePass { 30 /// \brief Runs a validation pass to check input parameters 31 /// \param[in] node The node being visited 32 /// \param[in, out] *modified indicates whether the node has been visited 33 /// \return Status code 34 Status Visit(std::shared_ptr<DatasetNode> node, bool *const modified) override; 35 }; 36 } // namespace dataset 37 } // namespace mindspore 38 39 #endif // DATASET_ENGINE_OPT_PRE_INPUT_VALIDATION_PASS_H_ 40