AutoMixedPrecisionListsBF16

class paddle.fluid.contrib.mixed_precision.bf16.amp_lists. AutoMixedPrecisionListsBF16 ( custom_bf16_list=None, custom_fp32_list=None, custom_fp32_varnames=None ) [source]

AutoMixedPrecisionListsBF16 is a class for fp32/bf16 op types list. The lists are used for an algorithm which determines op’s execution mode (fp32 or bf16).It can update pre-defined fp32 list and bf16 list according to users’ custom fp32 bf16 lists.

Parameters
  • custom_bf16_list (set) – Users’ custom bf16 list.

  • custom_fp32_list (set) – Users’ custom fp32 list.

  • custom_fp32_varnames (set) – Users’ custom fp32 variables’ names.

Examples


System Message: WARNING/2 (/usr/local/lib/python3.8/site-packages/paddle/fluid/contrib/mixed_precision/bf16/amp_lists.py:docstring of paddle.fluid.contrib.mixed_precision.bf16.amp_lists.AutoMixedPrecisionListsBF16, line 15)

Explicit markup ends without a blank line; unexpected unindent.

import paddle paddle.enable_static() with paddle.static.amp.bf16_guard():

System Message: ERROR/3 (/usr/local/lib/python3.8/site-packages/paddle/fluid/contrib/mixed_precision/bf16/amp_lists.py:docstring of paddle.fluid.contrib.mixed_precision.bf16.amp_lists.AutoMixedPrecisionListsBF16, line 18)

Unexpected indentation.

paddle.static.amp.AutoMixedPrecisionListsBF16(custom_fp32_list={‘lstm’})