Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
9ea0661a
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看板
提交
9ea0661a
编写于
11月 22, 2016
作者:
L
Luo Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clang format off on some cuda .cc file
上级
80c68d38
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
63 addition
and
37 deletion
+63
-37
paddle/cuda/src/hl_cuda_cublas.cc
paddle/cuda/src/hl_cuda_cublas.cc
+9
-3
paddle/cuda/src/hl_cuda_device.cc
paddle/cuda/src/hl_cuda_device.cc
+40
-23
paddle/cuda/src/hl_cudart_wrap.cc
paddle/cuda/src/hl_cudart_wrap.cc
+14
-11
未找到文件。
paddle/cuda/src/hl_cuda_cublas.cc
浏览文件 @
9ea0661a
...
@@ -56,9 +56,14 @@ void *cublas_dso_handle = nullptr;
...
@@ -56,9 +56,14 @@ void *cublas_dso_handle = nullptr;
#define DYNAMIC_LOAD_CUBLAS_V2_WRAP(__name) DYNAMIC_LOAD_CUBLAS_WRAP(__name)
#define DYNAMIC_LOAD_CUBLAS_V2_WRAP(__name) DYNAMIC_LOAD_CUBLAS_WRAP(__name)
// include all needed cublas functions in HPPL
// include all needed cublas functions in HPPL
// clang-format off
#define CUBLAS_BLAS_ROUTINE_EACH(__macro) \
#define CUBLAS_BLAS_ROUTINE_EACH(__macro) \
__macro(cublasSgemv) __macro(cublasDgemv) __macro(cublasSgemm) \
__macro(cublasSgemv) \
__macro(cublasDgemm) __macro(cublasSgeam) __macro(cublasDgeam)
__macro(cublasDgemv) \
__macro(cublasSgemm) \
__macro(cublasDgemm) \
__macro(cublasSgeam) \
__macro(cublasDgeam) \
DYNAMIC_LOAD_CUBLAS_V2_WRAP
(
cublasCreate
)
DYNAMIC_LOAD_CUBLAS_V2_WRAP
(
cublasCreate
)
DYNAMIC_LOAD_CUBLAS_V2_WRAP
(
cublasDestroy
)
DYNAMIC_LOAD_CUBLAS_V2_WRAP
(
cublasDestroy
)
...
@@ -81,6 +86,7 @@ CUBLAS_BLAS_ROUTINE_EACH(DYNAMIC_LOAD_CUBLAS_V2_WRAP)
...
@@ -81,6 +86,7 @@ CUBLAS_BLAS_ROUTINE_EACH(DYNAMIC_LOAD_CUBLAS_V2_WRAP)
}
/* namespace dynload */
}
/* namespace dynload */
// clang-format on
#ifndef PADDLE_TYPE_DOUBLE
#ifndef PADDLE_TYPE_DOUBLE
#define CUBLAS_GEAM dynload::cublasSgeam
#define CUBLAS_GEAM dynload::cublasSgeam
#define CUBLAS_GEMV dynload::cublasSgemv
#define CUBLAS_GEMV dynload::cublasSgemv
...
...
paddle/cuda/src/hl_cuda_device.cc
浏览文件 @
9ea0661a
...
@@ -57,10 +57,14 @@ void *curand_dso_handle = nullptr;
...
@@ -57,10 +57,14 @@ void *curand_dso_handle = nullptr;
#endif
#endif
/* include all needed curand functions in HPPL */
/* include all needed curand functions in HPPL */
// clang-format off
#define CURAND_RAND_ROUTINE_EACH(__macro) \
#define CURAND_RAND_ROUTINE_EACH(__macro) \
__macro(curandCreateGenerator) __macro(curandSetStream) \
__macro(curandCreateGenerator) \
__macro(curandSetPseudoRandomGeneratorSeed) \
__macro(curandSetStream) \
__macro(curandGenerateUniform) __macro(curandGenerateUniformDouble)
__macro(curandSetPseudoRandomGeneratorSeed)\
__macro(curandGenerateUniform) \
__macro(curandGenerateUniformDouble)
// clang-format on
CURAND_RAND_ROUTINE_EACH
(
DYNAMIC_LOAD_CURAND_WRAP
)
CURAND_RAND_ROUTINE_EACH
(
DYNAMIC_LOAD_CURAND_WRAP
)
...
@@ -99,25 +103,38 @@ void *cudart_dso_handle = nullptr;
...
@@ -99,25 +103,38 @@ void *cudart_dso_handle = nullptr;
#endif
#endif
/* include all needed cuda functions in HPPL */
/* include all needed cuda functions in HPPL */
// clang-format off
#define CUDA_ROUTINE_EACH(__macro) \
#define CUDA_ROUTINE_EACH(__macro) \
__macro(cudaMalloc) __macro(cudaHostAlloc) __macro(cudaFree) \
__macro(cudaMalloc) \
__macro(cudaFreeHost) __macro(cudaMemcpy) __macro(cudaMemset) __macro( \
__macro(cudaHostAlloc) \
cudaMemcpyAsync) __macro(cudaSetDevice) __macro(cudaGetDevice) \
__macro(cudaFree) \
__macro(cudaGetDeviceCount) __macro(cudaGetDeviceProperties) \
__macro(cudaFreeHost) \
__macro(cudaDeviceSynchronize) __macro(cudaDeviceCanAccessPeer) \
__macro(cudaMemcpy) \
__macro(cudaMemset) \
__macro(cudaMemcpyAsync) \
__macro(cudaSetDevice) \
__macro(cudaGetDevice) \
__macro(cudaGetDeviceCount) \
__macro(cudaGetDeviceProperties) \
__macro(cudaDeviceSynchronize) \
__macro(cudaDeviceCanAccessPeer) \
__macro(cudaDeviceEnablePeerAccess) \
__macro(cudaDeviceEnablePeerAccess) \
__macro(cudaStreamCreate) __macro(cudaStreamDestroy) \
__macro(cudaStreamCreate) \
__macro(cudaStreamSynchronize) __macro( \
__macro(cudaStreamDestroy) \
cudaStreamWaitEvent) __macro(cudaEventCreate) \
__macro(cudaStreamSynchronize) \
__macro(cudaEventRecord) __macro(cudaEventQuery) \
__macro(cudaStreamWaitEvent) \
__macro(cudaEventDestroy) __macro( \
__macro(cudaEventCreate) \
cudaEventSynchronize) \
__macro(cudaEventRecord) \
__macro(cudaEventElapsedTime) __macro( \
__macro(cudaEventQuery) \
cudaSetDeviceFlags) \
__macro(cudaEventDestroy) \
__macro(cudaGetLastError) __macro( \
__macro(cudaEventSynchronize) \
cudaFuncSetCacheConfig) \
__macro(cudaEventElapsedTime) \
__macro(cudaSetDeviceFlags) \
__macro(cudaGetLastError) \
__macro(cudaFuncSetCacheConfig) \
__macro(cudaRuntimeGetVersion) \
__macro(cudaRuntimeGetVersion) \
__macro(cudaGetErrorString)
__macro(cudaGetErrorString)
// clang-format on
CUDA_ROUTINE_EACH
(
DYNAMIC_LOAD_CUDART_WRAP
)
CUDA_ROUTINE_EACH
(
DYNAMIC_LOAD_CUDART_WRAP
)
...
...
paddle/cuda/src/hl_cudart_wrap.cc
浏览文件 @
9ea0661a
...
@@ -47,10 +47,12 @@ extern void *cudart_dso_handle;
...
@@ -47,10 +47,12 @@ extern void *cudart_dso_handle;
} __name;
/* struct DynLoad__##__name */
} __name;
/* struct DynLoad__##__name */
/* include all needed cuda functions in HPPL */
/* include all needed cuda functions in HPPL */
// clang-format off
#define CUDA_ROUTINE_EACH(__macro) \
#define CUDA_ROUTINE_EACH(__macro) \
__macro(cudaLaunch, cudaError_t) __macro(cudaSetupArgument, cudaError_t) \
__macro(cudaLaunch, cudaError_t) \
__macro(cudaSetupArgument, cudaError_t) \
__macro(cudaConfigureCall, cudaError_t) \
__macro(cudaConfigureCall, cudaError_t) \
__macro(__cudaRegisterFatBinary, void **)
\
__macro(__cudaRegisterFatBinary, void**)
\
__macro(__cudaUnregisterFatBinary, void) \
__macro(__cudaUnregisterFatBinary, void) \
__macro(__cudaRegisterFunction, void) \
__macro(__cudaRegisterFunction, void) \
__macro(__cudaRegisterVar, void) \
__macro(__cudaRegisterVar, void) \
...
@@ -58,6 +60,7 @@ extern void *cudart_dso_handle;
...
@@ -58,6 +60,7 @@ extern void *cudart_dso_handle;
__macro(__cudaInitModule, char) \
__macro(__cudaInitModule, char) \
__macro(__cudaRegisterTexture, void) \
__macro(__cudaRegisterTexture, void) \
__macro(__cudaRegisterSurface, void)
__macro(__cudaRegisterSurface, void)
// clang-format on
CUDA_ROUTINE_EACH
(
DYNAMIC_LOAD_CUDART_WRAP
)
CUDA_ROUTINE_EACH
(
DYNAMIC_LOAD_CUDART_WRAP
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录