Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-03 08:57:55

0001 // Copyright (c) ONNX Project Contributors
0002 
0003 /*
0004  * SPDX-License-Identifier: Apache-2.0
0005  */
0006 
0007 // Adapter indicating lack of a previous version of some op before a given
0008 // opset version.
0009 
0010 #pragma once
0011 
0012 #include <memory>
0013 #include <string>
0014 
0015 #include "onnx/version_converter/adapters/adapter.h"
0016 
0017 namespace ONNX_NAMESPACE {
0018 namespace version_conversion {
0019 
0020 class NoPreviousVersionAdapter final : public Adapter {
0021  public:
0022   explicit NoPreviousVersionAdapter(const std::string& op_name, const OpSetID& initial, const OpSetID& target)
0023       : Adapter(op_name, initial, target) {}
0024 
0025   Node* adapt(std::shared_ptr<Graph>, Node* node) const override {
0026     ONNX_ASSERTM(false, "No Previous Version of %s exists", name().c_str());
0027     return node;
0028   }
0029 };
0030 
0031 } // namespace version_conversion
0032 } // namespace ONNX_NAMESPACE