Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
28c8a5cc
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
28c8a5cc
编写于
7月 21, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
7月 21, 2020
浏览文件
操作
浏览文件
下载
差异文件
!3267 Fix performance issue for wide&deep
Merge pull request !3267 from mamba_ni/master
上级
abcee8e5
226dbde4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
1 addition
and
33 deletion
+1
-33
mindspore/ccsrc/CMakeLists.txt
mindspore/ccsrc/CMakeLists.txt
+1
-2
mindspore/ccsrc/runtime/device/gpu/gpu_common.h
mindspore/ccsrc/runtime/device/gpu/gpu_common.h
+0
-16
mindspore/ccsrc/runtime/device/gpu/gpu_device_manager.cc
mindspore/ccsrc/runtime/device/gpu/gpu_device_manager.cc
+0
-10
mindspore/ccsrc/runtime/device/gpu/gpu_device_manager.h
mindspore/ccsrc/runtime/device/gpu/gpu_device_manager.h
+0
-5
未找到文件。
mindspore/ccsrc/CMakeLists.txt
浏览文件 @
28c8a5cc
...
...
@@ -278,8 +278,7 @@ if (ENABLE_GPU)
${
CUDA_PATH
}
/lib64/libcurand.so
${
CUDNN_PATH
}
/lib64/libcudnn.so
${
CUDA_PATH
}
/lib64/libcudart.so
${
CUDA_PATH
}
/lib64/stubs/libcuda.so
${
CUDA_PATH
}
/lib64/libcusolver.so
)
${
CUDA_PATH
}
/lib64/stubs/libcuda.so
)
endif
()
if
(
ENABLE_CPU
)
...
...
mindspore/ccsrc/runtime/device/gpu/gpu_common.h
浏览文件 @
28c8a5cc
...
...
@@ -93,22 +93,6 @@ namespace gpu {
} \
}
#define CHECK_CUSOLVER_RET_WITH_EXCEPT(expression, message) \
{ \
cusolverStatus_t status = (expression); \
if (status != CUSOLVER_STATUS_SUCCESS) { \
MS_LOG(EXCEPTION) << "cusolver Error: " << message << " | Error Number: " << status; \
} \
}
#define CHECK_CUSOLVER_RET_WITH_ERROR(expression, message) \
{ \
cusolverStatus_t status = (expression); \
if (status != CUSOLVER_STATUS_SUCCESS) { \
MS_LOG(ERROR) << "cusolver Error: " << message << " | Error Number: " << status; \
} \
}
#define CHECK_NCCL_RET_WITH_EXCEPT(expression, message) \
{ \
int result = (expression); \
...
...
mindspore/ccsrc/runtime/device/gpu/gpu_device_manager.cc
浏览文件 @
28c8a5cc
...
...
@@ -32,11 +32,6 @@ void GPUDeviceManager::InitDevice() {
CHECK_CUBLAS_RET_WITH_EXCEPT
(
cublasCreate
(
&
cublas_handle_
),
"Failed to create cuBLAS handle."
);
CHECK_CUBLAS_RET_WITH_EXCEPT
(
cublasSetStream
(
cublas_handle_
,
reinterpret_cast
<
cudaStream_t
>
(
default_stream
())),
"Failed to set stream for cuBLAS handle."
);
CHECK_CUSOLVER_RET_WITH_EXCEPT
(
cusolverDnCreate
(
&
cusolver_dn_handle_
),
"Failed to create cusolver dn handle."
);
CHECK_CUSOLVER_RET_WITH_EXCEPT
(
cusolverDnSetStream
(
cusolver_dn_handle_
,
reinterpret_cast
<
cudaStream_t
>
(
default_stream
())),
"Failed to set stream for cusolver dn handle"
);
CHECK_OP_RET_WITH_EXCEPT
(
GPUMemoryAllocator
::
GetInstance
().
Init
(),
"Failed to Init gpu memory allocator"
)
}
...
...
@@ -52,9 +47,6 @@ void GPUDeviceManager::ReleaseDevice() {
if
(
cublas_handle_
!=
nullptr
)
{
CHECK_CUBLAS_RET_WITH_ERROR
(
cublasDestroy
(
cublas_handle_
),
"Failed to destroy cuBLAS handle."
);
}
if
(
cusolver_dn_handle_
!=
nullptr
)
{
CHECK_CUSOLVER_RET_WITH_ERROR
(
cusolverDnDestroy
(
cusolver_dn_handle_
),
"Failed to destroy cusolver dn handle."
);
}
CHECK_OP_RET_WITH_ERROR
(
GPUMemoryAllocator
::
GetInstance
().
Finalize
(),
"Failed to destroy gpu memory allocator"
);
}
...
...
@@ -88,8 +80,6 @@ const cudnnHandle_t &GPUDeviceManager::GetCudnnHandle() const { return cudnn_han
const
cublasHandle_t
&
GPUDeviceManager
::
GetCublasHandle
()
const
{
return
cublas_handle_
;
}
const
cusolverDnHandle_t
&
GPUDeviceManager
::
GetCusolverDnHandle
()
const
{
return
cusolver_dn_handle_
;
}
bool
GPUDeviceManager
::
SyncStream
(
const
DeviceStream
&
stream
)
const
{
return
CudaDriver
::
SyncStream
(
stream
);
}
bool
GPUDeviceManager
::
CopyDeviceMemToHost
(
const
HostMemPtr
&
dst
,
const
DeviceMemPtr
&
src
,
size_t
size
)
const
{
...
...
mindspore/ccsrc/runtime/device/gpu/gpu_device_manager.h
浏览文件 @
28c8a5cc
...
...
@@ -19,7 +19,6 @@
#include <cudnn.h>
#include <cublas_v2.h>
#include <cusolverDn.h>
#include <vector>
#include <memory>
#include "runtime/device/gpu/cuda_driver.h"
...
...
@@ -44,7 +43,6 @@ class GPUDeviceManager {
const
cudnnHandle_t
&
GetCudnnHandle
()
const
;
const
cublasHandle_t
&
GetCublasHandle
()
const
;
const
cusolverDnHandle_t
&
GetCusolverDnHandle
()
const
;
bool
CopyDeviceMemToHost
(
const
HostMemPtr
&
dst
,
const
DeviceMemPtr
&
src
,
size_t
size
)
const
;
bool
CopyHostMemToDevice
(
const
DeviceMemPtr
&
dst
,
const
void
*
src
,
size_t
size
)
const
;
...
...
@@ -75,9 +73,6 @@ class GPUDeviceManager {
// handle used for cuBLAS kernels.
cublasHandle_t
cublas_handle_
{
nullptr
};
// handle used for cusolver dn kernels;
cusolverDnHandle_t
cusolver_dn_handle_
{
nullptr
};
bool
dev_id_init_
;
uint32_t
cur_dev_id_
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录