• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright 2020 Huawei Technologies Co., Ltd
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef PARALLEL_AUTO_PARALLEL_REC_TENSOR_H_
18 #define PARALLEL_AUTO_PARALLEL_REC_TENSOR_H_
19 
20 #include "frontend/parallel/auto_parallel/rec_core/rec_strategy.h"
21 
22 namespace mindspore {
23 namespace parallel {
24 enum TensorType { kInt8, kFloat16, kFloat32, kDouble64 };
25 
26 struct Shape4D {
27   int64_t shape_n = 1;
28   int64_t shape_c = 1;
29   int64_t shape_h = 1;
30   int64_t shape_w = 1;
31 };
32 
33 struct TensorParam {
34   TensorType tensor_type = kFloat32;  // default as float.
35   Shape4D tensor_shape;
36   TensorStr4D tensor_str;
37 };
38 }  // namespace parallel
39 }  // namespace mindspore
40 
41 #endif  // PARALLEL_AUTO_PARALLEL_REC_TENSOR_H_
42