1 /** 2 * This is the C++ adaptation and derivative work of Myia (https://github.com/mila-iqia/myia/). 3 * 4 * Copyright 2019-2020 Huawei Technologies Co., Ltd 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 #ifndef MINDSPORE_CORE_IR_DTYPE_TYPE_ID_H_ 20 #define MINDSPORE_CORE_IR_DTYPE_TYPE_ID_H_ 21 22 namespace mindspore { 23 // 24 // Supported meta type 25 // 26 enum TypeId : int { 27 kTypeUnknown = 0, 28 kMetaTypeBegin = kTypeUnknown, 29 kMetaTypeType, // Type 30 kMetaTypeAnything, 31 kMetaTypeObject, 32 kMetaTypeTypeType, // TypeType 33 kMetaTypeProblem, 34 kMetaTypeExternal, 35 kMetaTypeNone, 36 kMetaTypeNull, 37 kMetaTypeEllipsis, 38 kMetaTypeEnd, 39 // 40 // Object types 41 // 42 kObjectTypeBegin = kMetaTypeEnd, 43 kObjectTypeNumber, 44 kObjectTypeString, 45 kObjectTypeList, 46 kObjectTypeTuple, 47 kObjectTypeSlice, 48 kObjectTypeKeyword, 49 kObjectTypeTensorType, 50 kObjectTypeRowTensorType, 51 kObjectTypeSparseTensorType, 52 kObjectTypeUndeterminedType, 53 kObjectTypeClass, 54 kObjectTypeDictionary, 55 kObjectTypeFunction, 56 kObjectTypeJTagged, 57 kObjectTypeSymbolicKeyType, 58 kObjectTypeEnvType, 59 kObjectTypeRefKey, 60 kObjectTypeRef, 61 kObjectTypeEnd, 62 // 63 // Number Types 64 // 65 kNumberTypeBegin = kObjectTypeEnd, 66 kNumberTypeBool, 67 kNumberTypeInt, 68 kNumberTypeInt8, 69 kNumberTypeInt16, 70 kNumberTypeInt32, 71 kNumberTypeInt64, 72 kNumberTypeUInt, 73 kNumberTypeUInt8, 74 kNumberTypeUInt16, 75 kNumberTypeUInt32, 76 kNumberTypeUInt64, 77 kNumberTypeFloat, 78 kNumberTypeFloat16, 79 kNumberTypeFloat32, 80 kNumberTypeFloat64, 81 kNumberTypeComplex64, 82 kNumberTypeComplex128, 83 kNumberTypeInt4, 84 kNumberTypeEnd, 85 // 86 // Monad Types 87 // 88 // Monad types is placed at the end of enum, 89 // in order to keep fit with the type of existing model on the lite side. 90 kMonadTypeBegin = kNumberTypeEnd, 91 kObjectTypeMonad, 92 kObjectTypeUMonad, 93 kObjectTypeIOMonad, 94 kMonadTypeEnd 95 }; 96 } // namespace mindspore 97 #endif // MINDSPORE_CORE_IR_DTYPE_TYPE_ID_H_ 98