• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 #ifndef TENSORFLOW_COMPILER_XLA_SERVICE_GPU_TARGET_CONSTANTS_H_
17 #define TENSORFLOW_COMPILER_XLA_SERVICE_GPU_TARGET_CONSTANTS_H_
18 
19 namespace xla {
20 namespace gpu {
21 
22 namespace nvptx {
23 // The triple that represents our target.
24 constexpr char kTargetTriple[] = "nvptx64-nvidia-cuda";
25 
26 // The data layout of the emitted module. Copied from computeDataLayout in
27 // NVPTXTargetMachine.cpp.
28 constexpr char kDataLayout[] = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64";
29 }  // namespace nvptx
30 
31 namespace amdgpu {
32 
33 // The triple that represents our target on LLVM AMDGPU backend.
34 constexpr char kTargetTriple[] = "amdgcn-amd-amdhsa";
35 
36 // The data layout of the emitted module.
37 constexpr char kDataLayout[] =
38     "e-p:64:64-p1:64:64-p2:64:64-p3:32:32-p4:32:32-p5:32:32"
39     "-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128"
40     "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-A5";
41 
42 }  // namespace amdgpu
43 
44 }  // namespace gpu
45 }  // namespace xla
46 
47 #endif  // TENSORFLOW_COMPILER_XLA_SERVICE_GPU_TARGET_CONSTANTS_H_
48