mirror of https://github.com/llvm/torch-mlir
Add central registration for type ranges.
parent
f8cedd8656
commit
bfd5fedba7
|
@ -10,6 +10,7 @@
|
|||
#define NPCOMP_DIALECT_BASICPY_BASICPY_DIALECT_H
|
||||
|
||||
#include "mlir/IR/Dialect.h"
|
||||
#include "npcomp/Dialect/Common.h"
|
||||
|
||||
namespace mlir {
|
||||
namespace NPCOMP {
|
||||
|
@ -17,7 +18,7 @@ namespace Basicpy {
|
|||
|
||||
namespace BasicpyTypes {
|
||||
enum Kind {
|
||||
PlaceholderType = Type::FIRST_PRIVATE_EXPERIMENTAL_8_TYPE,
|
||||
PlaceholderType = TypeRanges::Basicpy,
|
||||
LAST_BASICPY_TYPE = PlaceholderType
|
||||
};
|
||||
} // namespace BasicpyTypes
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
//===- Common.h - Common definitions for all dialects -----------*- C++ -*-===//
|
||||
//
|
||||
// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef NPCOMP_DIALECT_COMMON_H
|
||||
#define NPCOMP_DIALECT_COMMON_H
|
||||
|
||||
#include "mlir/IR/Types.h"
|
||||
|
||||
namespace mlir {
|
||||
namespace NPCOMP {
|
||||
|
||||
namespace TypeRanges {
|
||||
enum {
|
||||
Basicpy = Type::FIRST_PRIVATE_EXPERIMENTAL_3_TYPE,
|
||||
Numpy = Basicpy + 50,
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace NPCOMP
|
||||
} // namespace mlir
|
||||
|
||||
#endif // NPCOMP_DIALECT_COMMON_H
|
|
@ -10,16 +10,14 @@
|
|||
#define NPCOMP_DIALECT_NUMPY_NUMPY_DIALECT_H
|
||||
|
||||
#include "mlir/IR/Dialect.h"
|
||||
#include "npcomp/Dialect/Common.h"
|
||||
|
||||
namespace mlir {
|
||||
namespace NPCOMP {
|
||||
namespace Numpy {
|
||||
|
||||
namespace NumpyTypes {
|
||||
enum Kind {
|
||||
AnyDtypeType = Type::FIRST_PRIVATE_EXPERIMENTAL_9_TYPE,
|
||||
LAST_NUMPY_TYPE = AnyDtypeType
|
||||
};
|
||||
enum Kind { AnyDtypeType = TypeRanges::Numpy, LAST_NUMPY_TYPE = AnyDtypeType };
|
||||
} // namespace NumpyTypes
|
||||
|
||||
// The singleton type representing an unknown dtype.
|
||||
|
|
Loading…
Reference in New Issue