未验证 提交 9a560f7c 编写于 作者: Z Zhang Ting 提交者: GitHub

add interpolate op to default black lists (#45393)

上级 a635a8a5
......@@ -107,6 +107,11 @@ black_list = {
# fp16 is slower than fp32, though fp16 is supported.
'lookup_table',
'lookup_table_v2',
'linear_interp_v2',
'nearest_interp_v2',
'bilinear_interp_v2',
'bicubic_interp_v2',
'trilinear_interp_v2',
# default fp32 can avoid return inf when the sum value large than 65504
'reduce_sum',
}
......
......@@ -30,6 +30,13 @@ class TestAMPList(unittest.TestCase):
self.assertTrue(op not in amp_list.black_list)
self.assertTrue(op not in amp_list.unsupported_list)
default_black_list = [
'linear_interp_v2', 'nearest_interp_v2', 'bilinear_interp_v2',
'bicubic_interp_v2', 'trilinear_interp_v2'
]
for op in default_black_list:
self.assertTrue(op in amp_list.black_list)
if __name__ == "__main__":
unittest.main()
......@@ -56,6 +56,12 @@ BLACK_LIST = {
'cross_entropy2',
# default fp32 can avoid return inf when the sum value large than 65504
'reduce_sum',
# FP16 performance of grad op is worse than that of FP32. Use FP32 by default.
'linear_interp_v2',
'nearest_interp_v2',
'bilinear_interp_v2',
'bicubic_interp_v2',
'trilinear_interp_v2',
}
AMP_RELATED_FLAGS = [
......@@ -72,7 +78,16 @@ AMP_RELATED_FLAGS_SETTING = {
PURE_FP16_WHITE_LIST = {' '}
PURE_FP16_BLACK_LIST = {
'lookup_table', 'lookup_table_v2', 'scatter', 'scatter_grad'
'lookup_table',
'lookup_table_v2',
'scatter',
'scatter_grad',
# FP16 performance of grad op is worse than that of FP32. Use FP32 by default.
'linear_interp_v2',
'nearest_interp_v2',
'bilinear_interp_v2',
'bicubic_interp_v2',
'trilinear_interp_v2',
}
BF16_WHITE_LIST = {'conv2d', 'matmul_v2'}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册