ONE - On-device Neural Engine
Loading...
Searching...
No Matches
eigen_tensor_reduced_instantiations_oss.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
3 * Copyright 2017 The TensorFlow Authors. All Rights Reserved.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18// This is essentially unsupported/CXX11/Eigen/Tensor.h
19// TODO(petewarden) - move this to a common location in Eigen itself.
20
21// clang-format off
22
23
24#ifndef __NNFW_CKER_EGIEN_EIGEN_TENSOR_REDUCED_INSTANTIATIONS_OSS_H__
25#define __NNFW_CKER_EGIEN_EIGEN_TENSOR_REDUCED_INSTANTIATIONS_OSS_H__
26
27
28#include "Eigen/Core"
29
30#if defined(EIGEN_USE_SYCL)
31#undef min
32#undef max
33#undef isnan
34#undef isinf
35#undef isfinite
36#include <CL/sycl.hpp>
37#include <iostream>
38#include <map>
39#include <memory>
40#include <utility>
41#endif
42#include <cmath>
43#include <cstddef>
44#include <cstring>
45
46
47
48
49
50#ifdef _WIN32
51typedef __int16 int16_t;
52typedef unsigned __int16 uint16_t;
53typedef __int32 int32_t;
54typedef unsigned __int32 uint32_t;
55typedef __int64 int64_t;
56typedef unsigned __int64 uint64_t;
57#include <windows.h>
58#else
59#include <stdint.h>
60#include <unistd.h>
61#endif
62
63#if __cplusplus > 199711 || EIGEN_COMP_MSVC >= 1900
64#include <random>
65#endif
66
67#ifdef _WIN32
68#include <windows.h>
69#elif defined(__APPLE__)
70#include <mach/mach_time.h>
71#else
72#include <time.h>
73#endif
74
75#ifdef EIGEN_USE_THREADS
76#include "unsupported/Eigen/CXX11/ThreadPool"
77#endif
78
79
80#include "Eigen/src/Core/util/DisableStupidWarnings.h"
81
82#include "unsupported/Eigen/SpecialFunctions"
83#include "unsupported/Eigen/CXX11/src/util/CXX11Meta.h"
84#include "unsupported/Eigen/CXX11/src/util/MaxSizeVector.h"
85
86
87#include "unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h"
88#include "unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h"
89#include "unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h"
90
91#include "unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h"
92#include "unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h"
93#include "unsupported/Eigen/CXX11/src/Tensor/TensorDeviceDefault.h"
94#include "unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h"
95#include "unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h"
96#include "unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h"
97#include "unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h"
98#include "unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h"
99#include "unsupported/Eigen/CXX11/src/Tensor/TensorInitializer.h"
100#include "unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h"
101#include "unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h"
102#include "unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h"
103#include "unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h"
104#include "unsupported/Eigen/CXX11/src/Tensor/TensorGlobalFunctions.h"
105#include "unsupported/Eigen/CXX11/src/Tensor/TensorBase.h"
106#include "unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h"
107#include "unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h"
108#include "unsupported/Eigen/CXX11/src/Tensor/TensorExpr.h"
109#include "unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h"
110#include "unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h"
111#include "unsupported/Eigen/CXX11/src/Tensor/TensorArgMax.h"
112#include "unsupported/Eigen/CXX11/src/Tensor/TensorConcatenation.h"
113#include "unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h"
114#include "unsupported/Eigen/CXX11/src/Tensor/TensorContractionBlocking.h"
115#include "unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h"
116
117#undef TENSOR_CONTRACTION_DISPATCH
118#define TENSOR_CONTRACTION_DISPATCH(METHOD, ALIGNMENT, ARGS) \
119 if (this->m_lhs_inner_dim_contiguous && \
120 this->m_rhs_inner_dim_contiguous && \
121 !this->m_rhs_inner_dim_reordered) { \
122 METHOD<true, true, false, ALIGNMENT> ARGS; \
123 } else { \
124 eigen_assert(false && "Unsupported contraction formats"); \
125 }
126
127
128#include "unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h"
129#include "unsupported/Eigen/CXX11/src/Tensor/TensorContractionGpu.h"
130#include "unsupported/Eigen/CXX11/src/Tensor/TensorConversion.h"
131#include "unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h"
132#include "unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h"
133#include "unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h"
134#include "unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h"
135#include "unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h"
136#include "unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h"
137#include "unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h"
138#include "unsupported/Eigen/CXX11/src/Tensor/TensorInflation.h"
139#include "unsupported/Eigen/CXX11/src/Tensor/TensorLayoutSwap.h"
140#include "unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h"
141#include "unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h"
142#include "unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h"
143#include "unsupported/Eigen/CXX11/src/Tensor/TensorShuffling.h"
144#include "unsupported/Eigen/CXX11/src/Tensor/TensorStriding.h"
145#include "unsupported/Eigen/CXX11/src/Tensor/TensorCustomOp.h"
146#include "unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h"
147#include "unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h"
148#include "unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h"
149#include "unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h"
150#include "unsupported/Eigen/CXX11/src/Tensor/TensorScan.h"
151#include "unsupported/Eigen/CXX11/src/Tensor/TensorTrace.h"
152#include "unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h"
153#include "unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h"
154#include "unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h"
155#include "unsupported/Eigen/CXX11/src/Tensor/Tensor.h"
156#include "unsupported/Eigen/CXX11/src/Tensor/TensorFixedSize.h"
157#include "unsupported/Eigen/CXX11/src/Tensor/TensorMap.h"
158#include "unsupported/Eigen/CXX11/src/Tensor/TensorRef.h"
159#include "unsupported/Eigen/CXX11/src/Tensor/TensorIO.h"
160
161#include "Eigen/src/Core/util/ReenableStupidWarnings.h"
162
163
164#endif // __NNFW_CKER_EGIEN_EIGEN_TENSOR_REDUCED_INSTANTIATIONS_OSS_H__