aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/gpu/backend_configs.proto
blob: 78e14d860e31ace2fcb3f51fb8e0c40a0ea5f3dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
syntax = "proto3";

package xla.gpu;

// Backend configs for XLA:GPU.
//
// These are metadata that the GPU backend attaches to HloInstrucitons and later
// uses during e.g. codegen.
//
// Remember that proto3 doesn't give clients a way to tell the difference
// between a field not being present and a field having the default value.
// Choose your defaults carefully.
//
// No guarantee is made about the stability of these protos.
//
// See HloInstruction::backend_config() for more info.

// Backend config for a convolution that runs through cudnn.
message CudnnConvBackendConfig {
  // Opaque algorithm number of cudnn algorithm chosen for this conv.
  int64 algorithm = 1;

  // Whether we may use tensor cores when running this conv.  Even if this is
  // true, cudnn may choose not to use tensor cores, e.g. because the GPU or
  // selected algorithm doesn't support it.
  bool tensor_ops_enabled = 2;

  // The scaling factor multiplied with the convolution result.
  double conv_result_scale = 4;

  // Below are the fields related to cuDNN's fused convolution. Refer to
  // CudnnConvParams for their meanings.

  // The requested activation (e.g. relu) after the convolution. It is with type
  // stream_executor::dnn::ActivationMode.
  int64 activation_mode = 3;

  // The scaling factor multiplied with the side input. If no side input buffer
  // is provided, this field must be 0.
  double side_input_scale = 5;
}