#include <stdex/Memory.h>
#include <utility>
-namespace nnc
+namespace mir_onnx
{
ONNXImporterImpl::ONNXImporterImpl(std::string filename) : _modelFilename(std::move(filename))
return createIR();
}
-} // namespace nnc
+} // namespace mir_onnx
* limitations under the License.
*/
-#ifndef NNCC_ONNX_IMPORTER_H
-#define NNCC_ONNX_IMPORTER_H
+#ifndef _MIR_ONNX_IMPORTER_H
+#define _MIR_ONNX_IMPORTER_H
#include "ONNXOpCreator.h"
#include "ONNXOpType.h"
#include <memory>
#include <string>
-namespace nnc
+namespace mir_onnx
{
class ONNXImporterImpl
std::unique_ptr<mir::Graph> _graph;
ONNXOpCreator _opCreator;
};
-} // namespace nnc
+} // namespace mir_onnx
-#endif // NNCC_ONNX_IMPORTER_H
+#endif // _MIR_ONNX_IMPORTER_H
#include <iostream>
#include <set>
-namespace nnc
+namespace mir_onnx
{
static mir::TensorVariant fixGroupedKernel(int groups, const mir::TensorVariant &folded_kernel)
// NHWC -> NCHW
return createOp<ops::TransposeOp>(arg, std::vector<std::size_t>{0, 3, 1, 2})->getOutput(0);
}
-} // namespace nnc
+} // namespace mir_onnx
* limitations under the License.
*/
-#ifndef NNCC_ONNX_OP_CREATOR_H
-#define NNCC_ONNX_OP_CREATOR_H
+#ifndef _MIR_ONNX_OP_CREATOR_H
+#define _MIR_ONNX_OP_CREATOR_H
#include "onnx/onnx.pb.h"
#include "ONNXOpType.h"
#include <vector>
#include <memory>
-namespace nnc
+namespace mir_onnx
{
class ONNXOpCreator
// TODO: set operation names
return _graph->create<OpType>("", std::forward<Types>(args)...);
}
-} // namespace nnc
-#endif // NNCC_ONNX_OP_CREATOR_H
+} // namespace mir_onnx
+#endif // _MIR_ONNX_OP_CREATOR_H
* limitations under the License.
*/
-#ifndef NNCC_ONNX_OP_TYPES_H
-#define NNCC_ONNX_OP_TYPES_H
+#ifndef _MIR_ONNX_OP_TYPES_H
+#define _MIR_ONNX_OP_TYPES_H
-namespace nnc
+namespace mir_onnx
{
enum class ONNXOpSupportState
{
ONNXOpSupportState state;
}; // ONNXOpType
-} // namespace nnc
-#endif // NNCC_ONNX_OP_TYPES_H
+} // namespace mir_onnx
+#endif // _MIR_ONNX_OP_TYPES_H
#include "ONNXOpType.h"
-using namespace nnc;
+using namespace mir_onnx;
%}
/* Command-line: gperf --output-file=ONNXPerfectHash.h ONNXPerfect.gperf */
/* Computed positions: -k'1-2,$' */
-namespace nnc
+namespace mir_onnx
{
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) && ('%' == 37) && ('&' == 38) && \
return nullptr;
} // ONNXPerfectHash::getONNXOpType (const char *str, size_t len)
-} // namespace nnc
+} // namespace mir_onnx
{
ONNXImporterPass::ONNXImporterPass(const std::string &filename)
- : _pimpl(new ONNXImporterImpl(filename))
+ : _pimpl(new mir_onnx::ONNXImporterImpl(filename))
{
}
#include <memory>
#include <string>
-namespace nnc
+namespace mir_onnx
{
+ class ONNXImporterImpl;
+}
-class ONNXImporterImpl;
+namespace nnc
+{
class ONNXImporterPass : public NNImporter
{
public:
~ONNXImporterPass() override;
private:
- std::unique_ptr<ONNXImporterImpl> _pimpl;
+ std::unique_ptr<mir_onnx::ONNXImporterImpl> _pimpl;
std::unique_ptr<mir::Graph> _graph;
};