Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
dc08c187
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
dc08c187
编写于
11月 02, 2021
作者:
L
Liu-xiandong
提交者:
GitHub
11月 02, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix cusparse compile bug in CUDA11.2, test=develop (#36911)
上级
a4c3e038
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
7 deletion
+7
-7
paddle/fluid/operators/CMakeLists.txt
paddle/fluid/operators/CMakeLists.txt
+1
-1
paddle/fluid/platform/dynload/cusparse.h
paddle/fluid/platform/dynload/cusparse.h
+2
-2
python/paddle/fluid/tests/unittests/test_sparse_attention_op.py
.../paddle/fluid/tests/unittests/test_sparse_attention_op.py
+4
-4
未找到文件。
paddle/fluid/operators/CMakeLists.txt
浏览文件 @
dc08c187
...
...
@@ -99,7 +99,7 @@ if (WITH_GPU OR WITH_ROCM)
endif
()
op_library
(
sync_batch_norm_op
)
file
(
APPEND
${
pybind_file
}
"USE_CUDA_ONLY_OP(sync_batch_norm);
\n
"
)
if
((
NOT WIN32
)
AND
(
NOT WITH_ROCM
)
AND
(
NOT PADDLE_WITH_ARM
)
AND
(
NOT
${
CMAKE_CUDA_COMPILER_VERSION
}
VERSION_LESS 11.
2
)
)
if
((
NOT WIN32
)
AND
(
NOT WITH_ROCM
)
AND
(
NOT PADDLE_WITH_ARM
)
AND
(
NOT
${
CMAKE_CUDA_COMPILER_VERSION
}
VERSION_LESS 11.
3
)
)
op_library
(
sparse_attention_op
)
file
(
APPEND
${
pybind_file
}
"USE_CUDA_ONLY_OP(sparse_attention);
\n
"
)
endif
()
...
...
paddle/fluid/platform/dynload/cusparse.h
浏览文件 @
dc08c187
...
...
@@ -56,8 +56,8 @@ extern void *cusparse_dso_handle;
CUSPARSE_ROUTINE_EACH
(
DECLARE_DYNAMIC_LOAD_CUSPARSE_WRAP
);
// APIs available after CUDA 11.
2
#if CUDA_VERSION >= 110
2
0
// APIs available after CUDA 11.
3
#if CUDA_VERSION >= 110
3
0
#define CUSPARSE_ROUTINE_EACH_R2(__macro) \
__macro(cusparseSDDMM_bufferSize); \
__macro(cusparseSDDMM_preprocess); \
...
...
python/paddle/fluid/tests/unittests/test_sparse_attention_op.py
浏览文件 @
dc08c187
...
...
@@ -128,8 +128,8 @@ def init_csr_format(batch_size, num_heads, rows, blocksize):
@
unittest
.
skipIf
(
not
core
.
is_compiled_with_cuda
()
or
get_cuda_version
()
<
110
2
0
,
"core is not compiled with CUDA and cuda version need larger than or equal to 11.
2
"
not
core
.
is_compiled_with_cuda
()
or
get_cuda_version
()
<
110
3
0
,
"core is not compiled with CUDA and cuda version need larger than or equal to 11.
3
"
)
class
TestSparseAttentionOp
(
OpTest
):
def
config
(
self
):
...
...
@@ -190,8 +190,8 @@ class TestSparseAttentionOpShapeTest(TestSparseAttentionOp):
@
unittest
.
skipIf
(
not
core
.
is_compiled_with_cuda
()
or
get_cuda_version
()
<
110
2
0
,
"core is not compiled with CUDA and cuda version need larger than or equal to 11.
2
"
not
core
.
is_compiled_with_cuda
()
or
get_cuda_version
()
<
110
3
0
,
"core is not compiled with CUDA and cuda version need larger than or equal to 11.
3
"
)
class
TestSparseAttentionAPI
(
unittest
.
TestCase
):
def
setUp
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录