You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ncnn_dialect.cpp 572 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2020 Tencent
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. #include "ncnn_dialect.h"
  4. #include <mlir/IR/Builders.h>
  5. namespace mlir {
  6. namespace ncnn {
  7. NCNNDialect::NCNNDialect(mlir::MLIRContext* context)
  8. : mlir::Dialect("ncnn", context, TypeID::get<NCNNDialect>())
  9. {
  10. addOperations<
  11. #define GET_OP_LIST
  12. #include "ncnn_ops.cc.inc"
  13. >();
  14. // Support unknown operations because not all NCNN operations are
  15. // registered.
  16. allowUnknownOperations();
  17. }
  18. } // namespace ncnn
  19. #define GET_OP_CLASSES
  20. #include "ncnn_ops.cc.inc"
  21. } // namespace mlir