xref: /aosp_15_r20/external/tensorflow/tensorflow/compiler/xla/service/cpu/runtime_conv3d.h (revision b6fb3261f9314811a0f4371741dbb8839866f948)
1 /* Copyright 2017 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_CPU_RUNTIME_CONV3D_H_
17 #define TENSORFLOW_COMPILER_XLA_SERVICE_CPU_RUNTIME_CONV3D_H_
18 
19 #include <stdint.h>
20 
21 #include "third_party/eigen3/Eigen/Core"
22 
23 extern "C" {
24 
25 extern void __xla_cpu_runtime_EigenConv3DF16(
26     const void* /* xla::ExecutableRunOptions* */ run_options_ptr,
27     Eigen::half* out, Eigen::half* lhs, Eigen::half* rhs, int64_t input_batch,
28     int64_t input_x, int64_t input_y, int64_t input_z, int64_t input_channels,
29     int64_t kernel_x, int64_t kernel_y, int64_t kernel_z,
30     int64_t kernel_channels, int64_t kernel_filters, int64_t output_x,
31     int64_t output_y, int64_t output_z, int64_t x_stride, int64_t y_stride,
32     int64_t z_stride, int64_t padding_x_before, int64_t padding_x_after,
33     int64_t padding_y_before, int64_t padding_y_after, int64_t padding_z_before,
34     int64_t padding_z_after, int64_t lhs_x_dilation, int64_t lhs_y_dilation,
35     int64_t lhs_z_dilation, int64_t rhs_x_dilation, int64_t rhs_y_dilation,
36     int64_t rhs_z_dilation, int64_t feature_group_count);
37 
38 extern void __xla_cpu_runtime_EigenConv3DF32(
39     const void* /* xla::ExecutableRunOptions* */ run_options_ptr, float* out,
40     float* lhs, float* rhs, int64_t input_batch, int64_t input_x,
41     int64_t input_y, int64_t input_z, int64_t input_channels, int64_t kernel_x,
42     int64_t kernel_y, int64_t kernel_z, int64_t kernel_channels,
43     int64_t kernel_filters, int64_t output_x, int64_t output_y,
44     int64_t output_z, int64_t x_stride, int64_t y_stride, int64_t z_stride,
45     int64_t padding_x_before, int64_t padding_x_after, int64_t padding_y_before,
46     int64_t padding_y_after, int64_t padding_z_before, int64_t padding_z_after,
47     int64_t lhs_x_dilation, int64_t lhs_y_dilation, int64_t lhs_z_dilation,
48     int64_t rhs_x_dilation, int64_t rhs_y_dilation, int64_t rhs_z_dilation,
49     int64_t feature_group_count);
50 
51 }  // extern "C"
52 
53 #endif  // TENSORFLOW_COMPILER_XLA_SERVICE_CPU_RUNTIME_CONV3D_H_
54