Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
a5d9f244
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a5d9f244
编写于
6月 14, 2023
作者:
Y
yuehuayingxueluo
提交者:
GitHub
6月 14, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix ci bugs in fused_linear (#54605)
上级
b11f0b7a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
27 addition
and
26 deletion
+27
-26
test/legacy_test/test_fuse_gemm_epilogue_pass.py
test/legacy_test/test_fuse_gemm_epilogue_pass.py
+3
-18
test/legacy_test/test_fused_gemm_epilogue_op.py
test/legacy_test/test_fused_gemm_epilogue_op.py
+24
-8
未找到文件。
test/legacy_test/test_fuse_gemm_epilogue_pass.py
浏览文件 @
a5d9f244
...
@@ -136,7 +136,7 @@ class TestFuseGemmEpilogueFWDBase(unittest.TestCase):
...
@@ -136,7 +136,7 @@ class TestFuseGemmEpilogueFWDBase(unittest.TestCase):
"_matmul_y"
:
self
.
matmul_y_arr
,
"_matmul_y"
:
self
.
matmul_y_arr
,
"_ele_y"
:
self
.
ele_y_arr
,
"_ele_y"
:
self
.
ele_y_arr
,
}
}
self
.
reference
=
self
.
exe
.
run
(
self
.
reference
=
paddle
.
static
.
Executor
(
self
.
place
)
.
run
(
self
.
main_prog
,
feed
=
self
.
feed
,
fetch_list
=
[
self
.
loss
.
name
]
self
.
main_prog
,
feed
=
self
.
feed
,
fetch_list
=
[
self
.
loss
.
name
]
)
)
...
@@ -207,10 +207,6 @@ class TestFuseGemmEpilogueReluFWDFP16(TestFuseGemmEpilogueReluFWDFP32):
...
@@ -207,10 +207,6 @@ class TestFuseGemmEpilogueReluFWDFP16(TestFuseGemmEpilogueReluFWDFP32):
self
.
place
,
self
.
main_prog
,
to_fp16_var_names
=
fp16_var_list
self
.
place
,
self
.
main_prog
,
to_fp16_var_names
=
fp16_var_list
)
)
self
.
data_arr
=
self
.
data_arr
.
astype
(
"float16"
)
self
.
matmul_y_arr
=
self
.
matmul_y_arr
.
astype
(
"float16"
)
self
.
ele_y_arr
=
self
.
ele_y_arr
.
astype
(
"float16"
)
@
unittest
.
skipIf
(
@
unittest
.
skipIf
(
not
core
.
is_compiled_with_cuda
(),
"core is not compiled with CUDA"
not
core
.
is_compiled_with_cuda
(),
"core is not compiled with CUDA"
...
@@ -240,10 +236,6 @@ class TestFuseGemmEpilogueGeluFWDFP16(TestFuseGemmEpilogueGeluFWDFP32):
...
@@ -240,10 +236,6 @@ class TestFuseGemmEpilogueGeluFWDFP16(TestFuseGemmEpilogueGeluFWDFP32):
self
.
place
,
self
.
main_prog
,
to_fp16_var_names
=
fp16_var_list
self
.
place
,
self
.
main_prog
,
to_fp16_var_names
=
fp16_var_list
)
)
self
.
data_arr
=
self
.
data_arr
.
astype
(
"float16"
)
self
.
matmul_y_arr
=
self
.
matmul_y_arr
.
astype
(
"float16"
)
self
.
ele_y_arr
=
self
.
ele_y_arr
.
astype
(
"float16"
)
@
unittest
.
skipIf
(
@
unittest
.
skipIf
(
not
core
.
is_compiled_with_cuda
(),
"core is not compiled with CUDA"
not
core
.
is_compiled_with_cuda
(),
"core is not compiled with CUDA"
...
@@ -319,7 +311,8 @@ class TestFuseGemmEpilogueBWDBase(unittest.TestCase):
...
@@ -319,7 +311,8 @@ class TestFuseGemmEpilogueBWDBase(unittest.TestCase):
f
'
{
multi_layer
.
linear3
.
full_name
()
}
.w_0@GRAD'
,
f
'
{
multi_layer
.
linear3
.
full_name
()
}
.w_0@GRAD'
,
f
'
{
multi_layer
.
linear3
.
full_name
()
}
.b_0@GRAD'
,
f
'
{
multi_layer
.
linear3
.
full_name
()
}
.b_0@GRAD'
,
]
]
self
.
outs_ref
=
self
.
exe
.
run
(
self
.
outs_ref
=
paddle
.
static
.
Executor
(
self
.
place
).
run
(
self
.
main_prog
,
feed
=
self
.
feed
,
fetch_list
=
self
.
fetch
self
.
main_prog
,
feed
=
self
.
feed
,
fetch_list
=
self
.
fetch
)
)
...
@@ -403,10 +396,6 @@ class TestFuseGemmEpilogueReLUBWDFP16(TestFuseGemmEpilogueReLUBWDFP32):
...
@@ -403,10 +396,6 @@ class TestFuseGemmEpilogueReLUBWDFP16(TestFuseGemmEpilogueReLUBWDFP32):
self
.
place
,
self
.
main_prog
,
to_fp16_var_names
=
fp16_var_list
self
.
place
,
self
.
main_prog
,
to_fp16_var_names
=
fp16_var_list
)
)
self
.
data_arr
=
self
.
data_arr
.
astype
(
"float16"
)
self
.
matmul_y_arr
=
self
.
matmul_y_arr
.
astype
(
"float16"
)
self
.
ele_y_arr
=
self
.
ele_y_arr
.
astype
(
"float16"
)
@
unittest
.
skipIf
(
@
unittest
.
skipIf
(
not
core
.
is_compiled_with_cuda
(),
"core is not compiled with CUDA"
not
core
.
is_compiled_with_cuda
(),
"core is not compiled with CUDA"
...
@@ -436,10 +425,6 @@ class TestFuseGemmEpilogueGeLUBWDFP16(TestFuseGemmEpilogueGeLUBWDFP32):
...
@@ -436,10 +425,6 @@ class TestFuseGemmEpilogueGeLUBWDFP16(TestFuseGemmEpilogueGeLUBWDFP32):
self
.
place
,
self
.
main_prog
,
to_fp16_var_names
=
fp16_var_list
self
.
place
,
self
.
main_prog
,
to_fp16_var_names
=
fp16_var_list
)
)
self
.
data_arr
=
self
.
data_arr
.
astype
(
"float16"
)
self
.
matmul_y_arr
=
self
.
matmul_y_arr
.
astype
(
"float16"
)
self
.
ele_y_arr
=
self
.
ele_y_arr
.
astype
(
"float16"
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
np
.
random
.
seed
(
0
)
np
.
random
.
seed
(
0
)
...
...
test/legacy_test/test_fused_gemm_epilogue_op.py
浏览文件 @
a5d9f244
...
@@ -89,7 +89,9 @@ class TestFuseGemmEpilogueOpReluMMFP16(TestFuseGemmBase):
...
@@ -89,7 +89,9 @@ class TestFuseGemmEpilogueOpReluMMFP16(TestFuseGemmBase):
self
.
place
self
.
place
):
):
return
return
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
)
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
,
check_dygraph
=
False
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
...
@@ -146,7 +148,9 @@ class TestFuseGemmEpilogueOpReluMTMFP16(TestFuseGemmBase):
...
@@ -146,7 +148,9 @@ class TestFuseGemmEpilogueOpReluMTMFP16(TestFuseGemmBase):
self
.
place
self
.
place
):
):
return
return
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
)
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
,
check_dygraph
=
False
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
...
@@ -203,7 +207,9 @@ class TestFuseGemmEpilogueOpReluMMTFP16(TestFuseGemmBase):
...
@@ -203,7 +207,9 @@ class TestFuseGemmEpilogueOpReluMMTFP16(TestFuseGemmBase):
self
.
place
self
.
place
):
):
return
return
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
)
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
,
check_dygraph
=
False
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
...
@@ -260,7 +266,9 @@ class TestFuseGemmEpilogueOpReluMTMTFP16(TestFuseGemmBase):
...
@@ -260,7 +266,9 @@ class TestFuseGemmEpilogueOpReluMTMTFP16(TestFuseGemmBase):
self
.
place
self
.
place
):
):
return
return
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
)
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
,
check_dygraph
=
False
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
...
@@ -317,7 +325,9 @@ class TestFuseGemmEpilogueOpReluMMFP16MultiDimX(TestFuseGemmBase):
...
@@ -317,7 +325,9 @@ class TestFuseGemmEpilogueOpReluMMFP16MultiDimX(TestFuseGemmBase):
self
.
place
self
.
place
):
):
return
return
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
)
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
,
check_dygraph
=
False
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
...
@@ -378,7 +388,9 @@ class TestFuseGemmEpilogueOpReluMTMFP16MultiDimX(TestFuseGemmBase):
...
@@ -378,7 +388,9 @@ class TestFuseGemmEpilogueOpReluMTMFP16MultiDimX(TestFuseGemmBase):
self
.
place
self
.
place
):
):
return
return
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
)
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
,
check_dygraph
=
False
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
...
@@ -438,7 +450,9 @@ class TestFuseGemmEpilogueOpGeluMMFP16(TestFuseGemmBase):
...
@@ -438,7 +450,9 @@ class TestFuseGemmEpilogueOpGeluMMFP16(TestFuseGemmBase):
self
.
place
self
.
place
):
):
return
return
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
)
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
,
check_dygraph
=
False
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
...
@@ -494,7 +508,9 @@ class TestFuseGemmEpilogueOpNoneMMFP16(TestFuseGemmBase):
...
@@ -494,7 +508,9 @@ class TestFuseGemmEpilogueOpNoneMMFP16(TestFuseGemmBase):
self
.
place
self
.
place
):
):
return
return
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
)
self
.
check_output_with_place
(
self
.
place
,
atol
=
self
.
atol
,
check_dygraph
=
False
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
@
skip_check_grad_ci
(
reason
=
"no grap op"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录