Rate This Document
Findability
Accuracy
Completeness
Readability

Feature Scope

Propagation Directions and Data Types

Table 1 Parameter data types of the forward direction

Propagation Direction

src Data Type

Weight Data Type

dst Data Type

Bias Data Type

dnnl_forward_training

dnnl_forward_inference

f32

f32

f32

f32

f16

f16

f16

f16

bf16

bf16

bf16

bf16

f16

f16

f32

f16

bf16

bf16

f32

bf16

Table 2 Parameter data types of the backward direction (dnnl_backward_data category)

Propagation Direction

src Data Type

Weight Data Type

dst Data Type

Bias Data Type

dnnl_backward_data

f32

f32

f32

f32

f16

f16

f16

f16

bf16

bf16

bf16

bf16

f32

f16

f16

f32

f32

bf16

bf16

f32

Table 3 Parameter data types of the backward direction (dnnl_backward_weights category)

Propagation Direction

src Data Type

Weight Data Type

dst Data Type

Bias Data Type

dnnl_backward_weights

f32

f32

f32

f32

f16

f16

f16

f16

bf16

bf16

bf16

bf16

f16

f32

f16

f16

bf16

f32

bf16

bf16

Data Layout

2D convolution is supported. The input and output tensor dimension is 4D. The layout of src, weights, and dst data needs to meet the following requirements:

Tensor Dimension

src Data Layout

Weights Data Layout

dst Data Layout

4D

dnnl_abcd

dnnl_abcd

dnnl_abcd

Parameter Constraints

Propagation Direction

Variable Name

Variable Description

Constraint

Remarks

dnnl_forward_training

dnnl_forward_inference

mb

batch

≥ 1

oh and ow can be left blank, automatically deduced by benchdnn, or set by the user. The following requirements must be met:

[] represents rounding down to the nearest integer.

ic

input channel

≥ 1

ih

input height

≥ 1

iw

input width

≥ 1

oc

output channel

≥ 1

kh

kernel height

≥ 1

kw

kernel width

≥ 1

oh

output height

≥ 1

ow

output width

≥ 1

sh

height-wise stride

≥ 1

sw

width-wise stride

≥ 1

dh

height-wise dilation

≥ 0

dw

width-wise dilation

≥ 0

ph

height padding

≥ 0

pw

width padding

≥ 0

DKH

kernel height with dilation

DKH = 1 + (kh-1) x (dh+1)

DKW

kernel width with dilation

DKW = 1 + (kw-1) x (dw+1)

dnnl_backward_data

mb

batch

≥ 1

oh and ow can be left blank, automatically deduced by benchdnn, or set by the user. The following requirements must be met:

[] represents rounding down to the nearest integer.

ic

input channel

≥ 1

ih

input height

≥ 1

iw

input width

≥ 1

oc

output channel

≥ 1

kh

kernel height

≥ 1

kw

kernel width

≥ 1

oh

output height

≥ 1

ow

output width

≥ 1

sh

height-wise stride

≥ 1

sw

width-wise stride

≥ 1

dh

height-wise dilation

≥ 0

dw

width-wise dilation

≥ 0

ph

height padding

0<=ph<=(kh-1) x (dh+1)

pw

width padding

0<=pw<=(kw-1) x (dw+1)

DKH

kernel height with dilation

DKH = 1 + (kh-1) x (dh+1)

DKW

kernel width with dilation

DKW = 1 + (kw-1) x (dw+1)

dnnl_backward_weights

mb

batch

≥ 1

ic

input channel

≥ 1

ih

input height

≥ 1

iw

input width

≥ 1

oc

output channel

≥ 1

kh

kernel height

≥ 1

kw

kernel width

≥ 1

oh

output height

≥ 1

ow

output width

≥ 1

sh

height-wise stride

≥ 1

sw

width-wise stride

≥ 1

dh

height-wise dilation

≥ 0

dw

width-wise dilation

≥ 0

ph

height padding

≥ 0

pw

width padding

≥ 0

DKH

kernel height with dilation

DKH = 1 + (oh-1) x sh

DKW

kernel width with dilation

DKW = 1 + (ow-1) x sw