未验证 提交 89c783db 编写于 作者: z8hanghuan's avatar z8hanghuan 提交者: GitHub

modify xpu unittest to support fp64, *test=kunlun (#43772)

* modify xpu unittest to support fp64, *test=kunlun

* modify xpu unittest to support fp64 for KL2, *test=kunlun

* modify xpu unittest to support fp64, *test=kunlun

* modify xpu unittest to support fp64, *test=kunlun
上级 7d15f930
......@@ -83,7 +83,7 @@ type_dict_str_to_numpy = {
}
xpu_test_op_white_list = []
xpu_test_type_white_list = ['float64']
xpu_test_device_type_white_list = ['xpu1_float64']
xpu_test_op_type_white_list = ['dropout_float16', 'dropout_grad_float16']
xpu_test_device_op_white_list = []
xpu_test_device_op_type_white_list = []
......@@ -106,7 +106,18 @@ def get_op_white_list():
def get_type_white_list():
type_white_list = xpu_test_type_white_list
xpu_version = core.get_xpu_device_version(0)
version_str = "xpu2" if xpu_version == core.XPUVersion.XPU2 else "xpu1"
xpu1_type_white_list = []
xpu2_type_white_list = []
for device_type in xpu_test_device_type_white_list:
device, t_type = device_type.split("_")
if "xpu1" == device:
xpu1_type_white_list.append(t_type)
else:
xpu2_type_white_list.append(t_type)
type_white_list = xpu1_type_white_list if version_str == "xpu1" else xpu2_type_white_list
if os.getenv('XPU_TEST_TYPE_WHITE_LIST') is not None:
type_white_list.extend(
os.getenv('XPU_TEST_TYPE_WHITE_LIST').strip().split(','))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册